-
Notifications
You must be signed in to change notification settings - Fork 1k
[snappi]:Change ipv4 to random-src-port udp traffic. #14029
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
Changes from 2 commits
9485816
09588a9
8b35017
6ce9dff
407bfed
4bdbb53
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It would be good to have a random int between let's say (5000,6000) and have (PRIO+1) as multiplier so that each priority stream would have different source-destination port ranges. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| import time | ||
| from math import ceil | ||
| import logging | ||
| import random | ||
|
|
||
| from tests.common.helpers.assertions import pytest_assert | ||
| from tests.common.fixtures.conn_graph_facts import conn_graph_facts, fanout_graph_facts # noqa: F401 | ||
|
|
@@ -304,7 +305,12 @@ def __gen_traffic(testbed_config, | |
| data_flow.tx_rx.port.tx_name = tx_port_name | ||
| data_flow.tx_rx.port.rx_name = rx_port_name | ||
|
|
||
| eth, ipv4 = data_flow.packet.ethernet().ipv4() | ||
| eth, ipv4, udp = data_flow.packet.ethernet().ipv4().udp() | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems only packet-chassis will be affected by the backplane issue. Should we use an if..else.. to show it's platform specific behavior? |
||
| src_port = random.randint(5000, 6000) | ||
| udp.src_port.increment.start = src_port | ||
| udp.src_port.increment.step = 1 | ||
| udp.src_port.increment.count = 1 | ||
|
|
||
| eth.src.value = tx_mac | ||
| eth.dst.value = rx_mac | ||
| if pfcQueueGroupSize == 8: | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.