[dpdk-dev] [PATCH v1] vhost: fix async inflight packet counter
Patrick Fu
patrick.fu at intel.com
Tue Nov 3 06:35:01 CET 2020
Async inflight packet counter should take failed packets into account.
Failed packets will be deducted in the error handling logic.
Fixes: 6b3c81db8bb7 ("vhost: simplify async copy completion")
Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring")
Signed-off-by: Patrick Fu <patrick.fu at intel.com>
---
lib/librte_vhost/virtio_net.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index 10dec5e54..6c5128665 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -1567,7 +1567,7 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev,
src_it = it_pool;
dst_it = it_pool + 1;
segs_await = 0;
- vq->async_pkts_inflight_n += n_pkts;
+ vq->async_pkts_inflight_n += pkt_burst_idx;
if (unlikely(n_pkts < (int)pkt_burst_idx)) {
/*
@@ -1587,7 +1587,7 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev,
if (pkt_burst_idx) {
n_pkts = vq->async_ops.transfer_data(dev->vid,
queue_id, tdes, 0, pkt_burst_idx);
- vq->async_pkts_inflight_n += n_pkts;
+ vq->async_pkts_inflight_n += pkt_burst_idx;
if (unlikely(n_pkts < (int)pkt_burst_idx))
pkt_err = pkt_burst_idx - n_pkts;
--
2.18.4
More information about the dev
mailing list