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

Function bpf_eth_cbh_add

dpdk/lib/bpf/bpf_pkt.c:137–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137static struct bpf_eth_cbi *
138bpf_eth_cbh_add(struct bpf_eth_cbh *cbh, uint16_t port, uint16_t queue)
139{
140 struct bpf_eth_cbi *cbi;
141
142 /* return an existing one */
143 cbi = bpf_eth_cbh_find(cbh, port, queue);
144 if (cbi != NULL)
145 return cbi;
146
147 cbi = rte_zmalloc(NULL, sizeof(*cbi), RTE_CACHE_LINE_SIZE);
148 if (cbi != NULL) {
149 cbi->port = port;
150 cbi->queue = queue;
151 LIST_INSERT_HEAD(&cbh->list, cbi, link);
152 }
153 return cbi;
154}
155
156/*
157 * BPF packet processing routines.

Callers 1

bpf_eth_elf_loadFunction · 0.85

Calls 2

bpf_eth_cbh_findFunction · 0.85
rte_zmallocFunction · 0.85

Tested by

no test coverage detected