Skip to content

Commit 03fb361

Browse files
Merge pull request #415 from open-traffic-generator/dev2_rocev2
RoCEv2 OTG model
2 parents adb9a97 + abd6517 commit 03fb361

20 files changed

+7467
-3260
lines changed

artifacts/openapi.html

Lines changed: 12 additions & 8 deletions
Large diffs are not rendered by default.

artifacts/openapi.yaml

Lines changed: 4888 additions & 3249 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

artifacts/otg.proto

Lines changed: 1036 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/config.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ components:
6464
items:
6565
$ref: '../lldp/lldp.yaml#/components/schemas/Lldp'
6666
x-field-uid: 9
67+
stateful_flows:
68+
$ref: '../flow/statefulflow.yaml#/components/schemas/StatefulFlow'
69+
x-field-uid: 10
6770
Config.Options:
6871
description: |-
6972
Global configuration options.
@@ -74,4 +77,9 @@ components:
7477
x-field-uid: 1
7578
protocol_options:
7679
$ref: '../device/device.yaml#/components/schemas/Protocol.Options'
77-
x-field-uid: 2
80+
x-field-uid: 2
81+
per_port_options:
82+
type: array
83+
items:
84+
$ref: '../port/perportoptions.yaml#/components/schemas/PerPort.Options'
85+
x-field-uid: 3

control/protocol.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,52 @@ components:
307307
If the desired state is 'down', would bring down OSPFv3 session(s) with respective peer(s).
308308
type: string
309309
x-field-uid: 2
310+
x-enum:
311+
up:
312+
x-field-uid: 1
313+
down:
314+
x-field-uid: 2
315+
State.Protocol.Rocev2:
316+
description: >-
317+
Sets state of configured RoCEv2 peers.
318+
type: object
319+
required:
320+
- choice
321+
properties:
322+
choice:
323+
type: string
324+
x-enum:
325+
peers:
326+
x-field-uid: 1
327+
x-field-uid: 1
328+
peers:
329+
$ref: '#/components/schemas/State.Protocol.Rocev2.Peers'
330+
x-field-uid: 2
331+
State.Protocol.Rocev2.Peers:
332+
description: >-
333+
Sets state of configured RoCEv2 peers.
334+
required:
335+
- state
336+
properties:
337+
peer_names:
338+
description: >-
339+
The names of RoCEv2 peers for which the state has to be applied.
340+
An empty or null list will control all RoCEv2 peers.
341+
type: array
342+
items:
343+
type: string
344+
x-constraint:
345+
- "/components/schemas/Rocev2.V4Peer/properties/name"
346+
- "/components/schemas/Rocev2.V6Peer/properties/name"
347+
x-field-uid: 1
348+
state:
349+
description: >-
350+
The desired state of RoCEv2 peer.
351+
If the desired state is 'up', underlying IP interface(s) would be brought up automatically (if not already up),
352+
would attempt to bring up the RoCEv2 session(s).
353+
If the desired state is 'down', RoCEv2 session(s) would be brought down.
354+
type: string
355+
x-field-uid: 2
310356
x-enum:
311357
up:
312358
x-field-uid: 1

control/state.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,7 @@ components:
114114
x-field-uid: 7
115115
ospfv3:
116116
$ref: './protocol.yaml#/components/schemas/State.Protocol.Ospfv3'
117-
x-field-uid: 8
117+
x-field-uid: 8
118+
rocev2:
119+
$ref: './protocol.yaml#/components/schemas/State.Protocol.Rocev2'
120+
x-field-uid: 9

device/device.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ components:
8787
Configuration for OSPFv3 router.
8888
$ref: './ospfv3/router.yaml#/components/schemas/Device.Ospfv3Router'
8989
x-field-uid: 12
90+
rocev2:
91+
description: >-
92+
Configuration for RoCEv2.
93+
$ref: './rocev2/rocev2.yaml#/components/schemas/Device.Rocev2Peer'
94+
x-field-uid: 13
9095
required: [name]
9196
Protocol.Options:
9297
description: >-

