-
Notifications
You must be signed in to change notification settings - Fork 655
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
Issue#2583 : Fix for VXLAN tunnel port FDBs not displayed in 'show mac' #2584
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, please add unit tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the info, i do see that 'show vxlan remotemac' displays all the macs learnt on vxlan tunnel. Will wait for the reply from Broadcom and then discard this review if this is not required. |
currently show vxlan remotemac displays all the MACs from the VXLAN_FDB APP DB table. There is no command which gives a global view of all the macs learnt on the switch. we could also add an option to display only the local macs, |
Added this option as requested. |
@praveenraja1 Please merge latest master code to trigger Semgrep checker. |
What I did
The 'fdbshow' script did not have the logic to check and use 'SAI_FDB_ENTRY_ATTR_ENDPOINT_IP' which used for FDB entries learnt on tunnel port, it tried to look up 'br_port_id' from oid_map which was failing.
Added logic to use 'SAI_FDB_ENTRY_ATTR_ENDPOINT_IP' for vxlan tunnel entries and fallback to the port_id lookup for normal fdb thats leant on ports.
Tested with a combination of VXLAN tunnel and normal port macs.
How I did it
Added logic to logic to look for 'SAI_FDB_ENTRY_ATTR_ENDPOINT_IP' in the ASIC_DB entry and use it for 'if_name ' , if it doesnt exists then legacy code flow is maintained.
How to verify it
#2583
Has been raised for this.
'show mac' with VXLAN tunnel fdbs present.
Previous command output (if the output of a command-line utility has changed)
root@sonic:~# show mac
No. Vlan MacAddress Port Type
Total number of entries 1
root@sonic:~#
New command output (if the output of a command-line utility has changed)
root@sonic:~# show mac
No. Vlan MacAddress Port Type
Total number of entries 4
root@sonic:~#