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

[EVPN] When MAC moves from remote end point to local, ASIC DB fields are not updated properly for the mac #11503

Closed
dgsudharsan opened this issue Jul 21, 2022 · 6 comments
Assignees
Labels
BRCM Triaged this issue has been triaged

Comments

@dgsudharsan
Copy link
Collaborator

dgsudharsan commented Jul 21, 2022

Description

When a MAC move happens from remote end point to local, the ASIC DB update doesn't reflect the current state of the MAC address.
This may be due to the fact that mac update to ASIC DB is done using hset of list of fields obtained in the notification but it doesn't remove the existing fields.

https://github.com/Azure/sonic-sairedis/blob/f50dba7c2a3fa07428aabe1384f9b10c0b9f1937/syncd/RedisClient.cpp#L565

Before the MAC move

127.0.0.1:6379[1]> hgetall "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x2600000000078e\",\"mac\":\"86:4F:D9:01:00:D2\",\"switch_id\":\"oid:0x21000000000000\"}"
 1) "SAI_FDB_ENTRY_ATTR_TYPE"
 2) "SAI_FDB_ENTRY_TYPE_DYNAMIC"
 3) "SAI_FDB_ENTRY_ATTR_ALLOW_MAC_MOVE"
 4) "true"
 5) "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID"
 6) "oid:0x3a00000000078f"
 7) "SAI_FDB_ENTRY_ATTR_ENDPOINT_IP"
 8) "12.0.0.2"
 9) "SAI_FDB_ENTRY_ATTR_PACKET_ACTION"
10) "SAI_PACKET_ACTION_FORWARD"
127.0.0.1:6379[1]>

MAC move event

2022-07-21.01:23:31.016612|n|fdb_event|[{"fdb_entry":"{\"bvid\":\"oid:0x26000000000c68\",\"mac\":\"5A:E0:86:35:02:3E\",\"switch_id\":\"oid:0x21000000000000\"}","fdb_event":"SAI_FDB_EVENT_MOVE","list":[{"id":"SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID","value":"oid:0x3a000000000c69"},{"id":"SAI_FDB_ENTRY_ATTR_TYPE","value":"SAI_FDB_ENTRY_TYPE_DYNAMIC"},{"id":"SAI_FDB_ENTRY_ATTR_PACKET_ACTION","value":"SAI_PACKET_ACTION_FORWARD"}]}]|

After the MAC move

127.0.0.1:6379[1]> hgetall "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY:{\"bvid\":\"oid:0x26000000000c68\",\"mac\":\"5A:E0:86:35:02:3E\",\"switch_id\":\"oid:0x21000000000000\"}"
 1) "SAI_FDB_ENTRY_ATTR_TYPE"
 2) "SAI_FDB_ENTRY_TYPE_DYNAMIC"
 3) "SAI_FDB_ENTRY_ATTR_ALLOW_MAC_MOVE"
 4) "true"
 5) "SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID"
 6) "oid:0x3a000000000c69"
 7) "SAI_FDB_ENTRY_ATTR_ENDPOINT_IP"
 8) "12.0.0.2"
 9) "SAI_FDB_ENTRY_ATTR_PACKET_ACTION"
10) "SAI_PACKET_ACTION_FORWARD"

Steps to reproduce the issue:

  1. MAC move from remote to local.
  2. Check if the fields are updated in ASIC DB properly.

Describe the results you received:

The fields are not properly updated.

Describe the results you expected:

The fields should be properly updated.

Output of show version:

SONiC Software Version: SONiC.master.370-4fb6cf03e_Internal
Distribution: Debian 11.3
Kernel: 5.10.0-12-2-amd64
Build commit: 4fb6cf03e
Build date: Tue Jul  5 08:28:28 UTC 2022
Built by: sw-r2d2-bot@r-build-sonic-ci02-244

Platform: x86_64-mlnx_msn3420-r0
HwSKU: ACS-MSN3420
ASIC: mellanox
ASIC Count: 1
Serial Number: MT2019X13878
Model Number: MSN3420-CB2FO
Hardware Revision: A1
Uptime: 02:30:58 up  6:40,  1 user,  load average: 0.69, 0.74, 0.87
Date: Thu 21 Jul 2022 02:30:58

Docker images:
REPOSITORY                    TAG                             IMAGE ID       SIZE
docker-macsec                 latest                          2d9447c3e23f   460MB
docker-dhcp-relay             latest                          f99691ffb6da   451MB
docker-syncd-mlnx             latest                          f140fd933603   991MB
docker-syncd-mlnx             master.370-4fb6cf03e_Internal   f140fd933603   991MB
docker-sonic-telemetry        latest                          a5257d5d0f9d   522MB
docker-sonic-telemetry        master.370-4fb6cf03e_Internal   a5257d5d0f9d   522MB
docker-router-advertiser      latest                          f2a879e1a04d   442MB
docker-router-advertiser      master.370-4fb6cf03e_Internal   f2a879e1a04d   442MB
docker-platform-monitor       latest                          205a6186e0ac   994MB
docker-platform-monitor       master.370-4fb6cf03e_Internal   205a6186e0ac   994MB
docker-orchagent              latest                          f4a0b52c8f56   476MB
docker-orchagent              master.370-4fb6cf03e_Internal   f4a0b52c8f56   476MB
docker-mux                    latest                          ed2b817bd52c   490MB
docker-mux                    master.370-4fb6cf03e_Internal   ed2b817bd52c   490MB
docker-database               latest                          a9ee6bd703a6   442MB
docker-database               master.370-4fb6cf03e_Internal   a9ee6bd703a6   442MB
docker-teamd                  latest                          3aedfac22e52   427MB
docker-teamd                  master.370-4fb6cf03e_Internal   3aedfac22e52   427MB
docker-sonic-mgmt-framework   latest                          020f72a9284b   556MB
docker-sonic-mgmt-framework   master.370-4fb6cf03e_Internal   020f72a9284b   556MB
docker-snmp                   latest                          5cdc307ec95d   456MB
docker-snmp                   master.370-4fb6cf03e_Internal   5cdc307ec95d   456MB
docker-sflow                  latest                          feded85a0f31   428MB
docker-sflow                  master.370-4fb6cf03e_Internal   feded85a0f31   428MB
docker-nat                    latest                          dae3c27e75da   430MB
docker-nat                    master.370-4fb6cf03e_Internal   dae3c27e75da   430MB
docker-lldp                   latest                          ff1fa590d900   452MB
docker-lldp                   master.370-4fb6cf03e_Internal   ff1fa590d900   452MB
docker-fpm-frr                latest                          357d2d39f11f   456MB
docker-fpm-frr                master.370-4fb6cf03e_Internal   357d2d39f11f   456MB

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@kcudnik
Copy link
Contributor

