MCPcopy Create free account
hub / github.com/F-Stack/f-stack / udp4_input_node_init

Function udp4_input_node_init

dpdk/lib/node/udp4_input.c:117–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

115}
116
117static int
118udp4_input_node_init(const struct rte_graph *graph, struct rte_node *node)
119{
120 uint16_t socket, lcore_id;
121 static uint8_t init_once;
122 int rc;
123
124 RTE_SET_USED(graph);
125 RTE_BUILD_BUG_ON(sizeof(struct udp4_input_node_ctx) > RTE_NODE_CTX_SZ);
126
127 if (!init_once) {
128
129 /* Setup HASH tables for all sockets */
130 RTE_LCORE_FOREACH(lcore_id)
131 {
132 socket = rte_lcore_to_socket_id(lcore_id);
133 rc = setup_udp4_dstprt_hash(&udp4_input_nm, socket);
134 if (rc) {
135 node_err("udp4_lookup",
136 "Failed to setup hash tbl for sock %u, rc=%d",
137 socket, rc);
138 return rc;
139 }
140 }
141 init_once = 1;
142 }
143
144 UDP4_INPUT_NODE_HASH(node->ctx) = udp4_input_nm.hash_tbl[graph->socket];
145
146 node_dbg("udp4_input", "Initialized udp4_input node");
147 return 0;
148}
149
150static uint16_t
151udp4_input_node_process_scalar(struct rte_graph *graph, struct rte_node *node,

Callers

nothing calls this directly

Calls 2

rte_lcore_to_socket_idFunction · 0.85
setup_udp4_dstprt_hashFunction · 0.85

Tested by

no test coverage detected