Skip to content
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

RoCEv2 OTG Model #405

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open

RoCEv2 OTG Model #405

wants to merge 45 commits into from

Conversation

satyamsinghKey
Copy link
Collaborator

Issue: #403

Redocly View:
https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/open-traffic-generator/models/dev_rocev2/artifacts/openapi.yaml&nocors#tag/Configuration/operation/set_config

Objectives:
Add support of RoCEv2 Protocol in OTG model
Added fields under Configuration and Monitor

Sample Code Snippet:

    config = api.config()
    (device,) = config.devices.device(name="device")

    # device config
    eth = device.ethernets.add()
    eth.name = "eth"
    eth.connection.port_name = port.name
    eth.mac = "00:00:00:00:00:11"
    ipv4 = eth.ipv4_addresses.add()
    ipv4.name = "ipv4"
    ipv4.address = "21.1.1.1"
    ipv4.prefix = 24
    ipv4.gateway = "21.1.1.2"

    rocev2v4 = device.rocev2
    rocev2v4_int = rocev2v4.ipv4_interfaces.add()
    rocev2v4_int.ipv4_name = ipv4.name
    rocev2v4_peer = rocev2v4_int.peers.add()
    rocev2v4_peer.name = "RoCEv2 1"
    rocev2v4_peer.num_of_qps = 2
    rocev2v4_peer.remote_end_point_ip_address = "2.2.2.2"
    rocev2v4_peer.ib_mtu = 15
    flow_settings = rocev2v4_peer.flow_settings.add()
    flow_settings.dscp = 25


    # push configuration
    api.set_config(config)

    # start all protocols
    control_state = api.control_state()
    control_state.protocol.all.state = control_state.protocol.all.START
    api.set_control_state(control_state)

    # create a query for rocev2 metrics
    req = api.metrics_request()
    req.rocev2.peer_names = ["RoCEv2 1"]
    results = api.get_metrics(req)

satyamsinghKey and others added 30 commits November 21, 2024 20:49
@satyamsinghKey satyamsinghKey changed the title Dev rocev2 RoCEv2 OTG Model Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants