Skip to content

Frame ordering mode#482

Open
indraniBh wants to merge 9 commits into
masterfrom
dev-frame-ordering
Open

Frame ordering mode#482
indraniBh wants to merge 9 commits into
masterfrom
dev-frame-ordering

Conversation

@indraniBh

Copy link
Copy Markdown
Contributor

Feature Overview

  • Brief Description:
    Support frame ordering mode in port options.
    Currently supported modes are no_ordering (default) and rfc2889.
    no_ordering -> If this options is selected, no specific ordering is followed when packets are transmitted.
    rfc2889-> If you select this option, the frame ordering mode is done by RFC2889.

Feature Details


Code snippets

   config = api.config()
    # Add two TX ports and one RX port to demonstrate multi-source round-robin ordering
    tx1 = config.ports.add(name="tx1", location="localhost:5555;1;1")
    tx2 = config.ports.add(name="tx2", location="localhost:5555;1;2")
    rx = config.ports.add(name="rx", location="localhost:5555;1;3")

    # -----------------------------------------------------------------
    # Configure Port Options: enable RFC2889 frame ordering mode
    # This applies globally across all configured ports.
    # -----------------------------------------------------------------
    frame_ordering_mode = config.options.frame_ordering_mode
    frame_ordering_mode.choice = frame_ordering_mode.RFC2889

    # Optionally enable data integrity check alongside frame ordering
    config.options.data_integrity = True

    # -----------------------------------------------------------------
    # Flow 1: tx1 -> rx
    # -----------------------------------------------------------------
    flow1 = config.flows.add(name="flow_tx1_to_rx")
    flow1.tx_rx.port.tx_name = tx1.name
    flow1.tx_rx.port.rx_name = rx.name
    flow1.metrics.enable = True

    flow1.duration.fixed_packets.packets = 1000
    flow1.rate.pps = 500
    flow1.size.fixed = 256

    eth1, ip1, udp1 = flow1.packet.ethernet().ipv4().udp()
    eth1.src.value = "00:00:01:00:00:01"
    eth1.dst.value = "00:00:03:00:00:01"
    ip1.src.value = "10.0.1.1"
    ip1.dst.value = "10.0.3.1"
    udp1.src_port.value = 5001
    udp1.dst_port.value = 6001

    # -----------------------------------------------------------------
    # Flow 2: tx2 -> rx  (simultaneous stream; RFC2889 ordering prevents overload)
    # -----------------------------------------------------------------
    flow2 = config.flows.add(name="flow_tx2_to_rx")
    flow2.tx_rx.port.tx_name = tx2.name
    flow2.tx_rx.port.rx_name = rx.name
    flow2.metrics.enable = True

    flow2.duration.fixed_packets.packets = 1000
    flow2.rate.pps = 500
    flow2.size.fixed = 256

    eth2, ip2, udp2 = flow2.packet.ethernet().ipv4().udp()
    eth2.src.value = "00:00:02:00:00:01"
    eth2.dst.value = "00:00:03:00:00:01"
    ip2.src.value = "10.0.2.1"
    ip2.dst.value = "10.0.3.1"
    udp2.src_port.value = 5002
    udp2.dst_port.value = 6002

    return config

@indraniBh indraniBh changed the title Dev frame ordering Frame ordering mode Jun 19, 2026

@apratimmukherjee apratimmukherjee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me. Would suggest to ensure that per enum description is visible in redoci ( might need to duplicate the documentation per enum at the object level )

Comment thread port/port.yaml
x-field-uid: 1
x-enum:
no_ordering:
description: >-

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we also add the enum descriptions to the object documentation. As is now, the documentation matches what I expect but is not visible in redocli at all.

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.

3 participants