mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-04 23:42:27 +00:00
bgpd: replace AFI_ETHER reference with AFI_L2VPN ref
The introduction of AFI_L2VPN prefix makes usage of AFI_ETHER deprecated and is of no usage currently. The former replaces the latter one. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
parent
5ef6cd6954
commit
0aa9c36c07
@ -1451,7 +1451,7 @@ rfapi_open_inner (
|
||||
#define RFD_RTINIT(rh, ary) do {\
|
||||
RFD_RTINIT_AFI(rh, ary, AFI_IP);\
|
||||
RFD_RTINIT_AFI(rh, ary, AFI_IP6);\
|
||||
RFD_RTINIT_AFI(rh, ary, AFI_ETHER);\
|
||||
RFD_RTINIT_AFI(rh, ary, AFI_L2VPN);\
|
||||
} while(0)
|
||||
|
||||
RFD_RTINIT(rfd, rfd->rib);
|
||||
@ -3835,7 +3835,7 @@ DEFUN (debug_rfapi_show_import,
|
||||
&cursor))
|
||||
{
|
||||
|
||||
if (it->imported_vpn[AFI_ETHER])
|
||||
if (it->imported_vpn[AFI_L2VPN])
|
||||
{
|
||||
lni = lni_as_ptr;
|
||||
if (first_l2)
|
||||
@ -3845,7 +3845,7 @@ DEFUN (debug_rfapi_show_import,
|
||||
first_l2 = 0;
|
||||
}
|
||||
snprintf (buf, BUFSIZ, "L2VPN LNI=%u", lni);
|
||||
rfapiShowImportTable (vty, buf, it->imported_vpn[AFI_ETHER], 1);
|
||||
rfapiShowImportTable (vty, buf, it->imported_vpn[AFI_L2VPN], 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2077,7 +2077,7 @@ rfapiEthRouteTable2NextHopList (
|
||||
|
||||
|
||||
it = rfapiMacImportTableGet (bgp, logical_net_id);
|
||||
rt = it->imported_vpn[AFI_ETHER];
|
||||
rt = it->imported_vpn[AFI_L2VPN];
|
||||
|
||||
for (rn = route_top (rt); rn; rn = route_next (rn))
|
||||
{
|
||||
@ -3607,7 +3607,7 @@ rfapiBgpInfoFilteredImportVPN (
|
||||
struct peer *peer,
|
||||
void *rfd, /* set for looped back routes */
|
||||
struct prefix *p,
|
||||
struct prefix *aux_prefix, /* AFI_ETHER: optional IP */
|
||||
struct prefix *aux_prefix, /* AFI_L2VPN: optional IP */
|
||||
afi_t afi,
|
||||
struct prefix_rd *prd,
|
||||
struct attr *attr, /* part of bgp_info */
|
||||
@ -3702,7 +3702,7 @@ rfapiBgpInfoFilteredImportVPN (
|
||||
{
|
||||
case AFI_IP:
|
||||
case AFI_IP6:
|
||||
case AFI_ETHER:
|
||||
case AFI_L2VPN:
|
||||
rt = import_table->imported_vpn[afi];
|
||||
break;
|
||||
|
||||
@ -3909,7 +3909,7 @@ rfapiBgpInfoFilteredImportVPN (
|
||||
* For ethernet routes, if there is an accompanying IP address,
|
||||
* save it in the bi
|
||||
*/
|
||||
if ((AFI_ETHER == afi) && aux_prefix)
|
||||
if ((AFI_L2VPN == afi) && aux_prefix)
|
||||
{
|
||||
|
||||
vnc_zlog_debug_verbose ("%s: setting BI's aux_prefix", __func__);
|
||||
@ -4178,7 +4178,7 @@ rfapiProcessUpdate (
|
||||
rfd,
|
||||
&pfx_mac_buf, /* prefix */
|
||||
p, /* aux prefix: IP addr */
|
||||
AFI_ETHER,
|
||||
AFI_L2VPN,
|
||||
prd,
|
||||
attr,
|
||||
type,
|
||||
@ -4291,7 +4291,7 @@ rfapiProcessWithdraw (
|
||||
|
||||
#if DEBUG_L2_EXTRA
|
||||
vnc_zlog_debug_verbose
|
||||
("%s: calling rfapiBgpInfoFilteredImportVPN(it=%p, afi=AFI_ETHER)",
|
||||
("%s: calling rfapiBgpInfoFilteredImportVPN(it=%p, afi=AFI_L2VPN)",
|
||||
__func__, it);
|
||||
#endif
|
||||
|
||||
@ -4302,7 +4302,7 @@ rfapiProcessWithdraw (
|
||||
rfd,
|
||||
&pfx_mac_buf, /* prefix */
|
||||
p, /* aux_prefix: IP */
|
||||
AFI_ETHER,
|
||||
AFI_L2VPN,
|
||||
prd,
|
||||
attr,
|
||||
type,
|
||||
@ -4808,7 +4808,7 @@ rfapiDeleteRemotePrefixesIt (
|
||||
vnc_zlog_debug_verbose ("%s: rn pfx=%s", __func__, buf_pfx);
|
||||
}
|
||||
|
||||
/* TBD is this valid for afi == AFI_ETHER? */
|
||||
/* TBD is this valid for afi == AFI_L2VPN? */
|
||||
RFAPI_CHECK_REFCOUNT (rn, SAFI_MPLS_VPN, 1);
|
||||
|
||||
for (bi = rn->info; bi; bi = next)
|
||||
@ -5166,10 +5166,10 @@ rfapiCountAllItRoutes (int *pALRcount, /* active local routes */
|
||||
rc = skiplist_next (h->import_mac, NULL, (void **) &it, &cursor))
|
||||
{
|
||||
|
||||
total_active_local += it->local_count[AFI_ETHER];
|
||||
total_active_remote += it->remote_count[AFI_ETHER];
|
||||
total_holddown += it->holddown_count[AFI_ETHER];
|
||||
total_imported += it->imported_count[AFI_ETHER];
|
||||
total_active_local += it->local_count[AFI_L2VPN];
|
||||
total_active_remote += it->remote_count[AFI_L2VPN];
|
||||
total_holddown += it->holddown_count[AFI_L2VPN];
|
||||
total_imported += it->imported_count[AFI_L2VPN];
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -941,7 +941,7 @@ rfapiMonitorItNodeChanged (
|
||||
__func__, import_table, it_node, buf_prefix);
|
||||
#endif
|
||||
|
||||
if (AFI_ETHER == afi)
|
||||
if (AFI_L2VPN == afi)
|
||||
{
|
||||
struct rfapi_monitor_eth *m;
|
||||
struct skiplist *sl;
|
||||
@ -1044,7 +1044,7 @@ rfapiMonitorItNodeChanged (
|
||||
/*
|
||||
* All-routes L2 monitors
|
||||
*/
|
||||
if (AFI_ETHER == afi)
|
||||
if (AFI_L2VPN == afi)
|
||||
{
|
||||
struct rfapi_monitor_eth *e;
|
||||
|
||||
@ -1305,7 +1305,7 @@ rfapiMonitorEthAttachImportHd (struct bgp *bgp, struct rfapi_descriptor *rfd)
|
||||
pfx_mac_buf.prefixlen = 48;
|
||||
pfx_mac_buf.u.prefix_eth = mon->macaddr;
|
||||
|
||||
rn = route_node_get (it->imported_vpn[AFI_ETHER], &pfx_mac_buf);
|
||||
rn = route_node_get (it->imported_vpn[AFI_L2VPN], &pfx_mac_buf);
|
||||
assert (rn);
|
||||
|
||||
(void) rfapiMonitorEthAttachImport (it, rn, mon);
|
||||
@ -1361,7 +1361,7 @@ rfapiMonitorEthDetachImport (
|
||||
pfx_mac_buf.prefixlen = 48;
|
||||
pfx_mac_buf.u.prefix_eth = mon->macaddr;
|
||||
|
||||
rn = route_node_get (it->imported_vpn[AFI_ETHER], &pfx_mac_buf);
|
||||
rn = route_node_get (it->imported_vpn[AFI_L2VPN], &pfx_mac_buf);
|
||||
assert (rn);
|
||||
|
||||
#if DEBUG_L2_EXTRA
|
||||
@ -1423,7 +1423,7 @@ rfapiMonitorEthAdd (
|
||||
|
||||
if (!RFAPI_0_ETHERADDR (macaddr))
|
||||
{
|
||||
rn = route_node_get (it->imported_vpn[AFI_ETHER], &pfx_mac_buf);
|
||||
rn = route_node_get (it->imported_vpn[AFI_L2VPN], &pfx_mac_buf);
|
||||
assert (rn);
|
||||
}
|
||||
|
||||
@ -1635,7 +1635,7 @@ rfapiMonitorCallbacksOff (struct bgp *bgp)
|
||||
/*
|
||||
* The actual route table
|
||||
*/
|
||||
rt = it->imported_vpn[AFI_ETHER];
|
||||
rt = it->imported_vpn[AFI_L2VPN];
|
||||
|
||||
/*
|
||||
* Find non-0 monitors (i.e., actual addresses, not FTD monitors)
|
||||
|
@ -133,7 +133,7 @@ struct rfapi_descriptor
|
||||
uint32_t flags;
|
||||
#define RFAPI_HD_FLAG_CALLBACK_SCHEDULED_AFI_IP 0x00000001
|
||||
#define RFAPI_HD_FLAG_CALLBACK_SCHEDULED_AFI_IP6 0x00000002
|
||||
#define RFAPI_HD_FLAG_CALLBACK_SCHEDULED_AFI_ETHER 0x00000004
|
||||
#define RFAPI_HD_FLAG_CALLBACK_SCHEDULED_AFI_L2VPN 0x00000004
|
||||
#define RFAPI_HD_FLAG_PROVISIONAL 0x00000008
|
||||
#define RFAPI_HD_FLAG_CLOSING_ADMINISTRATIVELY 0x00000010
|
||||
#define RFAPI_HD_FLAG_IS_VRF 0x00000012
|
||||
@ -142,7 +142,7 @@ struct rfapi_descriptor
|
||||
#define RFAPI_QUEUED_FLAG(afi) ( \
|
||||
((afi) == AFI_IP)? RFAPI_HD_FLAG_CALLBACK_SCHEDULED_AFI_IP: \
|
||||
(((afi) == AFI_IP6)? RFAPI_HD_FLAG_CALLBACK_SCHEDULED_AFI_IP6: \
|
||||
(((afi) == AFI_ETHER)? RFAPI_HD_FLAG_CALLBACK_SCHEDULED_AFI_ETHER: \
|
||||
(((afi) == AFI_L2VPN)? RFAPI_HD_FLAG_CALLBACK_SCHEDULED_AFI_L2VPN: \
|
||||
(assert(0), 0) )))
|
||||
|
||||
|
||||
|
@ -916,7 +916,7 @@ process_pending_node (
|
||||
vnc_zlog_debug_verbose ("%s: afi=%d, %s pn->info=%p",
|
||||
__func__, afi, buf_prefix, pn->info);
|
||||
|
||||
if (AFI_ETHER != afi)
|
||||
if (AFI_L2VPN != afi)
|
||||
{
|
||||
rfapiQprefix2Rprefix (&pn->p, &hp);
|
||||
}
|
||||
@ -1246,7 +1246,7 @@ callback:
|
||||
else
|
||||
{
|
||||
new->prefix = hp;
|
||||
if (AFI_ETHER == afi)
|
||||
if (AFI_L2VPN == afi)
|
||||
{
|
||||
/* hp is 0; need to set length to match AF of vn */
|
||||
new->prefix.length =
|
||||
@ -1334,7 +1334,7 @@ callback:
|
||||
else
|
||||
{
|
||||
new->prefix = hp;
|
||||
if (AFI_ETHER == afi)
|
||||
if (AFI_L2VPN == afi)
|
||||
{
|
||||
/* hp is 0; need to set length to match AF of vn */
|
||||
new->prefix.length =
|
||||
@ -1976,7 +1976,7 @@ rfapiRibPreload (
|
||||
continue;
|
||||
}
|
||||
|
||||
afi = AFI_ETHER;
|
||||
afi = AFI_L2VPN;
|
||||
rfapiL2o2Qprefix (pL2o, &pfx);
|
||||
}
|
||||
else
|
||||
@ -2181,7 +2181,7 @@ rfapiRibPendingDeleteRoute (
|
||||
vnc_zlog_debug_verbose ("%s: entry, it=%p, afi=%d, it_node=%p, pfx=%s",
|
||||
__func__, it, afi, it_node, buf);
|
||||
|
||||
if (AFI_ETHER == afi)
|
||||
if (AFI_L2VPN == afi)
|
||||
{
|
||||
/*
|
||||
* ethernet import tables are per-LNI and each ethernet monitor
|
||||
|
@ -1329,7 +1329,7 @@ rfapiShowRemoteRegistrationsIt (
|
||||
int show_local,
|
||||
int show_remote,
|
||||
int show_imported, /* either/or */
|
||||
uint32_t *pLni) /* AFI_ETHER only */
|
||||
uint32_t *pLni) /* AFI_L2VPN only */
|
||||
{
|
||||
afi_t afi;
|
||||
int printed_rtlist_hdr = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user