[pfcwd] add an option to support C code send_packets function in pfc_gen.py#14540
[pfcwd] add an option to support C code send_packets function in pfc_gen.py#14540lipxu wants to merge 10 commits intosonic-net:masterfrom
Conversation
|
Thanks for the improvement! |
Thanks for review @bingwang-ms , Yes, you are correct, based on the lua script log, the root cause should be the PFC frames not evenly then caused on2off value flaps and not trigger the PFC storm immediately. This should be caused by poor performance of fanout, we have no finial solution so far. I tried several workaround to reduce the failure rate, this one should be helpful, based on 7260 (which failed many times in nightly test) test result, we can see the following log with this PR, the detect time is much better than previous. |
|
The code logic LGTM. Wondering can we reuse the C code in https://github.com/sonic-net/sonic-mgmt/blob/master/tests/common/helpers/pfc_gen_t2.py ? The code is leveraging |
Thanks for your suggestion @bingwang-ms , I will check and leverage this code if possible, meanwhile I created another PR #14589 to add half of polling time as compensation for real detect time to reduce the failure rate, thanks. |
@bingwang-ms Modify the function and use _sendmmsg for sending packages, Please review, thanks. |
Description of PR
Summary:
Fixes # (issue)
27262192
Type of change
Back port request
Approach
What is the motivation for this PR?
Currently, the test uses the python script to send the PFC frames, but the performance does not meet the requirements sometimes fails to trigger the PFC storm immediately.
How did you do it?
Add an option to support using C code send_packets function in pfc_gen.py
How did you verify/test it?
https://elastictest.org/scheduler/testplan/66e12cd41b0209cf5f97a7ad
https://elastictest.org/scheduler/testplan/66e11e9ef90c6cd947f4ea3d
Any platform specific information?
Arista fanout device
Supported testbed topology if it's a new test case?
Documentation