device/rocev2/qps.yaml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
components:
2+
schemas:
3+
Rocev2.QPs:
4+
description: >-
5+
This allows the user to set QP properties between a particular source and destination.
6+
type: object
7+
required: [qp_name]
8+
properties:
9+
qp_name:
10+
description: |-
11+
Name of each QP.
12+
x-include: ../../common/common.yaml#/components/schemas/Named.Object/properties/name
13+
x-field-uid: 1
14+
connection_type:
15+
$ref : '#/components/schemas/Rocev2.ConnectionType'
16+
x-field-uid: 2
17+
Rocev2.ConnectionType:
18+
description: >-
19+
Specifies the connection type for the QP, determining what and how the QP transfers data.
20+
type: object
21+
properties:
22+
choice:
23+
type: string
24+
default: reliable_connection
25+
x-enum:
26+
reliable_connection:
27+
x-field-uid: 1
28+
x-field-uid: 1
29+
reliable_connection:
30+
$ref: '#/components/schemas/Rocev2.QPParameters'
31+
x-field-uid: 2
32+
Rocev2.QPParameters:
33+
description: |-
34+
Defines the parameters for configuring a RoCEv2 QP.
35+
type: object
36+
properties:
37+
source_qp_number:
38+
description: >-
39+
Configure Source QP number which initiates the RDMA operation.
40+
type: integer
41+
format: uint32
42+
default: 2
43+
minimum: 2
44+
maximum: 33554431
45+
x-field-uid: 1
46+
dscp:
47+
description: >-
48+
DSCP value for the RDMA data packets.
49+
type: integer
50+
format: uint32
51+
default: 24
52+
minimum: 0
53+
maximum: 63
54+
x-field-uid: 2
55+
ecn:
56+
description: >-
57+
This field allows to configure bits of the Traffic Class field in the IPv4 or IPv6 header to encode four different code points.
58+
Those are non_ect, ect_1, ect_0 and ce. non_ect quivalent is 00, ect_1 represent 01, ect_0 represent 10 and ce means 11.
59+
type: string
60+
default: ect_1
61+
x-enum:
62+
non_ect:
63+
x-field-uid: 1
64+
ect_1:
65+
x-field-uid: 2
66+
ect_0:
67+
x-field-uid: 3
68+
ce:
69+
x-field-uid: 4
70+
x-field-uid: 3
71+
udp_source_port:
72+
description: >-
73+
UDP source port number for this QP.
74+
type: integer
75+
format: uint32
76+
default: 49152
77+
minimum: 0
78+
maximum: 65535
79+
x-field-uid: 4
80+
initial_psn:
81+
description: >-
82+
Initial packet sequence number of the data transfer packet generated for this QP.
83+
type: integer
84+
format: uint64
85+
default: 0
86+
minimum: 0
87+
maximum: 33554431
88+
x-field-uid: 5
89+
virtual_address:
90+
description: >-
91+
Virtual Address where the data transfer from the remote QP will write to.
92+
type: string
93+
format: hex
94+
default: "0000000000000000"
95+
maxLength: 16
96+
x-field-uid: 6
97+
remote_key:
98+
description: >-
99+
Remote Key linked to the QP's virtual address.
100+
type: string
101+
format: hex
102+
default: "00000000"
103+
maxLength: 8
104+
x-field-uid: 7
105+
106+

device/rocev2/rocev2.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
components:
2+
schemas:
3+
Device.Rocev2Peer:
4+
description: >-
5+
Configuration for one or more IPv4 or IPv6 RoCEv2 Peers.
6+
type: object
7+
properties:
8+
ipv4_interfaces:
9+
description: >-
10+
This contains an array of references to IPv4 interfaces, each having a list of IPv4 peers to various destinations.
11+
type: array
12+
items:
13+
$ref: './rocev2ipv4.yaml#/components/schemas/Rocev2.V4Interface'
14+
x-field-uid: 1
15+
ipv6_interfaces:
16+
description: >-
17+
This contains an array references to IPv6 interfaces, each with a list of IPv6 peers for various destinations.
18+
type: array
19+
items:
20+
$ref: './rocev2ipv6.yaml#/components/schemas/Rocev2.V6Interface'
21+
x-field-uid: 2

