sonic-utilities
sonic-utilities copied to clipboard
Optimize lag_keepalive by crafting the LACPDU packet ourselves
What I did
Instead of waiting for a LACPDU packet to be sent and capturing that (which involves waiting roughly 30 seconds), get the necessary information from teamd and craft it ourselves. This means that the 60-second wait in making sure that a LACPDU packet is captured and the keepalive script is ready can be largely eliminated (this has been reduced to 10 seconds to make sure the script has a chance to craft the packets and send some LACPDUs).
Fixes sonic-net/sonic-buildimage#17416.
How I did it
How to verify it
Verified on KVM that the lag_keepalive script started correctly. Also verified that during a warm-reboot, the script correctly starts and send LACPDU packets every second (the delay between starting the script and the message where it said it is ready was 2 seconds).
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)
/azp run Azure.sonic-utilities
Azure Pipelines successfully started running 1 pipeline(s).