[Nexthop] Fix queue per host classID race in ACL table group traffic tests - #1498
Open
vvasavada-nexthop wants to merge 1 commit into
Open
[Nexthop] Fix queue per host classID race in ACL table group traffic tests#1498vvasavada-nexthop wants to merge 1 commit into
vvasavada-nexthop wants to merge 1 commit into
Conversation
Signed-off-by: Vishrant Vasavada <vvasavada@nexthop.ai>
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.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit installpre-commit runSummary
The QueuePerHost ACL test basically stores the tag in two separate places for the same host.
A packet in the test makes two trips:
Trip 1: Routes it by IP towards host 1.0.0.10, tags it using neighbor table, picks a lane, sends it out of port1.
Trip 2: Loops back in. Its destination MAC is now host's MAC, so this time packet is switched, tags it using the MAC table, picks a lane and sends out of port 1 again.
The problem is that addResolvedNeighborWithClassID applies two state updates: resolve the neighbors, then set their class IDs. They both ignored the in and used getProgrammedState. In between, a background component LookupClassUpdater does its own job of tagging the MAC table entries.
So the sequence that happens is:
So the packet goes like this:
This is evident from the logs
What should have happened is:
The fix is to use in (state that was handed in) instead of
getProgrammedState.Test Plan
Was able to reproduce the below
AgentAclTableGroupTrafficTest.VerifyQueuePerHostAclTableAndTtlAclTablefailure without the fix, but not with the fix.Other QueuePerHost tests passes with the change.