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

Function pdump_rxtx

dpdk/app/pdump/main.c:464–489  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462}
463
464static inline void
465pdump_rxtx(struct rte_ring *ring, uint16_t vdev_id, struct pdump_stats *stats)
466{
467 /* write input packets of port to vdev for pdump */
468 struct rte_mbuf *rxtx_bufs[BURST_SIZE];
469
470 /* first dequeue packets from ring of primary process */
471 const uint16_t nb_in_deq = rte_ring_dequeue_burst(ring,
472 (void *)rxtx_bufs, BURST_SIZE, NULL);
473 stats->dequeue_pkts += nb_in_deq;
474
475 if (nb_in_deq) {
476 /* then sent on vdev */
477 uint16_t nb_in_txd = rte_eth_tx_burst(
478 vdev_id,
479 0, rxtx_bufs, nb_in_deq);
480 stats->tx_pkts += nb_in_txd;
481
482 if (unlikely(nb_in_txd < nb_in_deq)) {
483 unsigned int drops = nb_in_deq - nb_in_txd;
484
485 rte_pktmbuf_free_bulk(&rxtx_bufs[nb_in_txd], drops);
486 stats->freed_pkts += drops;
487 }
488 }
489}
490
491static void
492free_ring_data(struct rte_ring *ring, uint16_t vdev_id,

Callers 2

free_ring_dataFunction · 0.85
pdump_packetsFunction · 0.85

Calls 3

rte_ring_dequeue_burstFunction · 0.85
rte_eth_tx_burstFunction · 0.85
rte_pktmbuf_free_bulkFunction · 0.85

Tested by

no test coverage detected