Skip to content

Commit d24688e

Browse files
committed
DetNet Ingress
Signed-off-by: Florian Kauer <florian.kauer@linutronix.de>
1 parent cf5b108 commit d24688e

File tree

3 files changed

+301
-0
lines changed

3 files changed

+301
-0
lines changed

detnet/detnet-tests.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-FileCopyrightText: 2024 Linutronix GmbH
2+
# SPDX-License-Identifier: 0BSD
3+
4+
tests:
5+
- name: DetNet Ingress
6+
models:
7+
- file: ./models/standard/ietf/RFC/ietf-interfaces.yang
8+
features: []
9+
- file: ./models/standard/ieee/published/802.1/ieee802-dot1q-types.yang
10+
- file: ./models/experimental/ietf-extracted-YANG-modules/ietf-detnet@2024-02-21.yang # TODO upload proper RFC version
11+
- file: ./models/standard/ieee/published/802/ieee802-types.yang
12+
- file: ./models/standard/ieee/published/802.1/ieee802-dot1cb-stream-identification.yang
13+
- file: ./models/standard/iana/iana-if-type@2023-01-26.yang
14+
- file: ./qcw/sched/ieee802-dot1q-sched@2024-10-22.yang # TODO upload proper Qrev version
15+
- file: ./models/standard/ieee/published/802.1/ieee802-dot1q-sched-bridge.yang
16+
- file: ./models/standard/ieee/published/802.1/ieee802-dot1q-bridge.yang
17+
- file: ./models/standard/ieee/published/1588/ieee1588-ptp-tt.yang
18+
instance: ./detnet/ingress.json
19+
type: config
20+
expect_success: true

detnet/ingress.json

