Skip to content

Commit 4a6f940

Browse files
authored
[EVPN]Fix missing Vlan member update notification in P2MP scenario (#2388)
*Fixed the missing vlan member update notification when the Vlan member add is from remote endpoint in P2MP scenario.
1 parent e9984d8 commit 4a6f940

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

orchagent/portsorch.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -4960,6 +4960,9 @@ bool PortsOrch::addVlanFloodGroups(Port &vlan, Port &port, string end_point_ip)
49604960
vlan.m_vlan_info.l2mc_members[end_point_ip] = l2mc_group_member;
49614961
m_portList[vlan.m_alias] = vlan;
49624962
increaseBridgePortRefCount(port);
4963+
4964+
VlanMemberUpdate update = { vlan, port, true };
4965+
notify(SUBJECT_TYPE_VLAN_MEMBER_CHANGE, static_cast<void *>(&update));
49634966
return true;
49644967
}
49654968

tests/test_evpn_fdb_p2mp.py

+34
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,40 @@ def test_evpnFdbP2MP(dvs, testlog):
371371
assert mac1_found, str(extra)
372372
print("FDB Vlan3:52-54-00-25-06-E9:Ethernet0 is created in STATE-DB")
373373

374+
#UT-10 Evpn Mac add from remote when tunnels are not created
375+
mac = "52:54:00:25:06:E1"
376+
remote_ip_9 = "9.9.9.9"
377+
print("Creating Evpn FDB Vlan3:"+mac.lower()+":9.9.9.9 in APP-DB")
378+
helper.create_entry_pst(
379+
dvs.pdb,
380+
"VXLAN_FDB_TABLE", "Vlan3:"+mac.lower(),
381+
[
382+
("remote_vtep", remote_ip_9),
383+
("type", "dynamic"),
384+
("vni", "3")
385+
]
386+
)
387+
time.sleep(1)
388+
389+
#Adding remote VNI later
390+
vxlan_obj.create_evpn_remote_vni(dvs, "Vlan3", remote_ip_9, "3")
391+
time.sleep(1)
392+
tnl_bp_oid_9 = get_vxlan_p2mp_tunnel_bp(dvs.adb, source_tnl_ip)
393+
394+
# check that the FDB entry is inserted into ASIC DB
395+
ok, extra = dvs.is_fdb_entry_exists(dvs.adb, "ASIC_STATE:SAI_OBJECT_TYPE_FDB_ENTRY",
396+
[("mac", mac), ("bvid", vlan_oid_3)],
397+
[("SAI_FDB_ENTRY_ATTR_TYPE", "SAI_FDB_ENTRY_TYPE_STATIC"),
398+
("SAI_FDB_ENTRY_ATTR_ALLOW_MAC_MOVE", "true"),
399+
("SAI_FDB_ENTRY_ATTR_ENDPOINT_IP", remote_ip_9),
400+
("SAI_FDB_ENTRY_ATTR_BRIDGE_PORT_ID", str(tnl_bp_oid_9)),
401+
]
402+
)
403+
assert ok == True, str(extra)
404+
print("EVPN FDB Vlan3:"+mac.lower()+":"+remote_ip_9+" is created in ASIC-DB")
405+
406+
time.sleep(1)
407+
374408

375409
dvs.remove_vlan_member("3", "Ethernet0")
376410
dvs.remove_vlan("3")

0 commit comments

Comments
 (0)