#pragma once #include #include #include #include #include #include #include struct graph_handlers { char graph_symbol[MR_SYMBOL_MAX]; unsigned int graph_id; unsigned int lcore_id; struct rte_graph * graph_handle; }; struct node_setup_desc { TAILQ_ENTRY(node_setup_desc) entries; char node_symbol[MR_SYMBOL_MAX]; }; struct node_manager_main { /* workers */ unsigned int nr_workers; /* node configration for physical devices */ struct rte_node_ethdev_config node_ethdev_config[RTE_MAX_ETHPORTS]; unsigned int nr_node_ethdev_config; /* node descs for each workers */ TAILQ_HEAD(node_setup_desc_head, node_setup_desc) node_setup_descs[RTE_MAX_LCORE]; unsigned int nr_node_setup_descs[RTE_MAX_LCORE]; /* graph handlers for each worker */ struct graph_handlers graph_handlers[RTE_MAX_LCORE]; }; struct node_mbuf_shared_ctx { struct { uint64_t port_ingress_is_shmdev : 1; uint64_t port_egress_is_shmdev : 1; }; uint16_t port_ingress; uint16_t port_egress; uint16_t lb_group_id; uint32_t si; }; extern int node_mbuf_shared_ctx_offset; static __rte_always_inline struct node_mbuf_shared_ctx * to_node_mbuf_shared_ctx(struct rte_mbuf * m) { return RTE_MBUF_DYNFIELD(m, node_mbuf_shared_ctx_offset, struct node_mbuf_shared_ctx *); } void node_setup_desc_add_for_all_workers(struct node_manager_main * node_mgr_main, const char * node_sym);