Skip to content

Commit c8afb9c

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

File tree

3 files changed

+302
-0
lines changed

3 files changed

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

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)