diff options
| author | Sharath Ramamurthy <sramamurthy@nvidia.com> | 2021-07-27 14:18:05 +0530 |
|---|---|---|
| committer | Stephen Worley <sworley@nvidia.com> | 2023-02-13 18:12:04 -0500 |
| commit | 131a9a2eeddab0f528b4ad6d29f0f4081cf8d8fe (patch) | |
| tree | 5965f885921d2902e69e222e3b96a7b4a1e8862c /zebra/rt_netlink.c | |
| parent | 96c25556a1c1660d2a4f852ff7ab14e698d4387c (diff) | |
zebra: single vxlan device vni handling
This change brings in following functionality
- netlink_bridge_vxlan_vlan_vni_map_update for single vxlan devices
This function is responsible for reading the vlan-vni map information
received from netlink and populating a new hash_table with the vlan-vni
data. Once all the vlan-vni data is collected, zebra_vxlan_if_vni_table_add_update
is called to update vni_table in vxlan interface and process each of the
vlan-vni data.
- refactoring changes for zevpn_build_hash_table
- existing zevpn_build_hash_table was walking over all the vxlan interfaces
and then processing the vni for each of them. In case of single vxlan device,
we will have more than one vni entries. This function is abstracted so that
it iterates over all the vni entries for single vxlan device. For traditional
vxlan device the zebra_vxlan_if_vni_iterate would only process single vni
associated with that device.
Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
Diffstat (limited to 'zebra/rt_netlink.c')
| -rw-r--r-- | zebra/rt_netlink.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 6fbe350435..25cd50eef2 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -3633,12 +3633,12 @@ static int netlink_macfdb_change(struct nlmsghdr *h, int len, ns_id_t ns_id) return 0; if (vni_mcast_grp) - /* TODO: handle mcast group update for svd */ + return zebra_vxlan_if_vni_mcast_group_update( + ifp, vni, &vtep_ip); - return zebra_vxlan_dp_network_mac_add( - ifp, br_if, &mac, vid, vni, nhg_id, - sticky, - !!(ndm->ndm_flags & NTF_EXT_LEARNED)); + return zebra_vxlan_dp_network_mac_add( + ifp, br_if, &mac, vid, vni, nhg_id, sticky, + !!(ndm->ndm_flags & NTF_EXT_LEARNED)); } return zebra_vxlan_local_mac_add_update(ifp, br_if, &mac, vid, @@ -3660,11 +3660,11 @@ static int netlink_macfdb_change(struct nlmsghdr *h, int len, ns_id_t ns_id) if (dst_present) { if (vni_mcast_grp) - /* TODO: handle mcast group update for svd */ + return zebra_vxlan_if_vni_mcast_group_update(ifp, vni, + NULL); - if (is_zero_mac(&mac)) - return zebra_vxlan_check_readd_vtep(ifp, vni, - vtep_ip); + if (is_zero_mac(&mac)) + return zebra_vxlan_check_readd_vtep(ifp, vni, vtep_ip); return 0; } |