kcudnik commented Jul 29, 2022

i think mac_move event is not properly supported yet, so far we had only learn/age events and we based on that,
do you have fix that can address this issue?

@zhangyanzhao
Copy link
Collaborator

BRCM team will take a look. Thanks.

@zhangyanzhao zhangyanzhao added Triaged this issue has been triaged BRCM labels Aug 3, 2022
@anilkpan
Copy link

anilkpan commented Aug 4, 2022

When the event SAI_FDB_EVENT_MOVE is received, syncd just sets the local mac into ASIC DB. It does not clean up the existing attributes in the remote mac that are no longer valid. The existing ASIC DB entry needs to be cleaned up. I will add this enhancement and upload the PR. ETA 8/30.

@anilkpan
Copy link

Created PR with the fix:
sonic-net/sonic-sairedis#1118

yxieca added a commit to yxieca/sonic-buildimage that referenced this issue Jan 20, 2023
…] advance submodule head

utilities:
* 7979b9b 2022-12-05 | Transceiver eeprom dom CLI modification to show output from TRANSCEIVER_DOM_THRESHOLD table (sonic-net#2535) [mihirpat1]

swss:
* 4ad82c5 2023-01-13 | Changed the BFD default detect multiplier to 10x (sonic-net#2614) (HEAD -> 202205) [siqbal1986]
* 4fe7138 2023-01-12 | [MuxOrch] Enabling neighbor when adding in active state (sonic-net#2601) [Nikola Dancejic]

sairedis:
* 2f6cbd3 2023-01-19 | Fix for [EVPN] When MAC moves from remote end point to local, ASIC DB fields are not updated properly for the mac sonic-net#11503 (sonic-net#1173) (github/202205) [anilkpan]

platform-common:
* 2995989 2022-12-06 | Add get_transceiver_status and get_transceiver_pm to API interface (sonic-net#315) (HEAD -> 202205) [longhuan-cisco]

platform-daemons:
* d756e1a 2023-01-18 | [Xcvrd]: Fix optics insertion/removal not detected (sonic-net#333) (HEAD -> 202205) [Prince George]
* 153ea47 2023-01-18 | Xcvrd should restart if any child thread crashes (sonic-net#326) [mihirpat1]
* 2d546b4 2022-12-06 | Add new fields to status/dom_sensor/pm tables in STATE_DB for CMIS/C-CMIS (sonic-net#304) [longhuan-cisco]
* 620a2b1 2022-12-05 | Create TRANSCEIVER_DOM_THRESHOLD table in state DB (sonic-net#320) [mihirpat1]
* dcad1d6 2022-11-08 | Fix typo in xcvrd (sonic-net#313) [Junchao-Mellanox]

Signed-off-by: Ying Xie <[email protected]>
yxieca added a commit that referenced this issue Jan 20, 2023
… advance submodule head (#13440)

utilities:
* 3ebe948 2023-01-14 | [show] Add bgpraw to show run all (#2537) (HEAD -> 202205) [jingwenxie]
* 7979b9b 2022-12-05 | Transceiver eeprom dom CLI modification to show output from TRANSCEIVER_DOM_THRESHOLD table (#2535) [mihirpat1]

swss:
* 4ad82c5 2023-01-13 | Changed the BFD default detect multiplier to 10x (#2614) (HEAD -> 202205) [siqbal1986]
* 4fe7138 2023-01-12 | [MuxOrch] Enabling neighbor when adding in active state (#2601) [Nikola Dancejic]

sairedis:
* 2f6cbd3 2023-01-19 | Fix for [EVPN] When MAC moves from remote end point to local, ASIC DB fields are not updated properly for the mac #11503 (#1173) (github/202205) [anilkpan]

platform-daemon:
* 2851d86 2023-01-17 | Chassisd do an explicit stop of the config_manager (#328) (HEAD -> 202205) [judyjoseph]

platform-common:
* 2995989 2022-12-06 | Add get_transceiver_status and get_transceiver_pm to API interface (#315) (HEAD -> 202205) [longhuan-cisco]

Signed-off-by: Ying Xie <[email protected]>

Signed-off-by: Ying Xie <[email protected]>
@bratashX
Copy link
Contributor

dgsudharsan Could you please verify fix?

Created PR with the fix: sonic-net/sonic-sairedis#1118

@dgsudharsan
Copy link
Collaborator Author

Verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BRCM Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

5 participants