Show mac learned on lag interface#730
Show mac learned on lag interface#730JiangboHe wants to merge 1 commit intosonic-net:masterfrom JiangboHe:show-lag-mac
Conversation
scripts/fdbshow
Outdated
There was a problem hiding this comment.
I dont think this assumption can be hard-coded here. You can check if the port_id exists in lag_if_oid_map, if so fetch from that and if not, get from if_oid_map
There was a problem hiding this comment.
Hi prsunny,
It is a very good suggestion, I have modified and tested the modifaction. The new commit is 6f281af.
Thanks.
|
retest this please |
This is the new test result yesterday: root@sonic:/home/admin# show mac Total number of entries 2 |
|
I see that the commit sonic-net/sonic-py-swsssdk#51 will also fix the error. But I think a better modification is to provide API with a unique function such as API to get oid-map for interface/lag/bridge_port/vlan. |
|
This change is needed in nbrshow as well.. "show arp" has exact same issue. thanks, |
|
Merged, this - sonic-net/sonic-py-swsssdk#51. I think this should fix both fdb and nbr show. |
|
Retest this please |
|
@JiangboHe , can we close this PR as the fix is merged? |
- What I did
The code is to show mac learned on lag.
The funtion need to read the LAG_NAME_MAP_TABLE data.
- How I did it
To read mac table and get its learned portchannel name from LAG_NAME_MAP_TABLE in COUNTERS_DB with oid.
- How to verify it
- Previous command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show mac
2000000000658
- New command output (if the output of a command-line utility has changed)
root@sonic:/home/admin# show mac
No. Vlan MacAddress Port Type