summaryrefslogtreecommitdiff
path: root/drivers/net/virtio/virtio_rxtx_simple.c
diff options
context:
space:
mode:
authorXiao Wang <xiao.w.wang@intel.com>2018-01-10 09:23:53 +0800
committerFerruh Yigit <ferruh.yigit@intel.com>2018-01-16 18:47:49 +0100
commit1978a9dc57f0e9bd83c64c31ec99a8869ab5a133 (patch)
treef416d2734abcc1a79474bff6b1bfa1c6c5d7828f /drivers/net/virtio/virtio_rxtx_simple.c
parenta2ffb87b1b60ded74a5e73be69503065faa827c7 (diff)
downloaddpdk-next-eventdev-1978a9dc57f0e9bd83c64c31ec99a8869ab5a133.zip
dpdk-next-eventdev-1978a9dc57f0e9bd83c64c31ec99a8869ab5a133.tar.gz
dpdk-next-eventdev-1978a9dc57f0e9bd83c64c31ec99a8869ab5a133.tar.xz
net/virtio: add packet injection method
This patch adds dev_pause, dev_resume and inject_pkts APIs to allow driver to pause the worker threads and inject special packets into Tx queue. The next patch will be based on this. Signed-off-by: Xiao Wang <xiao.w.wang@intel.com> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Diffstat (limited to 'drivers/net/virtio/virtio_rxtx_simple.c')
-rw-r--r--drivers/net/virtio/virtio_rxtx_simple.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/virtio/virtio_rxtx_simple.c b/drivers/net/virtio/virtio_rxtx_simple.c
index 8ef3c0c..98a9da5 100644
--- a/drivers/net/virtio/virtio_rxtx_simple.c
+++ b/drivers/net/virtio/virtio_rxtx_simple.c
@@ -70,7 +70,7 @@ virtio_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t desc_idx_max = (vq->vq_nentries >> 1) - 1;
uint16_t nb_tx = 0;
- if (unlikely(hw->started == 0))
+ if (unlikely(hw->started == 0 && tx_pkts != hw->inject_pkts))
return nb_tx;
nb_used = VIRTQUEUE_NUSED(vq);