Skip to content

RoCEv2 OTG Model #405

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 57 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
13da9fe
Initial code checkin for RoCEv2
satyamsinghKey Nov 21, 2024
c82ca4f
Update auto generated content
actions-user Nov 26, 2024
713ae02
Correct Description
satyamsinghKey Nov 26, 2024
4448a94
Merge branch 'dev_rocev2' of https://github.com/open-traffic-generato…
satyamsinghKey Nov 26, 2024
838d7bc
Update auto generated content
actions-user Nov 26, 2024
6caf646
Adding RoCEv2 in Control Section
satyamsinghKey Nov 28, 2024
1af5f23
Merge branch 'dev_rocev2' of https://github.com/open-traffic-generato…
satyamsinghKey Nov 28, 2024
facc567
Update auto generated content
actions-user Nov 28, 2024
2c13e2c
Adding code for RoCEv2 statistics
satyamsinghKey Nov 29, 2024
172a2c4
Update auto generated content
actions-user Nov 29, 2024
e119120
Correcting names of RoCEv2
satyamsinghKey Nov 29, 2024
0d02fd4
Merge branch 'dev_rocev2' of https://github.com/open-traffic-generato…
satyamsinghKey Nov 29, 2024
571fb89
Update auto generated content
actions-user Nov 29, 2024
88875f1
change RoCEv2 peer name in stats section
satyamsinghKey Nov 29, 2024
94f1f87
Update auto generated content
actions-user Nov 29, 2024
424d11c
Remove RoCEv2 from control_action
satyamsinghKey Dec 2, 2024
d2af6fb
Update auto generated content
actions-user Dec 2, 2024
fc452b2
Changes based on review feedback
satyamsinghKey Dec 16, 2024
23a0e8d
Update auto generated content
actions-user Dec 16, 2024
b4ed901
Adding description for Flow Settings
satyamsinghKey Dec 16, 2024
5d17bb1
Merge branch 'dev_rocev2' of https://github.com/open-traffic-generato…
satyamsinghKey Dec 16, 2024
4caf28d
Update auto generated content
actions-user Dec 16, 2024
cc52fcd
Adding Remote End Fields
satyamsinghKey Jan 12, 2025
9d9947f
Merge branch 'dev_rocev2' of https://github.com/open-traffic-generato…
satyamsinghKey Jan 12, 2025
aa0eecc
Update auto generated content
actions-user Jan 12, 2025
e650c31
default value correction
satyamsinghKey Jan 29, 2025
1548d44
Update auto generated content
actions-user Jan 29, 2025
ef2d9a1
Correction in default Hex String
satyamsinghKey Jan 29, 2025
fb8d1e9
Update auto generated content
actions-user Jan 29, 2025
f3a8031
Removing commented lines and adding Traffic Parameters in Control Plane
satyamsinghKey Feb 4, 2025
273bb7a
Incorporate review comments
satyamsinghKey Feb 4, 2025
b53029a
Update auto generated content
actions-user Feb 4, 2025
660046c
correct format type
satyamsinghKey Feb 4, 2025
f3f4eb9
Merge branch 'dev_rocev2' of https://github.com/open-traffic-generato…
satyamsinghKey Feb 4, 2025
44ba051
Update auto generated content
actions-user Feb 4, 2025
8950e5c
Add traffic parameters in RoCEv2
satyamsinghKey Feb 6, 2025
a1c088c
Update auto generated content
actions-user Feb 6, 2025
3e2e572
Give default values for enums
satyamsinghKey Feb 6, 2025
c8893ad
Update auto generated content
actions-user Feb 6, 2025
6eeb017
Redesign model
satyamsinghKey Feb 11, 2025
9e7a097
Update auto generated content
actions-user Feb 11, 2025
3e7ce6f
Remove initial_psn
satyamsinghKey Feb 11, 2025
49a265c
Update auto generated content
actions-user Feb 11, 2025
eecad6e
correct traffic burst count uid
satyamsinghKey Feb 11, 2025
2d329c5
Update auto generated content
actions-user Feb 11, 2025
81cb0a6
incorporate review changes
satyamsinghKey Feb 18, 2025
862526e
Update auto generated content
actions-user Feb 18, 2025
a6d3c25
Add RoCEv2 Flow stats
satyamsinghKey Feb 25, 2025
9695955
Update auto generated content
actions-user Feb 25, 2025
4c54115
RoCEv2 Traffic Flow Changes
satyamsinghKey Mar 5, 2025
503c516
Update auto generated content
actions-user Mar 5, 2025
7431f37
correct RoCev2 metric name
satyamsinghKey Mar 5, 2025
2d0df4e
correct metrix name
satyamsinghKey Mar 5, 2025
a2d04ec
correct metric name
satyamsinghKey Mar 5, 2025
4c9b9d4
Update auto generated content
actions-user Mar 5, 2025
fd09afb
Reivew changes
satyamsinghKey Mar 6, 2025
397d0e1
Update auto generated content
actions-user Mar 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions artifacts/openapi.html

