-
Notifications
You must be signed in to change notification settings - Fork 1k
Add packet trimming test cases #18051
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 all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1487,6 +1487,26 @@ def get_vlan_from_port(duthost, member_port): | |
| return vlan_name | ||
|
|
||
|
|
||
| def configure_packet_aging(duthost, disabled=True): | ||
| """ | ||
| For Nvidia(Mellanox) platforms, packets in buffer will be aged after a timeout. | ||
| This function can enable or disable packet aging feature. | ||
|
|
||
| Args: | ||
| duthost: DUT host object | ||
| disabled: True to disable packet aging, False to enable packet aging | ||
| """ | ||
| logger.info("Starting configure packet aging") | ||
| asic = duthost.get_asic_name() | ||
| if 'spc' in asic: | ||
|
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. add a else case logging like
Contributor
Author
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.
Sure, I will update it |
||
| action = "disable" if disabled else "enable" | ||
| logger.info(f"{action.capitalize()} Mellanox packet aging") | ||
| duthost.copy(src="qos/files/mellanox/packets_aging.py", dest="/tmp") | ||
| duthost.command("docker cp /tmp/packets_aging.py syncd:/") | ||
| duthost.command(f"docker exec syncd python /packets_aging.py {action}") | ||
| duthost.command("docker exec syncd rm -rf /packets_aging.py") | ||
|
|
||
|
|
||
| def cleanup_prev_images(duthost): | ||
| logger.info("Cleaning up previously installed images on DUT") | ||
| current_os_version = duthost.shell('sonic_installer list | grep Current | cut -f2 -d " "')['stdout'] | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
function signature is changing - pls make sure this does not cause regression
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I check the code,
downstream_linksis called as a fixture, so the change will not affect other case