device/rocev2/rocev2ipv4.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
components:
2+
schemas:
3+
Rocev2.V4Interface:
4+
description: >-
5+
This contains an array of references to IPv4 interfaces, each having a list of IPv4 peers to various destinations.
6+
type: object
7+
required: [ipv4_name]
8+
properties:
9+
ipv4_name:
10+
description: >-
11+
The unique name of the IPv4 interface, used as the source IP for this list of RoCEv2 peers.
12+
type: string
13+
x-constraint:
14+
- '/components/schemas/Device.Ipv4/properties/name'
15+
x-field-uid: 1
16+
ib_mtu:
17+
description: >-
18+
The InfiniBand protocol defines several fixed sizes for the Maximum Transmission Unit (IB MTU): 256, 512, 1024, 2048, or 4096 bytes.
19+
RDMA messages will have a payload size that corresponds to the configured IB MTU.
20+
Additionally, it is possible to configure a custom size.
21+
type: integer
22+
default: 1024
23+
format: uint32
24+
minimum: 0
25+
maximum: 14000
26+
x-field-uid: 2
27+
peers:
28+
description: >-
29+
This contains the list of RoCEv2 peers configured on this interface.
30+
type: array
31+
items:
32+
$ref: './rocev2ipv4.yaml#/components/schemas/Rocev2.V4Peer'
33+
x-field-uid: 3
34+
Rocev2.V4Peer:
35+
description: >-
36+
Configuration for RoCEv2 IPv4 peers.
37+
type: object
38+
required: [name, destination_ip_address]
39+
properties:
40+
name:
41+
x-include: ../../common/common.yaml#/components/schemas/Named.Object/properties/name
42+
x-field-uid: 1
43+
destination_ip_address:
44+
description: |-
45+
Specify the destination ip address.
46+
type: string
47+
format: ipv4
48+
x-field-uid: 2
49+
qps:
50+
type: array
51+
description: >-
52+
This allows the user to set multiple QPs and its properties between a pair of source and destination RoCEv2 devices.
53+
items:
54+
$ref: './qps.yaml#/components/schemas/Rocev2.QPs'
55+
x-field-uid: 3

device/rocev2/rocev2ipv6.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
components:
2+
schemas:
3+
Rocev2.V6Interface:
4+
description: >-
5+
This contains an array of references to IPv6 interfaces, each having a list of IPv6 peers to various destinations.
6+
type: object
7+
required: [ipv6_name]
8+
properties:
9+
ipv6_name:
10+
description: >-
11+
The unique name of IPv6 used as the source IP for this list of RoCEv2 peers.
12+
type: string
13+
x-constraint:
14+
- '/components/schemas/Device.Ipv6/properties/name'
15+
x-field-uid: 1
16+
ib_mtu:
17+
description: >-
18+
The InfiniBand protocol defines several fixed sizes for the Maximum Transmission Unit (IB MTU): 256, 512, 1024, 2048, or 4096 bytes.
19+
RDMA messages will have a payload size that corresponds to the configured IB MTU.
20+
Additionally, it is possible to configure a custom size.
21+
type: integer
22+
default: 1024
23+
format: uint32
24+
minimum: 0
25+
maximum: 14000
26+
x-field-uid: 2
27+
peers:
28+
description: >-
29+
This contains the list of RoCEv2 IPv6 peers configured on this interface.
30+
type: array
31+
items:
32+
$ref: './rocev2ipv6.yaml#/components/schemas/Rocev2.V6Peer'
33+
x-field-uid: 3
34+
Rocev2.V6Peer:
35+
description: >-
36+
Configuration for RoCEv2 IPv6 peer settings.
37+
type: object
38+
required: [name, destination_ip_address]
39+
properties:
40+
name:
41+
x-include: ../../common/common.yaml#/components/schemas/Named.Object/properties/name
42+
x-field-uid: 1
43+
destination_ip_address:
44+
description: |-
45+
Specify the destination ip address.
46+
type: string
47+
format: ipv6
48+
x-field-uid: 2
49+
qps:
50+
type: array
51+
description: >-
52+
This allows the user to set multiple QPs and its properties between a pair of source and destination RoCEv2 devices.
53+
items:
54+
$ref: './qps.yaml#/components/schemas/Rocev2.QPs'
55+
x-field-uid: 3
56+
57+
58+

0 commit comments

Comments
 (0)