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

Function setup_udp4_dstprt_hash

dpdk/lib/node/udp4_input.c:96–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96static int
97setup_udp4_dstprt_hash(struct udp4_input_node_main *nm, int socket)
98{
99 struct rte_hash_parameters *hash_udp4 = &udp4_params;
100 char s[RTE_HASH_NAMESIZE];
101
102 /* One Hash table per socket */
103 if (nm->hash_tbl[socket])
104 return 0;
105
106 /* create Hash table */
107 snprintf(s, sizeof(s), "UDP4_INPUT_HASH_%d", socket);
108 hash_udp4->name = s;
109 hash_udp4->socket_id = socket;
110 nm->hash_tbl[socket] = rte_hash_create(hash_udp4);
111 if (nm->hash_tbl[socket] == NULL)
112 return -rte_errno;
113
114 return 0;
115}
116
117static int
118udp4_input_node_init(const struct rte_graph *graph, struct rte_node *node)

Callers 1

udp4_input_node_initFunction · 0.85

Calls 2

snprintfFunction · 0.85
rte_hash_createFunction · 0.85

Tested by

no test coverage detected