src/dpdk/drivers/net/virtio/virtio_ethdev.c
int
virtio_inject_pkts(struct rte_eth_dev *dev, struct rte_mbuf **tx_pkts,
		int nb_pkts)
{
	struct virtio_hw *hw = dev->data->dev_private;
	struct virtnet_tx *txvq = dev->data->tx_queues[0];
	int ret;

	hw->inject_pkts = tx_pkts;
	ret = dev->tx_pkt_burst(txvq, tx_pkts, nb_pkts);
	hw->inject_pkts = NULL;

	return ret;
}
/*
 * Should be called only after device is paused.
 */
Should be called only after device is paused.
Should be called only after device is paused .
int
virtio_inject_pkts(struct rte_eth_dev *dev, struct rte_mbuf **tx_pkts,
		int nb_pkts)
{
	struct virtio_hw *hw = dev->data->dev_private;
	struct virtnet_tx *txvq = dev->data->tx_queues[0];
	int ret;
	hw->inject_pkts = tx_pkts;
	ret = dev->tx_pkt_burst(txvq, tx_pkts, nb_pkts);
	hw->inject_pkts = NULL;
	return ret;
}
int virtio_inject_pkts ( struct rte_eth_dev * dev , struct rte_mbuf * * tx_pkts , int nb_pkts ) { struct virtio_hw * hw = dev -> data -> dev_private ; struct virtnet_tx * txvq = dev -> data -> tx_queues [ 0 ] ; int ret ; hw -> inject_pkts = tx_pkts ; ret = dev -> tx_pkt_burst ( txvq , tx_pkts , nb_pkts ) ; hw -> inject_pkts = NULL ; return ret ; }
Should be called only after device is paused.
Should be called only after device is paused .