| 345 | } |
| 346 | |
| 347 | static uint16_t |
| 348 | virtual_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 | |
| 377 | static uint16_t |
| 378 | virtual_ethdev_tx_burst_fail(void *queue, struct rte_mbuf **bufs, |
nothing calls this directly
no test coverage detected