Large diffs are not rendered by default.

12,291 changes: 6,811 additions & 5,480 deletions artifacts/openapi.yaml

Large diffs are not rendered by default.

762 changes: 759 additions & 3 deletions artifacts/otg.proto

Large diffs are not rendered by default.

15 changes: 12 additions & 3 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,28 @@ components:
items:
$ref: '../flow/flow.yaml#/components/schemas/Flow'
x-field-uid: 6
stateful_flows:
description: |-
The stateful flows that will be configured for the traffic generator,
for protocols such as Rocev2 where packet rate and/or contents can change dynamically
based on packets received from the connected device.
type: array
items:
$ref: '../flow/stateful_flow.yaml#/components/schemas/StatefulFlow'
x-field-uid: 7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You cannot change x-uids of existing attributes. Please add new attributes to existing objects at the end else it will break clients running tests with older snappi versions.

events:
$ref: '../event/event.yaml#/components/schemas/Event'
x-field-uid: 7
x-field-uid: 8
options:
$ref: '#/components/schemas/Config.Options'
x-field-uid: 8
x-field-uid: 9
lldp:
description: |-
LLDP protocol that will be configured on traffic generator.
type: array
items:
$ref: '../lldp/lldp.yaml#/components/schemas/Lldp'
x-field-uid: 9
x-field-uid: 10
Config.Options:
description: |-
Global configuration options.
Expand Down
49 changes: 48 additions & 1 deletion control/protocol.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -266,4 +266,51 @@ components:
up:
x-field-uid: 1
down:
x-field-uid: 2
x-field-uid: 2
State.Protocol.Rocev2:
description: >-
Sets state of configured Rocev2 peers.
type: object
required:
- choice
properties:
choice:
type: string
x-enum:
peers:
x-field-uid: 1
x-field-uid: 1
peers:
$ref: '#/components/schemas/State.Protocol.Rocev2.Peers'
x-field-uid: 2
State.Protocol.Rocev2.Peers:
description: >-
Sets state of configured Rocev2 peers.
required:
- state
properties:
peer_names:
description: >-
The names of Rocev2 peers for which the state has to be applied.
An empty or null list will control all Rocev2 peers.
type: array
items:
type: string
x-constraint:
- "/components/schemas/Rocev2.V4Peer/properties/name"
- "/components/schemas/Rocev2.V6Peer/properties/name"
x-field-uid: 1
state:
description: >-
The desired state of Rocev2 peer.
If the desired state is 'up', underlying IP interface(s) would be brought up automatically (if not already up),
would attempt to bring up the Rocev2 session(s).
If the desired state is 'down', Rocev2 session(s) would be brought down.
type: string
x-field-uid: 2
x-enum:
up:
x-field-uid: 1
down:
x-field-uid: 2

