*
* 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.
*/
return -1;
}
-
/*
* Get reply from netlink socket.
* The reply should either be an acknowlegement or an error.
/*
* 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,
#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),
/* 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);
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;
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);
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))