Re: [Detnet] Last Call: <draft-ietf-detnet-yang-18.txt> (Deterministic Networking (DetNet) YANG Model) to Proposed Standard

Don Fedyk <dfedyk@labn.net> Fri, 22 December 2023 23:10 UTC

Return-Path: <dfedyk@labn.net>
X-Original-To: detnet@ietfa.amsl.com
Delivered-To: detnet@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B7F33C14F702; Fri, 22 Dec 2023 15:10:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.908
X-Spam-Level:
X-Spam-Status: No, score=-6.908 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=labn.onmicrosoft.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wgFU8JdERwl6; Fri, 22 Dec 2023 15:09:57 -0800 (PST)
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2126.outbound.protection.outlook.com [40.107.92.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 63666C14F68A; Fri, 22 Dec 2023 15:09:56 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fav3FON8VDZuTbG0LlkN1zgsWEr2SLrIU8c5HvGS6qLf0EQ5Y/VBCRxEDZtcv8Lft8RmXbvcSh8YyH4YaVhR2CUdRHjO6nZ8sp/fCK7iTO6O+b3QaGxwuYuxZoXI9gRXhZbCGalYP4pKw6YscoJGiLzCETs83drdmvp8LLzqGAlSKtzGApy5cYE/I2wCCoo8h8rw1mIL2zUqkcMqLJhd8ZOkGZppERe1EZ1nPl3UiIDsu7jkIA0hMO3dZnuU6SEbM3RyH2c4l8o8DeYdn7cm7K4Q4CCDmKdbpcxZm+hvA7hjqLqaDZLWmynw+uQyYReCq8qeCXQ2P3nzk+haeAATow==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SHftoi7H/yCBJDFe2cywswWZo02YUfm6KvyjzOGQ2Q0=; b=eI80AGdFb/YaCROru9gRLEPEwz55dBhdnN9AQz3xQsVshIkmSaQaJmmNYTLkdHi1MYT6z1rFwBbi78OQ1wGaF480Ptg4BQ7WsjvIO/WypwGvFSl8kJ9KMyngdcR30UB3LzPgYiMx0ro3fRV9gP1oFiW8llyIcRgPX2TGqFnpBf4iGSLbGK039pIBor2/Hl2isvPieqGif0D/QqboMv5eckR2IkifCP+SbVfN5pkE4HZPRk4W/YsYON0ptbOGAluOeaZHR+EqmFw8Ne32KuQgy+PSGVAc05/MJ4nIkLpD2EXCYIVqETphNjZymcgwtH21xhadNgx8eF523JXmiGXHXw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=labn.net; dmarc=pass action=none header.from=labn.net; dkim=pass header.d=labn.net; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=labn.onmicrosoft.com; s=selector2-labn-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SHftoi7H/yCBJDFe2cywswWZo02YUfm6KvyjzOGQ2Q0=; b=F7gK5gm2/xLSU51VUIS/Cckrwf+UptldI0S2XYBeio7kA2+sG0XS8Jmbr/7QyAt+3Ihc68sF0J1F2ibwUerGODH7OpFUpC4qnTkexUqyf1mBMlKNmY2/rJVXLlM2b6g1TUSSLHVfGgiwPWcnFxtiHjA7JhAZXuP40zMWPchAg2Y=
Received: from PH7PR14MB5368.namprd14.prod.outlook.com (2603:10b6:510:133::11) by PH8PR14MB5989.namprd14.prod.outlook.com (2603:10b6:510:22b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Fri, 22 Dec 2023 23:09:52 +0000
Received: from PH7PR14MB5368.namprd14.prod.outlook.com ([fe80::3f34:5ede:37ef:b665]) by PH7PR14MB5368.namprd14.prod.outlook.com ([fe80::3f34:5ede:37ef:b665%5]) with mapi id 15.20.7113.019; Fri, 22 Dec 2023 23:09:51 +0000
From: Don Fedyk <dfedyk@labn.net>
To: Florian Kauer <florian.kauer@linutronix.de>, "last-call@ietf.org" <last-call@ietf.org>, "draft-ietf-detnet-yang@ietf.org" <draft-ietf-detnet-yang@ietf.org>
CC: "detnet-chairs@ietf.org" <detnet-chairs@ietf.org>, "detnet@ietf.org" <detnet@ietf.org>, "janos.farkas@ericsson.com" <janos.farkas@ericsson.com>, "jgs@juniper.net" <jgs@juniper.net>
Thread-Topic: [Detnet] Last Call: <draft-ietf-detnet-yang-18.txt> (Deterministic Networking (DetNet) YANG Model) to Proposed Standard
Thread-Index: AQHaJ7UoE2DamHhYVkWp/qef7C5NO7CcPtiAgBSxiwCABOlqgIAAA+YA
Date: Fri, 22 Dec 2023 23:09:51 +0000
Message-ID: <PH7PR14MB5368659D8A850AEB2B5C8346BB94A@PH7PR14MB5368.namprd14.prod.outlook.com>
References: <170180619452.981.2657917158901639039@ietfa.amsl.com> <01caf93f-efdf-4293-89fd-e296cd3465f9@linutronix.de> <PH7PR14MB536872E10E81EE003BA11E23BB97A@PH7PR14MB5368.namprd14.prod.outlook.com> <44ac1f6e-a1c1-4114-a099-bd96eacea1ce@linutronix.de>
In-Reply-To: <44ac1f6e-a1c1-4114-a099-bd96eacea1ce@linutronix.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=labn.net;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: PH7PR14MB5368:EE_|PH8PR14MB5989:EE_
x-ms-office365-filtering-correlation-id: 11947b32-7eea-4e79-91af-08dc03431a18
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: oZw2Kj3/3/LbrBdjT7Ej9b3YIl2WKDqTtf1zPHf3BmVMZzxgVzV7cpaDmswcQy3NsepTcLnYQ0ehbUCQ6UU+sjeu+AlYyPvDB6r4yDAeN/HrZqk5Rr2xUTDjW2WkSk167saC9o61cw+JHCbr9bCwPkAL9hxFJVn9sEoXDys1qphLnPlmfj3sW0eTZClw54LpdLVx9I8xUVR5quzpUXIbocS9WZ4i8CEMPkGsLc4qifgPihZ76GgTOk+2HAAv452zX9Tv1ohL6xVqd34ENLshSJnzUB3uZLImF4I0jEOrTG8KMjw3ZrM4ZDrGSuhMYaRJGlNPsOlwHKfuy7tv8Zm++gPN+kvP72Ib9C71RbzW34IffjD2tB7s0H+LcEzxvdTms30VSljqNsWD3xSR0YVLRwE2+2xqFdh2h25phJBePybbiDScfsrrq5vwva2Vvs8HwqqPCubL7FhQ2u6W3MN9yH8YFUgIU6DI0n6CLNwdWU/ECas/aYpBUrTSUz5B8ngBOLS3AxGxzsux1Ba4X/uANx84qo4MZBW8aJgUJOzbaVYQSivW3WEgma7Cq1hxb26zcMQOzcCdkrgi4Fg7eZeqjQ0CrKP55RGo8vLCn0Rb7ek=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH7PR14MB5368.namprd14.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(346002)(136003)(39830400003)(366004)(376002)(230922051799003)(451199024)(186009)(1800799012)(64100799003)(53546011)(8936002)(83380400001)(38100700002)(122000001)(33656002)(86362001)(41300700001)(966005)(5660300002)(66556008)(4326008)(110136005)(76116006)(64756008)(66446008)(66476007)(316002)(107886003)(54906003)(9686003)(52536014)(8676002)(7696005)(6506007)(26005)(478600001)(450100002)(71200400001)(30864003)(66946007)(2906002)(38070700009)(55016003); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: hG7qWfe/fmmjxscqlpb4gPNa+dp7d/xFwPO97GIXxdKyEonNIA9wbJ+Cf3/YLpGQsrRrhjMcGS7XN3gs9cxfUnxaF7ONkbyEHyBp+u9n1uy48rC7VXWt3bFNsXV4+2ZAIABbwWR+bkk79j/quEAvzaFQJpD5LtuZgMQfW+bR9K6721juGZ3wJqTZXnwp+350p/Kc9zGhqhX5rJ5gw0XALt089Yya3/x1jyG7zEc7IAWoPXoU9CYZrIGNmmjoY2wVDrpm8FN3P7DR/CnQDW5n5JKKahihSunqnPRtE8utyyDRNLzX2/XpUMcAk0mlnoOscf8loXMzMmerIB/au6KWuQcn2gj/KZReB3v5io3klmdWbk3WC7ibxqlA3V4/TlW5VbvLNT+IrBebCrsDKAzxi76pnxSO0tHuoYi9haa1WrLgObcNmcsWG8KE5FQzfbDT1wkUIc+Q0k8LPLjhsnBTf/2T1PxyuHe+RTIofWADTFpNaWNCCPkoTswrehPKhNoD7yiERuFfnTH/TPKMkaOwy1IhY3Y5kIdiS29MZaht7OloMIGTZKmnerBbIZWVrxBjOt0Z50MS5Otk3ZV6Lku39JxawgP2Dz4B5GrBNpLUFS3Z2CfKNfG1P2ubbQ148kexQPKVrttiJWApBGz90ZH3M9I6dzP4n7JiZSbqAaupsTxDHmoK4EkKxnRPIHlmV7HVdvqIuvP4gcC6/0LLBiSy5NILxlZ0RiuecF3TccKT45WF0Z7fzucBdFDtc1nP3AKlgxymNXjHy8lCC0pe8KQhh3mQIqBraHXEDZgxLs+12L7tTFwtJ9ZBXIkw51gTql5t2o8Oo0GKk19J/pGhYK17B2Os1oCTuk3cMRu37UXxLwHlf3qT3ZHU3kdWwRLPzfAy2K3Vi2dcdlERNW6kEE8wRm4dxDE4yzEiqSoIVMJcDBEm5Vg2eEVoafqR0EOYNaG9+17KwbVkajwydLgGg5Iifv4j19PkarlqPGhUnAhI7HPW6jQdWs4NzC1CdH61MjDmqIM20sOyR3kKl5617yjPP7cy+H6WD49L9JWurGG77iEhXdfOEROIGzfrNPlXHLwhtusxJ3RlH8hl5198adPGTzys6tSrqDfjLFRFpc8GXwKNjh/M9XlS0Qqhn2nmOF0ZejGm1khsuOKzNPRSkonqsASqfKbwr7SzQbuuMCj6cEhuh/VE0SmO892BzfzX/HK1DgOZcAPh6AF/R7K7E7XgIrKrd83BOV3sxyFbym6aRT7yv9W6xv4HF3091VFeXmmZG043dG70PD2zYAHab5tNJ9fFvUmJ5YtEJq6VjjPODHgriIYioBkcNKesoHsWWE+qgVEs0ftmy6MD5LBE0XJRXeYAxePYTi297ihKRIJ6z4VTojmjFvnJiNNvt8VYgD5ODb0n5LFb+QlgUmLx9PPZsHBSkPnb+mXYcFCXp2OxDuTOwxagASH9NPgHHQE6xW8xNJQia60ZeybPY1l3oxGY9y/JTgKqr5XXBfL5viCrEKtXERAyuEiePckLkoTP8T8mttLXwJNAzhOkxhI9htBA+v4K9ERSLBC3W38y45ELKeGG3Z0smBOwPRhOe9EgSNnq
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: labn.net
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PH7PR14MB5368.namprd14.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 11947b32-7eea-4e79-91af-08dc03431a18
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Dec 2023 23:09:51.4845 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: eb60ac54-2184-4344-9b60-40c8b2b72561
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: DVyfr7wflcN5o7+x96Pss+4qj6YoSQqubi3ebbeGSQNVyyvcEtz8X93/4QXkfSoDTgXaKiIIdkMw4rhnpJCmkw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR14MB5989
Archived-At: <https://mailarchive.ietf.org/arch/msg/detnet/093te6NTsqBvqROj7aIg5pInb6s>
Subject: Re: [Detnet] Last Call: <draft-ietf-detnet-yang-18.txt> (Deterministic Networking (DetNet) YANG Model) to Proposed Standard
X-BeenThere: detnet@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Discussions on Deterministic Networking BoF and Proposed WG <detnet.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/detnet>, <mailto:detnet-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/detnet/>
List-Post: <mailto:detnet@ietf.org>
List-Help: <mailto:detnet-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/detnet>, <mailto:detnet-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 22 Dec 2023 23:10:01 -0000

Hi Florian

See [Don2] Inline for new comments. 

Cheers,
Don 

-----Original Message-----
From: Florian Kauer <florian.kauer@linutronix.de> 
Sent: Friday, December 22, 2023 3:23 PM
To: Don Fedyk <dfedyk@labn.net>; last-call@ietf.org; draft-ietf-detnet-yang@ietf.org
Cc: detnet-chairs@ietf.org; detnet@ietf.org; janos.farkas@ericsson.com; jgs@juniper.net
Subject: Re: [Detnet] Last Call: <draft-ietf-detnet-yang-18.txt> (Deterministic Networking (DetNet) YANG Model) to Proposed Standard

Hi Don,
thanks for your response!
Below I removed everything that looks good and added my comments with [FK].

On 19.12.23 22:19, Don Fedyk wrote:
>       typedef ipsec-spi {
> @@ -1113,6 +1113,79 @@
>           description
>             "The Application flow type choices.";
>           container tsn-app-flow {
> +---
> +fk: In case of a tsn-app-flow, how does the actual encapsulation take place?
> 
> [Don] This is a YANG specification that satisfies the operations in 
> DetNet RFCs Listed in the references.  You can think of it as a 
> configuration for an SDN controller that specifies 
> encapsulation/decapsulation on various nodes/devices along the data 
> path. It is not specifying "how" it is specifying "what" aggregation, disaggregation functions are applied along the data path and which technology is used.
> 
> Also reading through your comments I think there is mis understanding.  
> 
> DetNet is not an any to any encapsulation. It is specifically what is covered in the DetNet architecture to support DetNet encapsulation flows for aggregation or replication.  We have specific type of encapsulations and behaviors that must be specified on ingress. The reverse operations don’t need as much specification because you are removing an outer encapsulation and exposing another header. I will try to see if this point is spelled out in the ID. 

[Don2] There is an egress specification operation for every disaggregation but sometimes is just remove the layer and link to the next layer. 

[FK]: Yes, I agree that the YANG specification document is not the correct place to specify how to implement the encapsulations in detail (for that we have for example RFC 9024 and others). The reason why I raised this in the context of the YANG model is that it makes it obvious how many different options of combining TSN/IP/MPLS/... there are. And there are options that are both reasonable and permitted by the YANG model, but in my opinion not unambiguously covered by any DetNet specification (including TSN over IP over TSN without MPLS).

Again, that is not a weakness of the YANG model, but I am just worried that if we come to an agreement about all combinations we might find something that needs to be added to the YANG model to properly cover that case.


>   
> +
> +For reference, lets look at a few cases and how I have understood them:
> +
> +1. ip-app-flow, nothing MPLS related in service or forwarding sub-layers:
> +   -> Just transmit unmodified packet with new L2 header.
> ++---------------+      +----------+
> +| Payload       |      | Payload  |
> ++---------------+      +----------+
> +|   UDP         |      |   UDP    |
> ++---------------+  ->  +----------+
> +|   IP          |      |   IP     |
> ++---------------+      +----------+
> +| L2 (original) |      | L2 (new) |
> ++---------------+      +----------+
> 
> [Don]  Is this is a DetNet Appflow?  Please see DetNet Architecture RFC 8655 Figure 3. Also Data Plane Framework RFC8938.
> We are only concerned with DetNet.
> 
> The drawing is a bit ambiguous for DetNet.  
> The Payload could be the TSN flow then the IP is a DetNet sub-network and you have a DetNet packet. The L2 is irrelevant.  
> If the whole stack Payload/UDP/IP is a TSN payload then TSN is the subnetwork layer. It would be a TSN application frame in ingress and the SAME frame on egress.    
> 
> The YANG model aggregates (encapsulates) and disaggregates (decapsulates) DetNet packet but it does not change/translate a TSN L2.  The encapsulation layers for DetNet are IP/MPLS not Ethernet L2.   (we don’t specify egress L2 headers we can match L2 ingress headers at the Application interface).  

[FK] Yes, sorry for the confusion! Of course, explicitly changing the L2 header not in the scope of DetNet (and thus the YANG model). I just added the L2 to indicate that the packet can move from one TSN domain to another, while everything L3 related in the packet stays constant.

In this example, the payload was meant to be the actual application payload (like MQTT) and not an encapsulated TSN L2 (that is covered by case 4).

>       
> 
> +
> +2. ip-app-flow, but MPLS label is added:
> +   -> Squeeze in MPLS header.
> ++---------------+      +----------+
> +| Payload       |      | Payload  |
> ++---------------+      +----------+
> +|   UDP         |      |   UDP    |
> ++---------------+  ->  +----------+
> +|   IP          |      |   IP     |
> ++---------------+      +----------+
> +| L2 (original) |      |   MPLS   |
> ++---------------+      +----------+
> +                       | L2 (new) |
> +                       +----------+
> [Don] Again if this is an IP App flow you have this. L2 Not relevant.
> 
> ++---------------+      +----------+
> +| Payload       |      | Payload  |
> ++---------------+      +----------+
> +|   UDP         |      |   UDP    |
> ++---------------+  ->  +----------+
> +|   IP          |      |   IP     |
> ++---------------+      +----------+
>                         |   MPLS   |
>                         +----------+

[FK] Yes, see my comment above regarding L2.
> 
> [Don] Or if it is TSN app flow you have this: 
> 
> ++---------------+      +----------+
> +| Payload       |      | Original |
> ++---------------+      | L2 Frame |
> +|   UDP         |      |          |
> ++---------------+  ->  |          |
> +|   IP          |      |          |
> ++---------------+      |          |
> +| L2 (original) |      |          |
> ++---------------+      +---------------------------+
> +                       | DetNet Service Sublayer|  |
> +                       +---------------------------+
> +                       | DetNet Forwarding Sublayer|  |
> +                       +---------------------------+


[FK] In my classification, TSN app flow is case 4. But anyway, the question I am having for case 4 is how what you denote as "DetNet Service Sublayer" and "DetNet Forwarding Sublayer" specifically looks like in the TSN app flow case (see below).
                        
>  
> 
> +
> +3. mpls-app-flow:
> +   -> Only optionally modify MPLS header
> ++-----------------+      +------------+
> +| Payload         |      | Payload    |
> ++-----------------+      +------------+
> +|   UDP           |      |   UDP      |
> ++-----------------+  ->  +------------+
> +|   IP            |      |   IP       |
> ++-----------------+      +------------+
> +| MPLS (original) |      | MPLS (new) |
> ++-----------------+      +------------+
> +| L2 (original)   |      | L2 (new)   |
> ++-----------------+      +------------+
> 
> 
> [Don] If it is an APP flow it gets encapsulated. We can encapsulate service sub-layer as application layer for example.  This header format could also be a service sub layer and we show examples of changing the labels as a serve sub layer and forwarding layer.   

[FK] Sorry that was depicted ambiguously since I merged all MPLS headers into one. I actually meant:

+-----------------+      +-----------------+
| Payload         |      | Payload         |
+-----------------+      +-----------------+
|   UDP           |      |   UDP           |
+-----------------+  ->  +-----------------+
|   IP            |      |   IP            |
+-----------------+      +-----------------+
| MPLS (original) |      | MPLS (original) |
+-----------------+      +-----------------+
                         | MPLS (new)      |
                         +-----------------+

Is that better this way or did I misinterpret your comment?
[Don2] This is supported by the model.  The New MPLS can be a service sub-layer or a forwarding sub-layer. 

> +
> +4. tsn-app-flow:
> +   -> In order to be able to reconstruct the full original L2 packet, we need
> +      to retain the L2 header. So we need something like:
> +
> ++---------------+      +-----------------+
> +| Payload       |      |    Payload      |
> ++---------------+  ->  +-----------------+
> +| L2 (Original) |      |  L2 (Original)  |
> ++---------------+      +-----------------+
> +                       |      ???        |
> +                       +-----------------+
> +                       |   L2 (new)      |
> +                       +-----------------+
> 
> [Don] This is specified in IEEE TSN.    DetNet uses IP/MPLS as the service sub layer. 

[FK] ??? here is a placeholder for UDP/IP/MPLS headers, sorry that this was not clear.
In RFC 9024 Figure 3 the following two options are depicted (translated into the notation of my mail):

+---------------+      +-----------------+
| Payload       |      |    Payload      |
+---------------+  ->  +-----------------+
| L2 (Original) |      |  L2 (Original)  |
+---------------+      +-----------------+
                       |      MPLS       |
                       +-----------------+
                       |  L2 (new)       |
                       +-----------------+
[Don2] The L2 (new) is not in the YANG but you have a L2 new if you look on the wire.  You are using MPLS as the service sub-layer and forwarding sub-layer. L2 is hop by hop. That’s on purpose we do not specify TSN Ethernet encapsulation as a service/forwarding sub-layer in DetNet YANG. There are TSN config parameters that are specified in the IEEE. A box that supported TSN configuration could specify those parameters. See RFC 9023.  If that box supported that our YANG then you would have a box that did both.  So as far as RFC 9024 figure 3 the L2 case and the TSN case are the same for us.   
See management section of https://datatracker.ietf.org/doc/rfc9023/ Section 5. 

+---------------+      +-----------------+
| Payload       |      |    Payload      |
+---------------+  ->  +-----------------+
| L2 (Original) |      |  L2 (Original)  |
+---------------+      +-----------------+
                       |      MPLS       |
                       +-----------------+
                       |      UDP        |
                       +-----------------+
                       |      IP         |
                       +-----------------+
                       |   L2 (new)      |
                       +-----------------+
[Don2] This stack is supported. (same comment about L2 though)

(L2 can either be TSN or something else, therefore there are three options in RFC 9024 Figure 3.)  

I would expect that at least these two cases could be differentiated via YANG somehow (either in the draft-ietf-detnet-yang or in another model). What do you think?

[Don2] As I recall the service sub-layer and forwarding sub-layer were heavily discussed in the DetNet WG as being IP and/or MPLS. The DetNet architecture shows the layer clearly - we support IP and MPLS - IP tunneling was not in scope - there were no DetNet ID that specified tunneling at least when the effort was undertaken.  DetNet works with TSN both as an application and as a TSN under lay application/service/forwarding layer. In DetNet we only specify the IP/and MPLS for service and forwarding sub-layers because that is DetNet scope. We detailed many combinations with the cases so that people could see the combinations and the WG wanted it captured in the ID.  Our PowerPoint became the SVG and config examples in the appendix.    

But there are certainly some more possibilities like:

+---------------+      +-----------------+
| Payload       |      |    Payload      |
+---------------+  ->  +-----------------+
| L2 (Original) |      |  L2 (Original)  |
+---------------+      +-----------------+
                       |      UDP        |
                       +-----------------+
                       |      IP         |
                       +-----------------+
                       |   L2 (new)      |
                       +-----------------+

But I have not seen that being specified anywhere yet, but it would be one option to realize the "TSN over IP over TSN without MPLS" case.

[Don2] Again nothing in our model to prevent this but the if the L2 is TSN then same comments apply. 


> +I know there are several different ways to realize this, including 
> +just transmitting the L2 packet over MPLS (apparently not IETF
> +standardized?) or several others like L2TPv3 (RFC3931) or VXLAN (RFC
> +7348) if no MPLS labels are to be added (like in case 1 above).
> 
> +
> +I would expect the YANG model (either this or a linked one) to 
> +somehow specify which of these options shall actually be applied. 
> +Otherwise, two DetNet routers might not be able to communicate with 
> +each other, because one might use L2TPv3 and the other one VXLAN. And 
> +also for example in the case of VXLAN, we would need the option to specify a VXLAN Network Identifier.
> 
> [Don] The scope of the YANG does what DetNet documents outline. There is no VXLAN or L2TP3 specified in the DetNet when this applied. 
> The DetNet YANG works by specified the whole path and applying the appropriate encapsulation format at the appropriate places. Yes the encapsulation specified on each device must match just the way SDN controllers specify packet forwarding in several technologies.

[FK] You have convinced me that it does not make sense to hold back the YANG model until someday someone might come along who finds a use case for VXLAN or L2TP3 in DetNet. And there is still the option to specify an extension to the YANG model in that particular spec if needed. 


>               uses data-flow-spec;
>               choice application-type {
>                 description
>                   "This is the application type choices.";
> +---
> +fk: This part is quite confusing to me, especially since it does not directly mirror the ingress since.
> +I guess one reason for that is there could be multiple interfaces that could be selected based on the packet headers?
> +But for the same reason you could also have multiple ingress interfaces.
> [Don]  For Egress the options are different because we get here by decapsulating the service sub-layer. We have either some type of TSN frame (Ethernet) or IP/MPLS but we are basically only associating the flow with an interface at the end of a service sub-layer.  

[FK] So the TSN case is clear to me because in both cases you have zero or one interface (app_flow->ingress->interface and app_flow->egress->ethernet->interface).
[Don2] You can have many interfaces. (see below).

But in the case of IP or MPLS we have still zero or one interface for ingress (app_flow->ingress->interface), but since there can be multiple different next hops for A SINGLE app-flow, we can have multiple interfaces for egress (app_flow->egress->ip-mpls->next_hop*->outgoing_interface).

That means the current model allows to split up A SINGLE app-flow like this:

                                                 +---------------+
                                            ---> | Destination 1 |
+----------+    +---------+    +--------+  /     +---------------+
| Source 1 | -> | Ingress | -> | Egress |--
+----------+    +---------+    +--------+  \     +---------------+
                                            ---> | Destination 2 |
                                                 +---------------+

But not to merge one like this:

+----------+
| Source 1 | --
+----------+   \    +---------+    +--------+    +---------------+
                --> | Ingress | -> | Egress | -> | Destination 1 |
+----------+   /    +---------+    +--------+    +---------------+
| Source 2 | --
+----------+

[Don2]  You can aggregate incoming stream at all layers app/service/forwarding we have examples of that in the appendixes. 

So either we have exactly one source and one destination for an app flow. 
[Don2] I may be missing your point several examples show multiple interfaces. Case A1 in the appendix shows aggregation on multiple interfaces.   

Then why do we have multiple next hops for egress?
[Don2]  You are talking IP?  If the application is IP it is forwarded as IP natively, so we support IP forwarding if the layer is IP.    

 
Or we allow multiple sources and destinations per app flow, then we need to support multiple interfaces at ingress, too. Or do I overlook something?
[Don2] You can have App1 on interface eth0 and App 2 on interface eth1 etc - there are examples e.g. Figure 4. For IP you have wild card IP prefixes as aggregation or multiple Application definitions.  There is an ingress config and egress config per flow direction. 
 

>     /detnet/service/sub-layer/incoming/app-flow: This links applications
>     to services.
> @@ -2608,6 +2713,14 @@
>          |     +--rw operation?            operation
>          |     +--rw incoming
>          |     |  +--rw (incoming)?
> +---
> +fk: One thing I raised before, but it either my comment got lost or i missed the response:
> +Why is there no incoming forwarding sub-layer for the service sub-layer?
> +An app-flow has outgoing service-sub-layer and incoming 
> +service-sub-layer, a forwarding sub-layer has incoming 
> +service-sub-layer and outgoing service-sub-layer, a service sub-layer 
> +has incoming app-flow and outgoing app-flow and it has outgoing forwarding sub-layer, but NO incoming forwarding sub-layer.
> [Don] Sorry I missed your comment before.   
> The operation of Service-sub-layer to forwarding sub-layer is an association of an encapsulation operation. The reverse direction is simply a removal of the forwarding layer and a match in the now exposed service Sub-layer.  Therefore, you do not need the same level of description.

[FK] Yes, but what do I specify as service->sub-layer->incoming for an egress node? Just keep it empty? Especially if no MPLS is involved.

[Don2] Please look at some of examples of aggregation/ disaggregation. Note at egress we call it outgoing service sub-layer service-disaggregation.   Remember there are 2 configs for one each end for a unidirectional flow. Also depending on the example, you may have app->service->forwarding or just app-service or just service->forwarding or just forwarding etc.  It depends on what operations you need.  

For a disaggregation example with 2 interfaces see Figure 23.  There is an aggregated MPLS forwarding sub-layer afl-1 when the label is matched it pops the label and trys matching fsl-1 and fsl-2 --  if fsl-1 is the matched label swap and forward the next label out one interface.  If fsl- 2 matches it swap and forwards out a different interface.  And this logic is used for other disaggregation at other layers. This case is Forwarding sub-layer outgoing forwarding-disaggregation.  

Greetings,
Florian