7 changes: 6 additions & 1 deletion control/state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ components:
x-field-uid: 5
ospfv2:
x-field-uid: 6
rocev2:
x-field-uid: 7
x-field-uid: 1
all:
$ref: './protocol.yaml#/components/schemas/State.Protocol.All'
Expand All @@ -109,4 +111,7 @@ components:
x-field-uid: 6
ospfv2:
$ref: './protocol.yaml#/components/schemas/State.Protocol.Ospfv2'
x-field-uid: 7
x-field-uid: 7
rocev2:
$ref: './protocol.yaml#/components/schemas/State.Protocol.Rocev2'
x-field-uid: 8
5 changes: 5 additions & 0 deletions device/device.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ components:
Configuration for OSPFv2 router.
$ref: './ospfv2/router.yaml#/components/schemas/Device.Ospfv2Router'
x-field-uid: 10
rocev2:
description: >-
Configuration for Rocev2 .
$ref: './rocev2/rocev2.yaml#/components/schemas/Device.Rocev2Peer'
x-field-uid: 11
required: [name]
Protocol.Options:
description: >-
Expand Down
213 changes: 213 additions & 0 deletions device/rocev2/flowsettings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
components:
schemas:
Rocev2.FlowSettings:
description: >-
This configuration allows you to configure RDMA flow over the same QP number from same source and destination.
type: object
properties:
connection_type:
description: >-
There are multiple connection types. Valid values are : Reliable Connection (RC), Reliable Datagram (RD), Extended Reliable Connection (XRC),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the time of this implementation, please consider only RC. So from description excludes other modes. Or, explicitly mention that supported mode is RC.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not applicable for IxN but other test vendors whose configuration will be based on the model

Unreliable Datagram (UD), Unreliable Connection (UC), Raw IPv6 Datagram, Raw Ethertype Datagram.
type: string
x-enum:
reliable_connection:
x-field-uid: 1
reliable_datagram:
x-field-uid: 2
extended_reliable_connection:
x-field-uid: 3
unreliable_datagram:
x-field-uid: 4
unreliable_connection:
x-field-uid: 5
raw_ipv6_datagram:
x-field-uid: 6
raw_ethernet_datagram:
x-field-uid: 7
x-field-uid: 1
source_qp_number:
description: >-
Configure the QP range.
type: integer
format: uint32
default: 2
minimum: 2
maximum: 33554431
x-field-uid: 2
dscp:
description: >-
DSCP value for this flow
type: integer
format: uint32
default: 24
minimum: 0
maximum: 63
x-field-uid: 3
ecn:
description: >-
This field allows to configure bits of the Traffic Class field in the IPv4 or IPv6 header to encode four different code points.
type: integer
format: uint32
default: 1
minimum: 0
maximum: 3
x-field-uid: 4
udp_source_port:
description: >-
UDP source port number for this flow.
type: integer
format: uint32
default: 49152
minimum: 0
maximum: 65535
x-field-uid: 5
rocev2_verb:
description: >-
Rocev2 Verb, Available options are: none, write, wrtie_with_immediate, send, send_with_immediate and read: The corresponding flow will not take part in traffic.
type: string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be a choice. Allows immediate_data to be made visible only for _immediate types. Looks like it is not relevant for the other types.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is correct

default: write
x-enum:
none:
x-field-uid: 1
write:
x-field-uid: 2
write_with_immediate:
x-field-uid: 3
send:
x-field-uid: 4
send_with_immediate:
x-field-uid: 5
read:
x-field-uid: 6
x-field-uid: 6
immediate_data:
description: >-
Immediate Data field required for SEND/WRITE with immediate verb.
type: string
format: hex
default: "00000000"
x-field-uid: 7
message_size:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is message_size part of session bring up or is it needed solely for data flows e.g. could a single QP potentially first send a payload of size 1000 bytes and then another of size 10000 bytes ? In which probably should be somewhere in stateful_flow configuration as properties of the data flow , maybe as an array with ixnetwork supporting a single value only for all flows between same qp endpoints. Or is this specification bound that each qp can have single datagram being split and sent on it ?

description: >-
The Maximum message size that is allowed to transfer depends on the MTU size and the number of VLANs configured on the interfaces.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maximum bytes transferred will depend on IB MTU (not Ethernet MTU). So, given message size will be broken into multiple packets viz. WF, WM, WL etc. based on the IB MTU value. We take IB MTU as an user input also.

type: integer
format: uint32
default: 1
minimum: 0
maximum: 65535
x-field-uid: 8
message_size_unit:
description: >-
Unit of the transfer message size. Available options are Bytes, KB, MB.
type: string
default: MB
x-enum:
Byte:
x-field-uid: 1
KB:
x-field-uid: 2
MB:
x-field-uid: 3
GB:
x-field-uid: 4
x-field-uid: 9
dcqcn_settinga:
$ref: '#/components/schemas/Rocev2.DCQCN'
x-field-uid: 10
Rocev2.DCQCN:
description: |-
Rocev2 DCQCN Settings.
type: object
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we put a choice here with only one choice available : custom_per_session_settings.
Would allow us to allow for choices such as use_port_settings or use_global_settings if needed in future if that is more of a common usecase. [ As of today we do have a global_settings bucket where we could add rocev2.dcqcn but no per_port_settings ]

