]> git.puffer.fish Git - mirror/frr.git/commitdiff
zebra: begin evpn neighbor install via dataplane
authorMark Stapp <mjs@voltanet.io>
Fri, 2 Aug 2019 20:26:30 +0000 (16:26 -0400)
committerMark Stapp <mjs@voltanet.io>
Fri, 23 Aug 2019 14:09:38 +0000 (10:09 -0400)
Initial work to move evpn neighbor programming to the dataplane
subsystem.

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

index 5414502fa3f5d4fd4b5fa2b33a42501a175ccccc..668503fd60f1975357dfd04f3f34d4b956a8f9aa 100644 (file)
@@ -485,6 +485,8 @@ static void dplane_ctx_free(struct zebra_dplane_ctx **pctx)
 
        case DPLANE_OP_MAC_INSTALL:
        case DPLANE_OP_MAC_DELETE:
+       case DPLANE_OP_NEIGH_INSTALL:
+       case DPLANE_OP_NEIGH_DELETE:
        case DPLANE_OP_NONE:
                break;
        }
@@ -651,6 +653,13 @@ const char *dplane_op2str(enum dplane_op_e op)
        case DPLANE_OP_MAC_DELETE:
                ret = "MAC_DELETE";
                break;
+
+       case DPLANE_OP_NEIGH_INSTALL:
+               ret = "NEIGH_INSTALL";
+               break;
+       case DPLANE_OP_NEIGH_DELETE:
+               ret = "NEIGH_DELETE";
+               break;
        }
 
        return ret;
index 912fda45d34c6274590197c5de446bfc24502cfe..f5f91b47f04acffbb64a639df61b9afdcffa3032 100644 (file)
@@ -129,6 +129,10 @@ enum dplane_op_e {
        /* MAC address update */
        DPLANE_OP_MAC_INSTALL,
        DPLANE_OP_MAC_DELETE,
+
+       /* EVPN neighbor updates */
+       DPLANE_OP_NEIGH_INSTALL,
+       DPLANE_OP_NEIGH_DELETE,
 };
 
 /* Enable system route notifications */
@@ -379,6 +383,16 @@ enum zebra_dplane_result dplane_mac_del(const struct interface *ifp,
                                        const struct ethaddr *mac,
                                        struct in_addr vtep_ip);
 
+/*
+ * Enqueue evpn neighbor updates for the dataplane.
+ */
+enum zebra_dplane_result dplane_neigh_add(const struct interface *ifp,
+                                         const struct ipaddr *ip,
+                                         const struct ethaddr *mac,
+                                         int32_t flags);
+enum zebra_dplane_result dplane_neigh_del(const struct interface *ifp,
+                                         const struct ipaddr *ip);
+
 /* Retrieve the limit on the number of pending, unprocessed updates. */
 uint32_t dplane_get_in_queue_limit(void);