]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pbrd: consolidate rule_notify debugs into one call
authorStephen Worley <sworley@cumulusnetworks.com>
Tue, 3 Dec 2019 21:25:40 +0000 (16:25 -0500)
committerStephen Worley <sworley@cumulusnetworks.com>
Tue, 3 Dec 2019 21:25:40 +0000 (16:25 -0500)
Consolidate the rule_notify_owner() debugs based on type
into one call, making use of zapi_rule_notify_owner2str()
to do so.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
pbrd/pbr_zebra.c

index f0b0f8891a52d1daccbd69d42856e65338e83e61..06ad0f40a47a4fe71e00f028e56e5926f346dcb8 100644 (file)
@@ -234,28 +234,21 @@ static int rule_notify_owner(ZAPI_CALLBACK_ARGS)
        switch (note) {
        case ZAPI_RULE_FAIL_INSTALL:
                pbrms->installed &= ~installed;
-               DEBUGD(&pbr_dbg_zebra,
-                      "%s: Received RULE_FAIL_INSTALL: %" PRIu64,
-                      __PRETTY_FUNCTION__, pbrms->installed);
                break;
        case ZAPI_RULE_INSTALLED:
                pbrms->installed |= installed;
-               DEBUGD(&pbr_dbg_zebra, "%s: Received RULE_INSTALLED: %" PRIu64,
-                      __PRETTY_FUNCTION__, pbrms->installed);
                break;
        case ZAPI_RULE_FAIL_REMOVE:
                /* Don't change state on rule removal failure */
-               DEBUGD(&pbr_dbg_zebra,
-                      "%s: Received RULE_FAIL_REMOVED: %" PRIu64,
-                      __PRETTY_FUNCTION__, pbrms->installed);
                break;
        case ZAPI_RULE_REMOVED:
                pbrms->installed &= ~installed;
-               DEBUGD(&pbr_dbg_zebra, "%s: Received RULE REMOVED: %" PRIu64,
-                      __PRETTY_FUNCTION__, pbrms->installed);
                break;
        }
 
+       DEBUGD(&pbr_dbg_zebra, "%s: Received %s: %" PRIu64, __func__,
+              zapi_rule_notify_owner2str(note), pbrms->installed);
+
        pbr_map_final_interface_deletion(pbrms->parent, pmi);
 
        return 0;