-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[image_config]: Enable Receive Packet Steering (RPS) #20211
Conversation
c4a780a
to
982a451
Compare
ea3735f
to
0ec856b
Compare
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
0ec856b
to
eeb135f
Compare
* This patch enables Receive Packet Steering (RPS) which helps to distribute softirq processing for CPU bound packets to all available cores. This will help prevent kernel packet drops when there are bouts of intense CPU bound packets. Ref: https://lwn.net/Articles/362339/ https://docs.kernel.org/networking/scaling.html Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
eeb135f
to
336e4d0
Compare
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
Make sure the script is run only once per interface Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
num_rx_queues = len([q for q in queues if q.startswith("rx")]) | ||
for q in range(num_rx_queues): | ||
rps_cpus_path = os.path.join(queues_path, "rx-{}", "rps_cpus").format(q) | ||
with open(rps_cpus_path, 'w') as file: |
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.
Capture any system failures to open or to write the values to the file?
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.
configure_rps is called within a try block and all exceptions/failures are caught and logged in main()
sys.exit(rv) | ||
|
||
|
||
if __name__ == "__main__": |
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.
Could you check warmboot with old image and new image and also sudo config reload scenarios.
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.
This shouldn't affect any boot sequence as these are kernel changes, but better to validate and capture the logs.
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.
Ack. Will do a warmboot test and confirm.
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.
Verified both warm-reboot and config reload scenarios. No issues observed.
Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
[image_config]: Enable Receive Packet Steering (RPS) Signed-off-by: Prabhat Aravind <paravind@microsoft.com>
This patch enables Receive Packet Steering (RPS) which helps to distribute softirq processing for CPU bound packets to all
available cores. This will help prevent kernel packet drops when there are bouts of intense CPU bound packets.
Ref: https://lwn.net/Articles/362339/
https://docs.kernel.org/networking/scaling.html
Why I did it
To enable CPU to handle CPU bound packets more efficiently
Work item tracking
How I did it
By using a systemd service that enables RPS for all front-panel ports on a sonic switch
How to verify it
Verify that "/sys/class/net/Ethernet/queues/rx-0/rps_cpus" is set to all available CPU cores
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)