diff options
author | Sharath Ramamurthy <sramamurthy@nvidia.com> | 2021-07-27 09:44:15 +0200 |
---|---|---|
committer | Stephen Worley <sworley@nvidia.com> | 2023-02-14 00:12:04 +0100 |
commit | 8d30ff3b5ef815ad5cab092f2ce6dc28ab5e3421 (patch) | |
tree | dba0c94cddbbb5cf0303e16e5a8fa208ba20feea /zebra/zebra_evpn.h | |
parent | Merge pull request #12776 from patrasar/Issue_12755 (diff) | |
download | frr-8d30ff3b5ef815ad5cab092f2ce6dc28ab5e3421.tar.xz frr-8d30ff3b5ef815ad5cab092f2ce6dc28ab5e3421.zip |
zebra: data structure changes for single vxlan device
This changeset introduces the data structure changes needed for
single vxlan device functionality. A new struct zebra_vxlan_vni_info
encodes the iftype and vni information for vxlan device.
The change addresses related access changes of the new data structure
fields from different files
zebra_vty is modified to take care of the vni dump information according
to the new vni data structure for vxlan devices.
Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
Diffstat (limited to 'zebra/zebra_evpn.h')
-rw-r--r-- | zebra/zebra_evpn.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/zebra/zebra_evpn.h b/zebra/zebra_evpn.h index 2c84d2304..5dd54a117 100644 --- a/zebra/zebra_evpn.h +++ b/zebra/zebra_evpn.h @@ -33,6 +33,7 @@ #include "zebra/zebra_l2.h" #include "zebra/interface.h" +#include "zebra/zebra_vxlan.h" #ifdef __cplusplus extern "C" { @@ -138,7 +139,7 @@ static inline struct interface *zevpn_map_to_svi(struct zebra_evpn *zevpn) { struct interface *ifp; struct zebra_if *zif = NULL; - struct zebra_l2info_vxlan zl2_info; + struct zebra_vxlan_vni *vni; ifp = zevpn->vxlan_if; if (!ifp) @@ -146,12 +147,15 @@ static inline struct interface *zevpn_map_to_svi(struct zebra_evpn *zevpn) zif = ifp->info; if (!zif) return NULL; + vni = zebra_vxlan_if_vni_find(zif, zevpn->vni); + if (!vni) + return NULL; /* If down or not mapped to a bridge, we're done. */ if (!if_is_operative(ifp) || !zif->brslave_info.br_if) return NULL; - zl2_info = zif->l2info.vxl; - return zvni_map_to_svi(zl2_info.access_vlan, zif->brslave_info.br_if); + + return zvni_map_to_svi(vni->access_vlan, zif->brslave_info.br_if); } int advertise_gw_macip_enabled(struct zebra_evpn *zevpn); |