From bd7bad9121be93045c69cda24b2d80e008586f59 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Tue, 6 Feb 2024 14:02:51 +0200 Subject: [PATCH 1/2] bgpd: Drop unused function bgp_evpn_attr_get_df_pref() Signed-off-by: Donatas Abraitis --- bgpd/bgp_evpn_mh.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/bgpd/bgp_evpn_mh.h b/bgpd/bgp_evpn_mh.h index ee1f74989b77..cebabb9fd051 100644 --- a/bgpd/bgp_evpn_mh.h +++ b/bgpd/bgp_evpn_mh.h @@ -388,11 +388,6 @@ static inline bool bgp_evpn_attr_is_local_es(struct attr *attr) return attr ? !!(attr->es_flags & ATTR_ES_IS_LOCAL) : false; } -static inline uint32_t bgp_evpn_attr_get_df_pref(struct attr *attr) -{ - return (attr) ? attr->df_pref : 0; -} - static inline bool bgp_evpn_local_es_is_active(struct bgp_evpn_es *es) { return (es->flags & BGP_EVPNES_OPER_UP) From 82d43634a424cf63d72ea336dd2a5e70b6e40fe3 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Tue, 6 Feb 2024 14:03:36 +0200 Subject: [PATCH 2/2] zebra: Use uint16_t for DF preference It's 16-bits everywhere, not sure why it was here as 32. Signed-off-by: Donatas Abraitis --- zebra/zebra_evpn_mh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/zebra_evpn_mh.h b/zebra/zebra_evpn_mh.h index 60800489767c..34ef79f1558e 100644 --- a/zebra/zebra_evpn_mh.h +++ b/zebra/zebra_evpn_mh.h @@ -154,7 +154,7 @@ struct zebra_evpn_es_vtep { /* Parameters for DF election */ uint8_t df_alg; - uint32_t df_pref; + uint16_t df_pref; /* XXX - maintain a backpointer to struct zebra_vtep */ };