Lines changed: 279 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,279 @@
1+
{
2+
"ietf-detnet:detnet": {
3+
"app-flows": {
4+
"app-flow": [
5+
{
6+
"name": "app-rtvideo",
7+
"ingress": {
8+
"interface": ["enp86s0"],
9+
"tsn-app-flow": {
10+
"destination-mac-address": "82:ac:6e:1a:a3:58",
11+
"vlan-id": 10
12+
}
13+
}
14+
}
15+
]
16+
},
17+
"service": {
18+
"sub-layer": [
19+
{
20+
"name": "ssl-rtvideo",
21+
"operation": "initiation",
22+
"service-protection": {
23+
"protection": "replication",
24+
"sequence-number-length": "long-sn"
25+
},
26+
"incoming": {
27+
"app-flow": {
28+
"flow": [
29+
"app-rtvideo"
30+
]
31+
}
32+
},
33+
"outgoing": {
34+
"forwarding-sub-layer": {
35+
"service-outgoing": [
36+
{
37+
"index": 0,
38+
"mpls-label-stack": {
39+
"entry": [
40+
{
41+
"id": 0,
42+
"label": 555
43+
}
44+
]
45+
},
46+
"sub-layer": [
47+
"fsl-rtvideo-A",
48+
"fsl-rtvideo-B"
49+
]
50+
}
51+
]
52+
}
53+
}
54+
}
55+
]
56+
},
57+
"forwarding": {
58+
"sub-layer": [
59+
{
60+
"name": "fsl-rtvideo-A",
61+
"operation": "forward",
62+
"outgoing": {
63+
"interface": {
64+
"src-ip-address": "fd02:5cb3:dba1::1",
65+
"dest-ip-address": "fd02:5cb3:dba1::3",
66+
"source-port": 49001,
67+
"next-hop-address": "fd02:5cb3:dba1::3",
68+
"outgoing-interface": "ilan0"
69+
}
70+
}
71+
},
72+
{
73+
"name": "fsl-rtvideo-B",
74+
"operation": "forward",
75+
"outgoing": {
76+
"interface": {
77+
"src-ip-address": "fd02:5cb3:dba1::2",
78+
"dest-ip-address": "fd02:5cb3:dba1::4",
79+
"source-port": 49002,
80+
"next-hop-address": "fd02:5cb3:dba1::4",
81+
"outgoing-interface": "ilan0"
82+
}
83+
}
84+
}
85+
]
86+
}
87+
},
88+
"ieee802-dot1cb-stream-identification:stream-identity": [
89+
{
90+
"index": 0,
91+
"handle": 1,
92+
"in-facing": {
93+
"input-port": [
94+
"ilan0"
95+
]
96+
},
97+
"ip-stream-identification": {
98+
"ip-source": "fd02:5cb3:dba1::1",
99+
"ip-destination": "fd02:5cb3:dba1::3",
100+
"next-protocol": "udp",
101+
"destination-port": 49001
102+
}
103+
},
104+
{
105+
"index": 1,
106+
"handle": 1,
107+
"out-facing": {
108+
"output-port": [
109+
"enp86s1"
110+
]
111+
},
112+
"dmac-vlan-stream-identification": {
113+
"down": {
114+
"destination-mac": "48-21-0b-56-de-92",
115+
"vlan": 1,
116+
"priority": 7
117+
}
118+
}
119+
},
120+
{
121+
"index": 2,
122+
"handle": 2,
123+
"in-facing": {
124+
"input-port": [
125+
"ilan0"
126+
]
127+
},
128+
"ip-stream-identification": {
129+
"ip-source": "fd02:5cb3:dba1::2",
130+
"ip-destination": "fd02:5cb3:dba1::4",
131+
"next-protocol": "udp",
132+
"destination-port": 49002
133+
}
134+
},
135+
{
136+
"index": 4,
137+
"handle": 2,
138+
"out-facing": {
139+
"output-port": [
140+
"enp86s2"
141+
]
142+
},
143+
"dmac-vlan-stream-identification": {
144+
"down": {
145+
"destination-mac": "48-21-0b-3e-31-ce",
146+
"vlan": 1,
147+
"priority": 7
148+
}
149+
}
150+
}
151+
],
152+
"ietf-interfaces:interfaces": {
153+
"interface": [
154+
{
155+
"name": "enp86s0",
156+
"type": "iana-if-type:ethernetCsmacd"
157+
},
158+
{
159+
"name": "enp86s1",
160+
"type": "iana-if-type:ethernetCsmacd",
161+
"ieee802-dot1q-bridge:bridge-port": {
162+
"traffic-class": {
163+
"traffic-class-table": {
164+
"number-of-traffic-classes": 4,
165+
"priority0": 0,
166+
"priority1": 0,
167+
"priority2": 1,
168+
"priority3": 1,
169+
"priority4": 2,
170+
"priority5": 2,
171+
"priority6": 3,
172+
"priority7": 3
173+
}
174+
},
175+
"ieee802-dot1q-sched-bridge:gate-parameter-table": {
176+
"admin-control-list": {
177+
"gate-control-entry": [
178+
{
179+
"index": 0,
180+
"operation-name": "ieee802-dot1q-sched:set-gate-states",
181+
"time-interval-value": 7000000,
182+
"gate-states-value": 3
183+
},
184+
{
185+
"index": 1,
186+
"operation-name": "ieee802-dot1q-sched:set-gate-states",
187+
"time-interval-value": 10000000,
188+
"gate-states-value": 0
189+
},
190+
{
191+
"index": 2,
192+
"operation-name": "ieee802-dot1q-sched:set-gate-states",
193+
"time-interval-value": 3000000,
194+
"gate-states-value": 1
195+
}
196+
]
197+
}
198+
}
199+
}
200+
},
201+
{
202+
"name": "enp86s2",
203+
"type": "iana-if-type:ethernetCsmacd",
204+
"ieee802-dot1q-bridge:bridge-port": {
205+
"traffic-class": {
206+
"traffic-class-table": {
207+
"number-of-traffic-classes": 4,
208+
"priority0": 0,
209+
"priority1": 0,
210+
"priority2": 1,
211+
"priority3": 1,
212+
"priority4": 2,
213+
"priority5": 2,
214+
"priority6": 3,
215+
"priority7": 3
216+
}
217+
},
218+
"ieee802-dot1q-sched-bridge:gate-parameter-table": {
219+
"admin-control-list": {
220+
"gate-control-entry": [
221+
{
222+
"index": 0,
223+
"operation-name": "ieee802-dot1q-sched:set-gate-states",
224+
"time-interval-value": 7000000,
225+
"gate-states-value": 8
226+
},
227+
{
228+
"index": 1,
229+
"operation-name": "ieee802-dot1q-sched:set-gate-states",
230+
"time-interval-value": 10000000,
231+
"gate-states-value": 1
232+
},
233+
{
234+
"index": 2,
235+
"operation-name": "ieee802-dot1q-sched:set-gate-states",
236+
"time-interval-value": 3000000,
237+
"gate-states-value": 2
238+
}
239+
]
240+
}
241+
}
242+
}
243+
},
244+
{
245+
"name": "ilan0",
246+
"type": "iana-if-type:ilan"
247+
}
248+
]
249+
},
250+
"ieee1588-ptp-tt:ptp": {
251+
"instances": {
252+
"instance": [
253+
{
254+
"instance-index": 1,
255+
"default-ds": {
256+
"clock-quality": {
257+
"clock-class": "ieee1588-ptp-tt:cc-default",
258+
"clock-accuracy": "ieee1588-ptp-tt:ca-time-accurate-to-gt-10-s",
259+
"offset-scaled-log-variance": 65535
260+
},
261+
"domain-number": 0,
262+
"sdo-id": 256
263+
},
264+
"time-properties-ds": {
265+
"current-utc-offset": 37,
266+
"current-utc-offset-valid": true,
267+
"leap59": false,
268+
"leap61": false,
269+
"time-traceable": true,
270+
"frequency-traceable": false,
271+
"ptp-timescale": true,
272+
"time-source": "ieee1588-ptp-tt:internal-oscillator"
273+
}
274+
}
275+
]
276+
}
277+
}
278+
}
279+

detnet/ingress.json.license

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SPDX-FileCopyrightText: 2024 Linutronix GmbH
2+
SPDX-License-Identifier: 0BSD

0 commit comments

Comments
 (0)