]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: quiet the zebra opaque message debugs 7298/head
authorMark Stapp <mjs@voltanet.io>
Tue, 13 Oct 2020 17:50:55 +0000 (13:50 -0400)
committerMark Stapp <mjs@voltanet.io>
Tue, 13 Oct 2020 18:07:17 +0000 (14:07 -0400)
Put most of the debugs about opaque ZAPI messages under 'detail'
to reduce the noise.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
zebra/zebra_opaque.c

index 41e278f71b660c3e9a2ba8ba0b0e89e8149e9ba3..1d59e0ab3486b4ff6c5e7e26e91db8fee4d4a75d 100644 (file)
@@ -258,7 +258,7 @@ uint32_t zebra_opaque_enqueue_batch(struct stream_fifo *batch)
 
        /* Schedule module pthread to process the batch */
        if (counter > 0) {
-               if (IS_ZEBRA_DEBUG_RECV)
+               if (IS_ZEBRA_DEBUG_RECV && IS_ZEBRA_DEBUG_DETAIL)
                        zlog_debug("%s: received %u messages",
                                   __func__, counter);
                thread_add_event(zo_info.master, process_messages, NULL, 0,
@@ -315,7 +315,7 @@ static int process_messages(struct thread *event)
                goto done;
        }
 
-       if (IS_ZEBRA_DEBUG_RECV)
+       if (IS_ZEBRA_DEBUG_RECV && IS_ZEBRA_DEBUG_DETAIL)
                zlog_debug("%s: processing %u messages", __func__, i);
 
        /*
@@ -381,7 +381,7 @@ static int dispatch_opq_messages(struct stream_fifo *msg_fifo)
                /* Look up registered ZAPI client(s) */
                reg = opq_reg_lookup(info.type);
                if (reg == NULL) {
-                       if (IS_ZEBRA_DEBUG_RECV)
+                       if (IS_ZEBRA_DEBUG_RECV && IS_ZEBRA_DEBUG_DETAIL)
                                zlog_debug("%s: no registrations for opaque type %u, flags %#x",
                                           __func__, info.type, info.flags);
                        goto drop_it;
@@ -401,7 +401,8 @@ static int dispatch_opq_messages(struct stream_fifo *msg_fifo)
                                    client->session_id != info.session_id)
                                        continue;
 
-                               if (IS_ZEBRA_DEBUG_RECV)
+                               if (IS_ZEBRA_DEBUG_RECV &&
+                                   IS_ZEBRA_DEBUG_DETAIL)
                                        zlog_debug("%s: found matching unicast client %s",
                                                   __func__,
                                                   opq_client2str(buf,
@@ -423,7 +424,8 @@ static int dispatch_opq_messages(struct stream_fifo *msg_fifo)
                                                       client->instance,
                                                       client->session_id);
                        if (zclient) {
-                               if (IS_ZEBRA_DEBUG_RECV)
+                               if (IS_ZEBRA_DEBUG_SEND &&
+                                   IS_ZEBRA_DEBUG_DETAIL)
                                        zlog_debug("%s: sending %s to client %s",
                                                   __func__,
                                                   (dup ? "dup" : "msg"),
@@ -444,7 +446,8 @@ static int dispatch_opq_messages(struct stream_fifo *msg_fifo)
 
                                zserv_release_client(zclient);
                        } else {
-                               if (IS_ZEBRA_DEBUG_RECV)
+                               if (IS_ZEBRA_DEBUG_RECV &&
+                                   IS_ZEBRA_DEBUG_DETAIL)
                                        zlog_debug("%s: type %u: no zclient for %s",
                                                   __func__, info.type,
                                                   opq_client2str(buf,
@@ -615,10 +618,6 @@ static int handle_opq_unregistration(const struct zmsghdr *hdr,
 
        /* Is registration empty now? */
        if (reg->clients == NULL) {
-               if (IS_ZEBRA_DEBUG_RECV)
-                       zlog_debug("%s: free empty reg %u", __func__,
-                                  reg->type);
-
                opq_regh_del(&opq_reg_hash, reg);
                opq_reg_free(&reg);
        }