Skip to content

Commit

Permalink
zebra: Define a local MAC cache for EVPN
Browse files Browse the repository at this point in the history
Define a MAC cache to store local MACs upon notification from
the kernel.

Signed-off-by: Vivek Venkatraman <[email protected]>
  • Loading branch information
vivek-cumulus authored and sougata-github-nvidia committed Dec 3, 2024
1 parent fb7a57b commit 732c135
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions zebra/zebra_l2.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ struct zebra_l2_bridge_vlan {
struct zebra_evpn_access_bd *access_bd;
};

struct zebra_l2_brvlan_mac {
struct interface *br_if;
vlanid_t vid;
struct ethaddr macaddr;
ifindex_t ifindex;
};

struct zebra_l2_bridge_if_ctx {
/* input */
struct zebra_if *zif;
Expand All @@ -48,10 +55,22 @@ struct zebra_l2_bridge_if_ctx {
void *arg;
};

struct zebra_l2_brvlan_mac_ctx {
/* input */
struct interface *br_if;
vlanid_t vid;
int (*func)(struct interface *br_if, vlanid_t vid,
struct ethaddr *macaddr, ifindex_t ifidx, void *arg);

/* input-output */
void *arg;
};

struct zebra_l2_bridge_if {
uint8_t vlan_aware;
struct zebra_if *br_zif;
struct hash *vlan_table;
struct hash *mac_table[VLANID_MAX];
};

/* zebra L2 interface information - bridge interface */
Expand Down

0 comments on commit 732c135

Please sign in to comment.