sonic-swss icon indicating copy to clipboard operation
sonic-swss copied to clipboard

[Everflow/ERSPAN] Set correct destination port and mac address when the nexthop is updated for ERSPAN mirror destination

Open saksarav-nokia opened this issue 2 years ago • 2 comments

Signed-off-by: Sakthivadivu Saravanaraj [email protected]

What I did Fixed the issues reported in https://github.com/Azure/sonic-buildimage/issues/11457 Why I did it getNeighborEntry: This function compares Neighbor alias with nexthop alias. Since the alias for nexthop was modified from systemport name to Inband port name in addNextHop, the alias comparison was failing and mirror session was deactivated. Modified the getNeighborEntry to compare the correct alias. updateSessionDstMac: Modified the code to set the dest mac of the mirror to gMacAddress if it is voq switch updateSessionDstPort: Set the dest port of the mirror to Rec port if the mirror is ERSPAN mirror removeRanges: Delete the acl range only if it was created . If the acl entry with mirror action is created when the mirror is not activated, only counter is created. Acl range and acl rule are not created. So removeRanges returns false and hence "Failed to remove acl rule" errors printed many times in syslog. AclRuleMirror::activate : If Acl rule with mirror action was created before the mirror was activated and deleted, the counter was deleted. So activating the mirror calls AclRule:::createRule without creating counter and orchagent calls sairedis with counter Object as NULL and sai_meta layer returns error, so orchagent crashes. Added code to create counter if not valid before creating the rule. How I verified it Verified ingress and egress mirror oc tests passes Details if related

saksarav-nokia avatar Jul 22 '22 21:07 saksarav-nokia

@judyjoseph @prsunny , could you please review this PR since this is blocking everflow testing with github image

saksarav-nokia avatar Jul 27 '22 19:07 saksarav-nokia

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: saksarav-nokia (f2fded58ba82c7c1d39963135f4f2180763bbf12, 7cf981e49bdc7aaf1a4fc61c3f5cb8f54e34c74f)

@judyjoseph @abdosi @ysmanman , I looked at the PR https://github.com/sonic-net/sonic-swss/pull/2024 and i already addressed the issue fixed by #2024 in this PR with additional fixes and we don't need #2024. With #2392, all everflow tests are passing except tests related to policer.

saksarav-nokia avatar Aug 18 '22 14:08 saksarav-nokia

/easycla

judyjoseph avatar Aug 25 '22 06:08 judyjoseph

/Azurepipelines run Azure.sonic-buildimage

judyjoseph avatar Aug 25 '22 06:08 judyjoseph

No pipelines are associated with this pull request.

azure-pipelines[bot] avatar Aug 25 '22 06:08 azure-pipelines[bot]

/azp run

judyjoseph avatar Aug 30 '22 17:08 judyjoseph

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Aug 30 '22 17:08 azure-pipelines[bot]

@arlakshm, @ysmanman - could you take a look at the changes as well ? thanks !

judyjoseph avatar Sep 07 '22 22:09 judyjoseph

@saksarav-nokia , can you raise a new PR in 202205 branch to cherry pick this same change and I will help approve it and merge it so that we don't need to wait for 202205 branch owner to perform the cherry-pick.

gechiang avatar Sep 15 '22 18:09 gechiang

Removed label "Request for 202205 branch" because we have already merged in by the following PR: https://github.com/sonic-net/sonic-swss/pull/2455.

gechiang avatar Sep 16 '22 07:09 gechiang