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

Function virtual_ethdev_rx_burst_success

dpdk/app/test/virtual_pmd.c:311–337  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309
310
311static uint16_t
312virtual_ethdev_rx_burst_success(void *queue __rte_unused,
313 struct rte_mbuf **bufs,
314 uint16_t nb_pkts)
315{
316 struct rte_eth_dev *vrtl_eth_dev;
317 struct virtual_ethdev_queue *pq_map;
318 struct virtual_ethdev_private *dev_private;
319
320 int rx_count, i;
321
322 pq_map = (struct virtual_ethdev_queue *)queue;
323 vrtl_eth_dev = &rte_eth_devices[pq_map->port_id];
324 dev_private = vrtl_eth_dev->data->dev_private;
325
326 rx_count = rte_ring_dequeue_burst(dev_private->rx_queue, (void **) bufs,
327 nb_pkts, NULL);
328
329 /* increments ipackets count */
330 dev_private->eth_stats.ipackets += rx_count;
331
332 /* increments ibytes count */
333 for (i = 0; i < rx_count; i++)
334 dev_private->eth_stats.ibytes += rte_pktmbuf_pkt_len(bufs[i]);
335
336 return rx_count;
337}
338
339static uint16_t
340virtual_ethdev_rx_burst_fail(void *queue __rte_unused,

Callers

nothing calls this directly

Calls 1

rte_ring_dequeue_burstFunction · 0.85

Tested by

no test coverage detected