summaryrefslogtreecommitdiff
path: root/zebra/zebra_vxlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_vxlan.c')
-rw-r--r--zebra/zebra_vxlan.c105
1 files changed, 54 insertions, 51 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index 33d0bcd23a..1570edcad7 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -208,8 +208,8 @@ static int host_rb_entry_compare(const struct host_rb_entry *hle1,
return 0;
} else {
- zlog_warn("%s: Unexpected family type: %d", __PRETTY_FUNCTION__,
- hle1->p.family);
+ zlog_debug("%s: Unexpected family type: %d",
+ __PRETTY_FUNCTION__, hle1->p.family);
return 0;
}
}
@@ -1594,8 +1594,8 @@ static int zvni_neigh_uninstall(zebra_vni_t *zvni, zebra_neigh_t *n)
return 0;
if (!zvni->vxlan_if) {
- zlog_warn("VNI %u hash %p couldn't be uninstalled - no intf",
- zvni->vni, zvni);
+ zlog_debug("VNI %u hash %p couldn't be uninstalled - no intf",
+ zvni->vni, zvni);
return -1;
}
@@ -1845,9 +1845,9 @@ static int zvni_gw_macip_del(struct interface *ifp, zebra_vni_t *zvni,
/* mac entry should be present */
mac = zvni_mac_lookup(zvni, &n->emac);
if (!mac) {
- zlog_warn("MAC %s doesnt exists for neigh %s on VNI %u",
- prefix_mac2str(&n->emac, buf1, sizeof(buf1)),
- ipaddr2str(ip, buf2, sizeof(buf2)), zvni->vni);
+ zlog_debug("MAC %s doesnt exists for neigh %s on VNI %u",
+ prefix_mac2str(&n->emac, buf1, sizeof(buf1)),
+ ipaddr2str(ip, buf2, sizeof(buf2)), zvni->vni);
return -1;
}
@@ -1982,9 +1982,9 @@ static int zvni_local_neigh_update(zebra_vni_t *zvni,
zmac = zvni_mac_add(zvni, macaddr);
if (!zmac) {
- zlog_warn("Failed to add MAC %s VNI %u",
- prefix_mac2str(macaddr, buf, sizeof(buf)),
- zvni->vni);
+ zlog_debug("Failed to add MAC %s VNI %u",
+ prefix_mac2str(macaddr, buf, sizeof(buf)),
+ zvni->vni);
return -1;
}
@@ -2189,7 +2189,7 @@ static int zvni_remote_neigh_update(zebra_vni_t *zvni,
*/
zmac = zvni_mac_lookup(zvni, macaddr);
if (!zmac || !CHECK_FLAG(zmac->flags, ZEBRA_MAC_REMOTE)) {
- zlog_warn(
+ zlog_debug(
"Ignore remote neigh %s (MAC %s) on L2-VNI %u - MAC unknown or local",
ipaddr2str(&n->ip, buf2, sizeof(buf2)),
prefix_mac2str(macaddr, buf, sizeof(buf)),
@@ -2622,8 +2622,8 @@ static int zvni_mac_uninstall(zebra_vni_t *zvni, zebra_mac_t *mac, int local)
return 0;
if (!zvni->vxlan_if) {
- zlog_warn("VNI %u hash %p couldn't be uninstalled - no intf",
- zvni->vni, zvni);
+ zlog_debug("VNI %u hash %p couldn't be uninstalled - no intf",
+ zvni->vni, zvni);
return -1;
}
@@ -2950,7 +2950,7 @@ static void zvni_build_hash_table()
/* VNI hash entry is not expected to exist. */
zvni = zvni_lookup(vni);
if (zvni) {
- zlog_warn(
+ zlog_debug(
"VNI hash already present for IF %s(%u) L2-VNI %u",
ifp->name, ifp->ifindex, vni);
continue;
@@ -2958,7 +2958,7 @@ static void zvni_build_hash_table()
zvni = zvni_add(vni);
if (!zvni) {
- zlog_warn(
+ zlog_debug(
"Failed to add VNI hash, IF %s(%u) L2-VNI %u",
ifp->name, ifp->ifindex, vni);
return;
@@ -3081,8 +3081,8 @@ static int zvni_vtep_install(zebra_vni_t *zvni, struct in_addr *vtep_ip)
static int zvni_vtep_uninstall(zebra_vni_t *zvni, struct in_addr *vtep_ip)
{
if (!zvni->vxlan_if) {
- zlog_warn("VNI %u hash %p couldn't be uninstalled - no intf",
- zvni->vni, zvni);
+ zlog_debug("VNI %u hash %p couldn't be uninstalled - no intf",
+ zvni->vni, zvni);
return -1;
}
@@ -3272,7 +3272,7 @@ static int zl3vni_rmac_uninstall(zebra_l3vni_t *zl3vni, zebra_mac_t *zrmac)
return 0;
if (!zl3vni->vxlan_if) {
- zlog_warn(
+ zlog_debug(
"RMAC %s on L3-VNI %u hash %p couldn't be uninstalled - no vxlan_if",
prefix_mac2str(&zrmac->macaddr, buf, sizeof(buf)),
zl3vni->vni, zl3vni);
@@ -3303,7 +3303,7 @@ static int zl3vni_remote_rmac_add(zebra_l3vni_t *zl3vni, struct ethaddr *rmac,
zrmac = zl3vni_rmac_add(zl3vni, rmac);
if (!zrmac) {
- zlog_warn(
+ zlog_debug(
"Failed to add RMAC %s L3VNI %u Remote VTEP %s",
prefix_mac2str(rmac, buf, sizeof(buf)),
zl3vni->vni,
@@ -3467,7 +3467,7 @@ static int zl3vni_remote_nh_add(zebra_l3vni_t *zl3vni, struct ipaddr *vtep_ip,
nh = zl3vni_nh_add(zl3vni, vtep_ip, rmac);
if (!nh) {
- zlog_warn(
+ zlog_debug(
"Failed to add NH as Neigh (IP %s MAC %s L3-VNI %u)",
ipaddr2str(vtep_ip, buf1, sizeof(buf1)),
prefix_mac2str(rmac, buf, sizeof(buf)),
@@ -5322,7 +5322,7 @@ int zebra_vxlan_handle_kernel_neigh_del(struct interface *ifp,
return 0;
if (!zvni->vxlan_if) {
- zlog_warn(
+ zlog_debug(
"VNI %u hash %p doesn't have intf upon local neighbor DEL",
zvni->vni, zvni);
return -1;
@@ -5341,7 +5341,7 @@ int zebra_vxlan_handle_kernel_neigh_del(struct interface *ifp,
zmac = zvni_mac_lookup(zvni, &n->emac);
if (!zmac) {
if (IS_ZEBRA_DEBUG_VXLAN)
- zlog_warn(
+ zlog_debug(
"Trying to del a neigh %s without a mac %s on VNI %u",
ipaddr2str(ip, buf, sizeof(buf)),
prefix_mac2str(&n->emac, buf2, sizeof(buf2)),
@@ -5474,7 +5474,6 @@ void zebra_vxlan_remote_macip_del(ZAPI_HANDLER_ARGS)
zebra_route_string(client->proto));
process_remote_macip_del(vni, &macaddr, ipa_len, &ip, vtep_ip);
-
}
stream_failure:
@@ -5504,7 +5503,7 @@ void zebra_vxlan_remote_macip_add(ZAPI_HANDLER_ARGS)
memset(&vtep_ip, 0, sizeof(struct in_addr));
if (!EVPN_ENABLED(zvrf)) {
- zlog_warn("EVPN not enabled, ignoring remote MACIP ADD");
+ zlog_debug("EVPN not enabled, ignoring remote MACIP ADD");
return;
}
@@ -5686,8 +5685,9 @@ int zebra_vxlan_local_mac_del(struct interface *ifp, struct interface *br_if,
if (!zvni)
return 0;
if (!zvni->vxlan_if) {
- zlog_warn("VNI %u hash %p doesn't have intf upon local MAC DEL",
- zvni->vni, zvni);
+ zlog_debug(
+ "VNI %u hash %p doesn't have intf upon local MAC DEL",
+ zvni->vni, zvni);
return -1;
}
@@ -5755,8 +5755,9 @@ int zebra_vxlan_local_mac_add_update(struct interface *ifp,
}
if (!zvni->vxlan_if) {
- zlog_warn("VNI %u hash %p doesn't have intf upon local MAC ADD",
- zvni->vni, zvni);
+ zlog_debug(
+ "VNI %u hash %p doesn't have intf upon local MAC ADD",
+ zvni->vni, zvni);
return -1;
}
@@ -5841,8 +5842,9 @@ int zebra_vxlan_local_mac_add_update(struct interface *ifp,
* operator error.
*/
if (CHECK_FLAG(mac->flags, ZEBRA_MAC_STICKY)) {
- zlog_warn(
- "MAC %s already learnt as remote sticky behind VTEP %s VNI %u",
+ flog_warn(
+ ZEBRA_ERR_STICKY_MAC_ALREADY_LEARNT,
+ "MAC %s already learnt as remote sticky MAC behind VTEP %s VNI %u",
prefix_mac2str(macaddr, buf,
sizeof(buf)),
inet_ntoa(mac->fwd_info.r_vtep_ip),
@@ -5902,15 +5904,15 @@ void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS)
struct zebra_if *zif;
if (!is_evpn_enabled()) {
- zlog_warn(
+ zlog_debug(
"%s: EVPN is not enabled yet we have received a vtep del command",
__PRETTY_FUNCTION__);
return;
}
if (zvrf_id(zvrf) != VRF_DEFAULT) {
- zlog_warn("Recv MACIP DEL for non-default VRF %u",
- zvrf_id(zvrf));
+ zlog_debug("Recv MACIP DEL for non-default VRF %u",
+ zvrf_id(zvrf));
return;
}
@@ -5941,7 +5943,7 @@ void zebra_vxlan_remote_vtep_del(ZAPI_HANDLER_ARGS)
ifp = zvni->vxlan_if;
if (!ifp) {
- zlog_warn(
+ zlog_debug(
"VNI %u hash %p doesn't have intf upon remote VTEP DEL",
zvni->vni, zvni);
continue;
@@ -5986,15 +5988,15 @@ void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS)
struct zebra_if *zif;
if (!is_evpn_enabled()) {
- zlog_warn(
+ zlog_debug(
"%s: EVPN not enabled yet we received a vtep_add zapi call",
__PRETTY_FUNCTION__);
return;
}
if (zvrf_id(zvrf) != VRF_DEFAULT) {
- zlog_warn("Recv MACIP ADD for non-default VRF %u",
- zvrf_id(zvrf));
+ zlog_debug("Recv MACIP ADD for non-default VRF %u",
+ zvrf_id(zvrf));
return;
}
@@ -6096,8 +6098,8 @@ int zebra_vxlan_add_del_gw_macip(struct interface *ifp, struct prefix *p,
svi_if = if_lookup_by_index_per_ns(zebra_ns_lookup(NS_DEFAULT),
ifp_zif->link_ifindex);
if (!svi_if) {
- zlog_warn("MACVLAN %s(%u) without link information",
- ifp->name, ifp->ifindex);
+ zlog_debug("MACVLAN %s(%u) without link information",
+ ifp->name, ifp->ifindex);
return -1;
}
@@ -6144,8 +6146,8 @@ int zebra_vxlan_add_del_gw_macip(struct interface *ifp, struct prefix *p,
return 0;
if (!zvni->vxlan_if) {
- zlog_warn("VNI %u hash %p doesn't have intf upon MACVLAN up",
- zvni->vni, zvni);
+ zlog_debug("VNI %u hash %p doesn't have intf upon MACVLAN up",
+ zvni->vni, zvni);
return -1;
}
@@ -6241,7 +6243,7 @@ int zebra_vxlan_svi_up(struct interface *ifp, struct interface *link_if)
return 0;
if (!zvni->vxlan_if) {
- zlog_warn(
+ zlog_debug(
"VNI %u hash %p doesn't have intf upon SVI up",
zvni->vni, zvni);
return -1;
@@ -6304,7 +6306,7 @@ int zebra_vxlan_if_down(struct interface *ifp)
/* Locate hash entry; it is expected to exist. */
zvni = zvni_lookup(vni);
if (!zvni) {
- zlog_warn(
+ zlog_debug(
"Failed to locate VNI hash at DOWN, IF %s(%u) VNI %u",
ifp->name, ifp->ifindex, vni);
return -1;
@@ -6370,7 +6372,7 @@ int zebra_vxlan_if_up(struct interface *ifp)
/* Locate hash entry; it is expected to exist. */
zvni = zvni_lookup(vni);
if (!zvni) {
- zlog_warn(
+ zlog_debug(
"Failed to locate VNI hash at UP, IF %s(%u) VNI %u",
ifp->name, ifp->ifindex, vni);
return -1;
@@ -6441,7 +6443,7 @@ int zebra_vxlan_if_del(struct interface *ifp)
/* Locate hash entry; it is expected to exist. */
zvni = zvni_lookup(vni);
if (!zvni) {
- zlog_warn(
+ zlog_debug(
"Failed to locate VNI hash at del, IF %s(%u) VNI %u",
ifp->name, ifp->ifindex, vni);
return 0;
@@ -6552,7 +6554,7 @@ int zebra_vxlan_if_update(struct interface *ifp, uint16_t chgflags)
/* Update VNI hash. */
zvni = zvni_lookup(vni);
if (!zvni) {
- zlog_warn(
+ zlog_debug(
"Failed to find L2-VNI hash on update, IF %s(%u) VNI %u",
ifp->name, ifp->ifindex, vni);
return -1;
@@ -6884,8 +6886,8 @@ void zebra_vxlan_advertise_subnet(ZAPI_HANDLER_ARGS)
struct interface *vlan_if = NULL;
if (zvrf_id(zvrf) != VRF_DEFAULT) {
- zlog_warn("EVPN GW-MACIP Adv for non-default VRF %u",
- zvrf_id(zvrf));
+ zlog_debug("EVPN GW-MACIP Adv for non-default VRF %u",
+ zvrf_id(zvrf));
return;
}
@@ -6947,8 +6949,8 @@ void zebra_vxlan_advertise_gw_macip(ZAPI_HANDLER_ARGS)
struct interface *ifp = NULL;
if (zvrf_id(zvrf) != VRF_DEFAULT) {
- zlog_warn("EVPN GW-MACIP Adv for non-default VRF %u",
- zvrf_id(zvrf));
+ zlog_debug("EVPN GW-MACIP Adv for non-default VRF %u",
+ zvrf_id(zvrf));
return;
}
@@ -7052,7 +7054,8 @@ void zebra_vxlan_advertise_all_vni(ZAPI_HANDLER_ARGS)
struct zebra_ns *zns = NULL;
if (zvrf_id(zvrf) != VRF_DEFAULT) {
- zlog_warn("EVPN VNI Adv for non-default VRF %u", zvrf_id(zvrf));
+ zlog_debug("EVPN VNI Adv for non-default VRF %u",
+ zvrf_id(zvrf));
return;
}