]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: make a couple NHG errors debugs
authorStephen Worley <sworley@nvidia.com>
Tue, 1 Dec 2020 17:04:30 +0000 (12:04 -0500)
committerStephen Worley <sworley@nvidia.com>
Tue, 1 Dec 2020 17:04:30 +0000 (12:04 -0500)
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 <sworley@nvidia.com>
zebra/zebra_nhg.c

index 196e3c83d0a4ae18398f1a0a1dff3d6f9adce0b1..375be45df0909fe846fd2456048d1d89f648fe02 100644 (file)
@@ -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;
                }