| 135 | } |
| 136 | |
| 137 | static struct bpf_eth_cbi * |
| 138 | bpf_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. |
no test coverage detected