]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: avoid default clause in FPM switch
authorMark Stapp <mstapp@nvidia.com>
Wed, 27 Oct 2021 17:56:06 +0000 (13:56 -0400)
committerMark Stapp <mstapp@nvidia.com>
Fri, 25 Feb 2022 14:53:02 +0000 (09:53 -0500)
Avoid default clause in a switch in the FPM module that handles
dplane op codes - include all the codes.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
zebra/dplane_fpm_nl.c

index ce3c8d4b115033e7aab5d92280c0d7676398b2c2..0baef5bdb561329e609ee8ebda469bed1faea72f 100644 (file)
@@ -780,6 +780,7 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
                nl_buf_len += (size_t)rv;
                break;
 
+       /* Un-handled by FPM at this time. */
        case DPLANE_OP_PW_INSTALL:
        case DPLANE_OP_PW_UNINSTALL:
        case DPLANE_OP_ADDR_INSTALL:
@@ -793,15 +794,26 @@ static int fpm_nl_enqueue(struct fpm_nl_ctx *fnc, struct zebra_dplane_ctx *ctx)
        case DPLANE_OP_SYS_ROUTE_DELETE:
        case DPLANE_OP_ROUTE_NOTIFY:
        case DPLANE_OP_LSP_NOTIFY:
+       case DPLANE_OP_RULE_ADD:
+       case DPLANE_OP_RULE_DELETE:
+       case DPLANE_OP_RULE_UPDATE:
+       case DPLANE_OP_NEIGH_DISCOVER:
+       case DPLANE_OP_BR_PORT_UPDATE:
+       case DPLANE_OP_IPTABLE_ADD:
+       case DPLANE_OP_IPTABLE_DELETE:
+       case DPLANE_OP_IPSET_ADD:
+       case DPLANE_OP_IPSET_DELETE:
+       case DPLANE_OP_IPSET_ENTRY_ADD:
+       case DPLANE_OP_IPSET_ENTRY_DELETE:
+       case DPLANE_OP_NEIGH_IP_INSTALL:
+       case DPLANE_OP_NEIGH_IP_DELETE:
+       case DPLANE_OP_NEIGH_TABLE_UPDATE:
+       case DPLANE_OP_GRE_SET:
+       case DPLANE_OP_INTF_ADDR_ADD:
+       case DPLANE_OP_INTF_ADDR_DEL:
        case DPLANE_OP_NONE:
                break;
 
-       default:
-               if (IS_ZEBRA_DEBUG_FPM)
-                       zlog_debug("%s: unhandled data plane message (%d) %s",
-                                  __func__, dplane_ctx_get_op(ctx),
-                                  dplane_op2str(dplane_ctx_get_op(ctx)));
-               break;
        }
 
        /* Skip empty enqueues. */