Skip to content
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

[ACL] Fix ACL rules are not ready yet when test cases are started in as5835_54t model #2961

Merged
merged 2 commits into from
Apr 1, 2021

Conversation

shihhsien-wang
Copy link
Contributor

Description of PR

Add check code to ensure ACL rules are already written to hardware chip by check and wait until the output of aclshow -a command is OK.

Summary:

Fixes the failed test cases in as5835_54t model (or other models equipped with Broadcom chip), because of the rules are not set to Broadcom chip yet but the test case is already started to test. In this case, the first few test cases whose patterns like test_unmatched_blocked and test_XXX_dropped sometimes fail.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

Fix failed test cases in as5835_54t model.

How did you do it?

Check output of aclshow -a command and ensure that one or more rules are able to displayed and values of counters are not N/A.

How did you verify/test it?

Run the modified code in as5835_54t model to ensure that the problem is fixed.

Any platform specific information?

Distribution: Debian 10.7
Kernel: 4.19.0-6-2-amd64
Build commit: 9b840957
Build date: Thu Feb  4 12:09:29 UTC 2021
Built by: ubuntu@ip-10-5-1-193

Platform: x86_64-accton_as5835_54t-r0
HwSKU: Accton-AS5835-54T
ASIC: broadcom

Supported testbed topology if it's a new test case?

N/A

Documentation

N/A

@shihhsien-wang shihhsien-wang requested a review from a team as a code owner February 9, 2021 06:24
@yxieca
Copy link
Collaborator

yxieca commented Feb 16, 2021

/Azurepipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@neethajohn neethajohn requested a review from daall February 22, 2021 17:36
def check_rule_counters(self, duthost):
logger.info('Wait all rule counters are ready')

return wait_until(300, 2, self.check_rule_counters_internal, duthost)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

300 seems a bit long, could we set this to something like 30 or 60?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated code to wait for ACL rule counters ready in 60 seconds. Thanks.

@wangxin
Copy link
Collaborator

wangxin commented Mar 31, 2021

@shihhsien-wang Can you address the review comments? Then we can proceed with merging this PR.

@shihhsien-wang
Copy link
Contributor Author

@shihhsien-wang Can you address the review comments? Then we can proceed with merging this PR.

Just updated code for the review comment. Sorry for late reply.

@wangxin wangxin merged commit c91f693 into sonic-net:master Apr 1, 2021
nirmalya-keysight pushed a commit to nirmalya-keysight/sonic-mgmt that referenced this pull request Apr 5, 2021
…as5835_54t model (sonic-net#2961)

What is the motivation for this PR?
Fix failed test cases in as5835_54t model.

How did you do it?
Check output of aclshow -a command and ensure that one or more rules are able to displayed and values of counters are not N/A.

How did you verify/test it?
Run the modified code in as5835_54t model to ensure that the problem is fixed.
wangxin pushed a commit that referenced this pull request Apr 13, 2021
Why I did:
Changes done as part of #2961 broke the multi-asic platforms.

How I did:
Made changes done as part of #2961 multi-asic compatible.

How I verify:
Verified for both multi-asic and single asic platforms.

Signed-off-by: Abhishek Dosi <[email protected]>
saravanansv pushed a commit to saravanansv/sonic-mgmt that referenced this pull request May 6, 2021
…as5835_54t model (sonic-net#2961)

What is the motivation for this PR?
Fix failed test cases in as5835_54t model.

How did you do it?
Check output of aclshow -a command and ensure that one or more rules are able to displayed and values of counters are not N/A.

How did you verify/test it?
Run the modified code in as5835_54t model to ensure that the problem is fixed.
saravanansv pushed a commit to saravanansv/sonic-mgmt that referenced this pull request May 6, 2021
Why I did:
Changes done as part of sonic-net#2961 broke the multi-asic platforms.

How I did:
Made changes done as part of sonic-net#2961 multi-asic compatible.

How I verify:
Verified for both multi-asic and single asic platforms.

Signed-off-by: Abhishek Dosi <[email protected]>
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
…as5835_54t model (sonic-net#2961)

What is the motivation for this PR?
Fix failed test cases in as5835_54t model.

How did you do it?
Check output of aclshow -a command and ensure that one or more rules are able to displayed and values of counters are not N/A.

How did you verify/test it?
Run the modified code in as5835_54t model to ensure that the problem is fixed.
vmittal-msft pushed a commit to vmittal-msft/sonic-mgmt that referenced this pull request Sep 28, 2021
Why I did:
Changes done as part of sonic-net#2961 broke the multi-asic platforms.

How I did:
Made changes done as part of sonic-net#2961 multi-asic compatible.

How I verify:
Verified for both multi-asic and single asic platforms.

Signed-off-by: Abhishek Dosi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants