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

Function virtual_ethdev_tx_burst_success

dpdk/app/test/virtual_pmd.c:347–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345}
346
347static uint16_t
348virtual_ethdev_tx_burst_success(void *queue, struct rte_mbuf **bufs,
349 uint16_t nb_pkts)
350{
351 struct virtual_ethdev_queue *tx_q = queue;
352
353 struct rte_eth_dev *vrtl_eth_dev;
354 struct virtual_ethdev_private *dev_private;
355
356 int i;
357
358 vrtl_eth_dev = &rte_eth_devices[tx_q->port_id];
359 dev_private = vrtl_eth_dev->data->dev_private;
360
361 if (!vrtl_eth_dev->data->dev_link.link_status)
362 nb_pkts = 0;
363 else
364 nb_pkts = rte_ring_enqueue_burst(dev_private->tx_queue, (void **)bufs,
365 nb_pkts, NULL);
366
367 /* increment opacket count */
368 dev_private->eth_stats.opackets += nb_pkts;
369
370 /* increment obytes count */
371 for (i = 0; i < nb_pkts; i++)
372 dev_private->eth_stats.obytes += rte_pktmbuf_pkt_len(bufs[i]);
373
374 return nb_pkts;
375}
376
377static uint16_t
378virtual_ethdev_tx_burst_fail(void *queue, struct rte_mbuf **bufs,

Callers

nothing calls this directly

Calls 1

rte_ring_enqueue_burstFunction · 0.85

Tested by

no test coverage detected