diff options
author | Anuradha Karuppiah <anuradhak@cumulusnetworks.com> | 2020-05-15 02:00:10 +0200 |
---|---|---|
committer | Anuradha Karuppiah <anuradhak@nvidia.com> | 2020-12-01 18:46:28 +0100 |
commit | 4f9bb78eca97fdb86e80b11f9234ac9b9786e235 (patch) | |
tree | 34f86861ba8775e8bfff496d794719999fa583a3 /zebra/zebra_evpn_mh.h | |
parent | zebra: allocate one nexthop id per-VTEP instead of one per-ES-VTEP (diff) | |
download | frr-4f9bb78eca97fdb86e80b11f9234ac9b9786e235.tar.xz frr-4f9bb78eca97fdb86e80b11f9234ac9b9786e235.zip |
zebra: change the L2 NHG id format to co-exist with the L3NHG ids
It is now 4bits of type and 28bits of value -
1. type=0 is for L3 NHG
2. type=1 is for L2 NH
3. type=2 is for L2 NHG
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_evpn_mh.h')
-rw-r--r-- | zebra/zebra_evpn_mh.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/zebra_evpn_mh.h b/zebra/zebra_evpn_mh.h index acdd2862b..dc2c299cf 100644 --- a/zebra/zebra_evpn_mh.h +++ b/zebra/zebra_evpn_mh.h @@ -27,6 +27,7 @@ #include "bitfield.h" #include "zebra_vxlan.h" #include "zebra_vxlan_private.h" +#include "zebra_nhg.h" #define EVPN_MH_VTY_STR "Multihoming\n" @@ -205,18 +206,17 @@ struct zebra_evpn_mh_info { struct in_addr es_originator_ip; /* L2 NH and NHG ids - - * Most significant 8 bits is type. Lower 24 bits is the value + * Most significant 4 bits is type. Lower 28 bits is the value * allocated from the nh_id_bitmap. */ bitfield_t nh_id_bitmap; #define EVPN_NH_ID_MAX (16*1024) #define EVPN_NH_ID_VAL_MASK 0xffffff -#define EVPN_NH_ID_TYPE_POS 24 /* The purpose of using different types for NHG and NH is NOT to manage the * id space separately. It is simply to make debugging easier. */ -#define EVPN_NH_ID_TYPE_BIT (1 << EVPN_NH_ID_TYPE_POS) -#define EVPN_NHG_ID_TYPE_BIT (2 << EVPN_NH_ID_TYPE_POS) +#define EVPN_NH_ID_TYPE_BIT (NHG_TYPE_L2_NH << NHG_ID_TYPE_POS) +#define EVPN_NHG_ID_TYPE_BIT (NHG_TYPE_L2 << NHG_ID_TYPE_POS) /* L2-NHG table - key: nhg_id, data: zebra_evpn_es */ struct hash *nhg_table; /* L2-NH table - key: vtep_up, data: zebra_evpn_nh */ |