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

Function flush_rx_queue

dpdk/examples/server_node_efd/efd_server/main.c:219–238  ·  view source on GitHub ↗

Flush rx queue. 8< */

Source from the content-addressed store, hash-verified

217
218/* Flush rx queue. 8< */
219static void
220flush_rx_queue(uint16_t node)
221{
222 uint16_t j;
223 struct node *cl;
224
225 if (cl_rx_buf[node].count == 0)
226 return;
227
228 cl = &nodes[node];
229 if (rte_ring_enqueue_bulk(cl->rx_q, (void **)cl_rx_buf[node].buffer,
230 cl_rx_buf[node].count, NULL) != cl_rx_buf[node].count){
231 for (j = 0; j < cl_rx_buf[node].count; j++)
232 rte_pktmbuf_free(cl_rx_buf[node].buffer[j]);
233 cl->stats.rx_drop += cl_rx_buf[node].count;
234 } else
235 cl->stats.rx += cl_rx_buf[node].count;
236
237 cl_rx_buf[node].count = 0;
238}
239/* >8 End of sending a burst of traffic to a node. */
240
241/*

Callers 1

process_packetsFunction · 0.70

Calls 2

rte_ring_enqueue_bulkFunction · 0.85
rte_pktmbuf_freeFunction · 0.85

Tested by

no test coverage detected