Traffic shaping - #14154
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements traffic shaping functionality for Ethernet configuration by adding MTU and transmission delay parameters. The changes upgrade the Ethernet configuration from version 3 to version 4 with new configurable fields for network traffic control.
- Adds MTU (Maximum Transmission Unit) and transmission delay parameters to Ethernet configuration
- Upgrades configuration format from v3 to v4 with backward compatibility
- Implements validation logic for the new parameters with appropriate constraints
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| rs-dds-config.cpp | Adds command-line arguments for MTU and transmission delay with configuration handling |
| eth-config.h | Updates structure to include transmission_delay field and adds v4 configuration support |
| eth-config.cpp | Implements v4 configuration handling, validation logic, and operator equality updates |
| eth-config-v4.h | Defines new v4 configuration structure with transmission_delay and reserved fields |
| dds-model.cpp | Updates UI to include traffic shaping controls and improves error handling |
Comments suppressed due to low confidence (1)
tools/dds/dds-config/rs-dds-config.cpp:191
- [nitpick] The variable name 'trans_delay_arg' uses an abbreviation. Consider using the full name 'transmission_delay_arg' for consistency with the parameter name.
cli::value< uint16_t > trans_delay_arg( "transmission-delay", "microseconds", 0, "Wait this much after each packet is sent before sending next one" );
OhadMeir
force-pushed
the
traffic_shaping
branch
4 times, most recently
from
July 22, 2025 18:03
c8f37cb to
b78914c
Compare
Nir-Az
reviewed
Jul 23, 2025
| _changed_config.link.mtu = static_cast< uint32_t >( temp_mtu ); | ||
| } | ||
|
|
||
| ImGui::Text( "Transmission Delay" ); |
Nir-Az
reviewed
Jul 23, 2025
Nir-Az
reviewed
Jul 23, 2025
| , transmission_delay( 0 ) | ||
| { | ||
| if( header.version != 3 ) | ||
| throw std::runtime_error( "eth-config expecting version 3" ); |
Collaborator
There was a problem hiding this comment.
Lets add got header.version value
Nir-Az
reviewed
Jul 23, 2025
| , transmission_delay( v4.transmission_delay ) | ||
| { | ||
| if( header.version != 4 ) | ||
| throw std::runtime_error( "eth-config expecting version 4" ); |
Nir-Az
reviewed
Jul 23, 2025
Nir-Az
reviewed
Jul 23, 2025
| cli::value< std::string > dhcp_arg( "dhcp", "on/off", "on", "DHCP dynamic IP discovery 'on' or 'off'" ); | ||
| cli::value< uint32_t > dhcp_timeout_arg( "dhcp-timeout", "seconds", 30, "Seconds before DHCP times out and falls back to a static IP" ); | ||
| cli::value< uint32_t > link_timeout_arg( "link-timeout", "milliseconds", 4000, "Milliseconds before --eth-first link times out and falls back to USB" ); | ||
| cli::value< uint32_t > mtu_arg( "mtu", "bytes", 9000, "Size per Ethernet packet" ); |
Collaborator
There was a problem hiding this comment.
Please add value restrictions like jumps of 500 and divided by 3..
Nir-Az
reviewed
Jul 23, 2025
OhadMeir
force-pushed
the
traffic_shaping
branch
from
July 23, 2025 11:58
b78914c to
4833ba6
Compare
Nir-Az
approved these changes
Jul 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracked on [RSDEV-3644]