properties:
alpha_g:
description: |-
Alpha G.
type: integer
format: uint64
x-field-uid: 1
initial_alpha:
description: |-
Initial Alpha.
type: integer
format: uint64
x-field-uid: 2
alpha_update_period:
description: |-
Alpha Update period in microseconds.
type: integer
format: uint64
x-field-uid: 3
rate_reduction_time_period:
description: |-
Rate reduction time period in microseconds.
type: integer
format: uint64
x-field-uid: 4
initial_rate_after_first_cnp:
description: |-
initial rate after first CNP in Percentage.
type: integer
format: uint32
minimum: 0
maximum: 100
x-field-uid: 5
minimum_rate_limmit:
description: |-
Minimum Rate Limit in Percentage.
type: integer
format: uint32
minimum: 0
maximum: 100
x-field-uid: 6
maximum_rate_decrement_at_time:
description: |-
Maximum rate decrement at time in Percentage.
type: integer
format: uint32
minimum: 0
maximum: 100
x-field-uid: 7
clamp_target_rate:
description: |-
Clamp Target rate.
type: boolean
x-field-uid: 8
rate_increment_time:
description: |-
Rate increment time period in microseconds.
type: integer
format: uint64
x-field-uid: 9
rate_increment_byte_counter:
description: |-
Rate increment byte counter in uint 64 bytes.
type: integer
format: uint64
x-field-uid: 10
rate_increment_threshold:
description: |-
Rate increment threshold.
type: integer
format: uint32
minimum: 1
maximum: 31
x-field-uid: 11
additive_increment_rate:
description: |-
additive increment rate in Percentage.
type: integer
format: uint32
minimum: 0
maximum: 100
x-field-uid: 12
hyper_increment_rate:
description: |-
hyper increment rate in Percentage.
type: integer
format: uint32
minimum: 0
maximum: 100
x-field-uid: 13


52 changes: 52 additions & 0 deletions device/rocev2/rocev2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
components:
schemas:
Device.Rocev2Peer:
description: >-
Configuration for one or more IPv4 or IPv6 Rocev2 Peers.
type: object
properties:
ipv4_interfaces:
description: >-
This contains an array of references to IPv4 interfaces, each of which
will have list of peers to different destinations.
type: array
items:
$ref: './rocev2ipv4.yaml#/components/schemas/Rocev2.V4Interface'
x-field-uid: 1
ipv6_interfaces:
description: >-
This contains an array of references to IPv6 interfaces, each of which
will have list of peers to different destinations.
type: array
items:
$ref: './rocev2ipv6.yaml#/components/schemas/Rocev2.V6Interface'
x-field-uid: 2
Device.Rocev2:
description: >-
Configuration for Rocev2 peer settings.
type: object
properties:
num_of_qps:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this ? Isn' this equal to size of flow_settings ( or rdma_flows/sessions ) array

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The size of flow_settings is decided by num_of_qps

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flow settings is an array so number of times user add a new flow setting will define size of the flow settings array not this. Might need discussion.

description: >-
Maximum number of QP per Endpoint.
type: integer
format: uint32
x-field-uid: 1
ib_mtu:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can just move the ib_mtu to v4 and v6 peer and just remove this object. Model is easier to review and maintain. Or call it RoceAttributes and just have ib_mtu in that and refer to that . Dont need flow_settings which can be directly in the b4 / v6 peer.

description: >-
InfiniBand protocol Maximum Transmission Unit (MTU) defines several fix size MTU: 256, 512, 1024, 2048 or 4096 bytes.
RDMA write message will have payload size same as configured IB MTU. You can configure custom size also.
type: integer
default: 1024
format: uint32
minimum: 0
maximum: 14000
x-field-uid: 2
flow_settings:
type: array
description: >-
This configuration allows you to configure RDMA flow over the same QP number from same source and destination.
items:
$ref: './flowsettings.yaml#/components/schemas/Rocev2.FlowSettings'
x-field-uid: 3

Loading