]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: rebase dataplane, align with master
authorMark Stapp <mjs@voltanet.io>
Wed, 26 Sep 2018 13:34:43 +0000 (09:34 -0400)
committerMark Stapp <mjs@voltanet.io>
Thu, 25 Oct 2018 12:57:04 +0000 (08:57 -0400)
Rebase and pick up dataplane changes on master, including
renamed structs and enums.

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

index 0a58c2e2625b7300b9e96c7d073743c59e82f1ca..0772c59b9228b63f01afffb03b27fef7ad65a415 100644 (file)
@@ -934,7 +934,7 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
  *
  * filter   -> The filter to read final results from kernel
  * nlmsghdr -> The data to send to the kernel
- * zns_info -> The netlink socket information
+ * dp_info -> The dataplane and netlink socket information
  * startup  -> Are we reading in under startup conditions
  *             This is passed through eventually to filter.
  */
@@ -990,7 +990,6 @@ int netlink_talk_info(int (*filter)(struct nlmsghdr *, ns_id_t, int startup),
                return -1;
        }
 
-
        /*
         * Get reply from netlink socket.
         * The reply should either be an acknowlegement or an error.
@@ -1001,7 +1000,6 @@ int netlink_talk_info(int (*filter)(struct nlmsghdr *, ns_id_t, int startup),
 /*
  * Synchronous version of netlink_talk_info. Converts args to suit the
  * common version, which is suitable for both sync and async use.
- *
  */
 int netlink_talk(int (*filter)(struct nlmsghdr *, ns_id_t, int startup),
                 struct nlmsghdr *n, struct nlsock *nl, struct zebra_ns *zns,
index f3de011b66f5e21fac126e827f5f2e9e410a0191..9918729eb66adc959082f81b574a4c363dfb7451 100644 (file)
@@ -53,7 +53,7 @@ extern void netlink_read_init(const char *fname);
 #endif /* HANDLE_NETLINK_FUZZING */
 extern int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
                              const struct nlsock *nl,
-                             const struct zebra_dplane_info *zns,
+                             const struct zebra_dplane_info *dp_info,
                              int count, int startup);
 extern int netlink_talk_filter(struct nlmsghdr *h, ns_id_t ns, int startup);
 extern int netlink_talk(int (*filter)(struct nlmsghdr *, ns_id_t, int startup),
@@ -62,8 +62,7 @@ extern int netlink_talk(int (*filter)(struct nlmsghdr *, ns_id_t, int startup),
 /* Version with 'info' struct only */
 int netlink_talk_info(int (*filter)(struct nlmsghdr *, ns_id_t, int startup),
                      struct nlmsghdr *n,
-                     const struct zebra_dplane_info *dp_info,
-                     int startup);
+                     const struct zebra_dplane_info *dp_info, int startup);
 
 extern int netlink_request(struct nlsock *nl, struct nlmsghdr *n);
 
index 9d75ae940a79c6558aacfef84a76ac23e13d2450..0581edfd6d9561969a927217e95eb3408cc57e35 100644 (file)
@@ -70,8 +70,8 @@ struct zebra_dplane_ctx {
        enum zebra_dplane_result zd_status;
 
        /* TODO -- internal/sub-operation status? */
-       enum zebra_dplane_status zd_remote_status;
-       enum zebra_dplane_status zd_kernel_status;
+       enum zebra_dplane_result zd_remote_status;
+       enum zebra_dplane_result zd_kernel_status;
 
        /* Dest and (optional) source prefixes */
        struct prefix zd_dest;
index 037c7322b789c9e8cc813630b7e628d4d8695fcd..ed70a34c0bfbe1e8c06b97d598782c9ee6f1c456 100644 (file)
@@ -87,40 +87,6 @@ struct zebra_ns {
        struct ns *ns;
 };
 
-/* Key netlink info from zebra ns, passed from the zebra main context
- * to the dataplane/kernel context (which might be in a different pthread).
- */
-struct zebra_ns_info {
-       ns_id_t ns_id;
-
-#if defined(HAVE_NETLINK)
-       struct nlsock nls;
-       uint32_t nl_cmd_pid;
-       bool is_cmd;
-#endif
-};
-
-/* Utility to fill in zns info from main zns struct */
-static inline void zebra_ns_info_from_ns(struct zebra_ns_info *zns_info,
-                                        const struct zebra_ns *zns,
-                                        bool is_cmd)
-{
-       zns_info->ns_id = zns->ns_id;
-
-#if defined(HAVE_NETLINK)
-       /* Need to know whether we're using the 'command' netlink socket,
-        * and need to know its port-id to handle some test/filtering
-        * cases.
-        */
-       zns_info->is_cmd = is_cmd;
-       zns_info->nl_cmd_pid = zns->netlink_cmd.snl.nl_pid;
-       if (is_cmd)
-               zns_info->nls = zns->netlink_cmd;
-       else
-               zns_info->nls = zns->netlink;
-#endif /* NETLINK */
-}
-
 struct zebra_ns *zebra_ns_lookup(ns_id_t ns_id);
 
 int zebra_ns_init(void);
index 0d1a149694664221683ae02d8076d0812ad3d20b..becdfaada7dbd49b82057462b1599533911dff71 100644 (file)
@@ -2191,8 +2191,8 @@ static wq_item_status meta_queue_process(struct work_queue *dummy, void *data)
        queue_len = dplane_get_in_queue_len();
        if (queue_len > queue_limit) {
                if (IS_ZEBRA_DEBUG_RIB_DETAILED)
-                       zlog_debug("meta_queue_process: dplane queue len %u, "
-                                  "limit %u, retrying", queue_len, queue_limit);
+                       zlog_debug("rib queue: dplane queue len %u, limit %u, retrying",
+                                  queue_len, queue_limit);
 
                /* Ensure that the meta-queue is actually enqueued */
                if (work_queue_empty(zebrad.ribq))