From: Stephen Worley Date: Tue, 1 Dec 2020 17:04:30 +0000 (-0500) Subject: zebra: make a couple NHG errors debugs X-Git-Tag: base_7.6~183^2~1 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=306720345a1ce820faf1f3983a7ab4330b777811;p=matthieu%2Ffrr.git zebra: make a couple NHG errors debugs A couple NHG messages we were logging as errors are a bit spammy in usecases where you routinely add/remove interfaces (VM heavy deployments). Its not really an error a user cares about and more for a developer to know what went wrong after the fact so it makes more sense for these to be under a debug rather than an error since seeing them does not implicitly mean error during those usecases. Signed-off-by: Stephen Worley --- diff --git a/zebra/zebra_nhg.c b/zebra/zebra_nhg.c index 196e3c83d0..375be45df0 100644 --- a/zebra/zebra_nhg.c +++ b/zebra/zebra_nhg.c @@ -450,12 +450,13 @@ static void *zebra_nhg_hash_alloc(void *arg) nhe->nhg.nexthop->vrf_id); if (ifp) zebra_nhg_set_if(nhe, ifp); - else - flog_err( - EC_ZEBRA_IF_LOOKUP_FAILED, - "Zebra failed to lookup an interface with ifindex=%d in vrf=%u for NHE id=%u", - nhe->nhg.nexthop->ifindex, - nhe->nhg.nexthop->vrf_id, nhe->id); + else { + if (IS_ZEBRA_DEBUG_NHG) + zlog_debug( + "Failed to lookup an interface with ifindex=%d in vrf=%u for NHE id=%u", + nhe->nhg.nexthop->ifindex, + nhe->nhg.nexthop->vrf_id, nhe->id); + } } return nhe; @@ -2649,10 +2650,11 @@ void zebra_nhg_dplane_result(struct zebra_dplane_ctx *ctx) nhe = zebra_nhg_lookup_id(id); if (!nhe) { - flog_err( - EC_ZEBRA_NHG_SYNC, - "%s operation preformed on Nexthop ID (%u) in the kernel, that we no longer have in our table", - dplane_op2str(op), id); + if (IS_ZEBRA_DEBUG_NHG) + zlog_debug( + "%s operation preformed on Nexthop ID (%u) in the kernel, that we no longer have in our table", + dplane_op2str(op), id); + break; }