diff options
| author | Sharath Ramamurthy <sramamurthy@nvidia.com> | 2021-07-27 13:17:52 +0530 | 
|---|---|---|
| committer | Stephen Worley <sworley@nvidia.com> | 2023-02-13 18:12:04 -0500 | 
| commit | 784d88aa14c115411ed21f6ac518ab1a8f9d27b7 (patch) | |
| tree | 86c103be00f0442b205027ca2cc2f852275eac94 /zebra/zebra_evpn.c | |
| parent | 8d30ff3b5ef815ad5cab092f2ce6dc28ab5e3421 (diff) | |
zebra: multiple vlan aware bridge datastructure changes and vxlan device iftype derivation from netlink
This change set introduces data structure changes required for multiple vlan aware bridge
functionality. A new structure zebra_l2_bridge_if encapsulates the vlan to access_bd
association of the bridge. A vlan_table hash_table is used to record each instance
of the vlan to access_bd of the bridge via zebra_l2_bridge_vlan structure.
vxlan iftype derivation: netlink attribute IFLA_VXLAN_COLLECT_METADATA is used
to derive the iftype of the vxlan device. If the attribute is present, then the
vxlan interface is treated as single vxlan device, otherwise it would default to
traditional vxlan device.
zebra_vxlan_check_readd_vtep, zebra_vxlan_dp_network_mac_add/del is modified to
be vni aware.
mac_fdb_read_for_bridge - is modified to be (vlan, bridge) aware
Signed-off-by: Sharath Ramamurthy <sramamurthy@nvidia.com>
Diffstat (limited to 'zebra/zebra_evpn.c')
| -rw-r--r-- | zebra/zebra_evpn.c | 11 | 
1 files changed, 4 insertions, 7 deletions
diff --git a/zebra/zebra_evpn.c b/zebra/zebra_evpn.c index 42ebedf602..0bf6039693 100644 --- a/zebra/zebra_evpn.c +++ b/zebra/zebra_evpn.c @@ -717,7 +717,6 @@ struct zebra_evpn *zebra_evpn_map_vlan(struct interface *ifp,  				       struct interface *br_if, vlanid_t vid)  {  	struct zebra_if *zif; -	struct zebra_l2info_bridge *br;  	struct zebra_evpn **p_zevpn;  	struct zebra_evpn *zevpn = NULL;  	struct zebra_from_svi_param in_param; @@ -725,8 +724,7 @@ struct zebra_evpn *zebra_evpn_map_vlan(struct interface *ifp,  	/* Determine if bridge is VLAN-aware or not */  	zif = br_if->info;  	assert(zif); -	br = &zif->l2info.br; -	in_param.bridge_vlan_aware = br->vlan_aware; +	in_param.bridge_vlan_aware = IS_ZEBRA_IF_BRIDGE_VLAN_AWARE(zif);  	in_param.vid = vid;  	in_param.br_if = br_if;  	in_param.zif = zif; @@ -798,7 +796,6 @@ static int zebra_evpn_from_svi_ns(struct ns *ns,  struct zebra_evpn *zebra_evpn_from_svi(struct interface *ifp,  				       struct interface *br_if)  { -	struct zebra_l2info_bridge *br;  	struct zebra_evpn *zevpn = NULL;  	struct zebra_evpn **p_zevpn;  	struct zebra_if *zif; @@ -814,8 +811,7 @@ struct zebra_evpn *zebra_evpn_from_svi(struct interface *ifp,  	/* Determine if bridge is VLAN-aware or not */  	zif = br_if->info;  	assert(zif); -	br = &zif->l2info.br; -	in_param.bridge_vlan_aware = br->vlan_aware; +	in_param.bridge_vlan_aware = IS_ZEBRA_IF_BRIDGE_VLAN_AWARE(zif);  	in_param.vid = 0;  	if (in_param.bridge_vlan_aware) { @@ -948,7 +944,8 @@ void zebra_evpn_read_mac_neigh(struct zebra_evpn *zevpn, struct interface *ifp)  			ifp->name, ifp->ifindex, zevpn->vni,  			zif->brslave_info.bridge_ifindex); -	macfdb_read_for_bridge(zns, ifp, zif->brslave_info.br_if); +	macfdb_read_for_bridge(zns, ifp, zif->brslave_info.br_if, +			       vni->access_vlan);  	vlan_if = zvni_map_to_svi(vni->access_vlan, zif->brslave_info.br_if);  	if (vlan_if) {  		/* Add SVI MAC */  | 
