patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Cheng Jiang <cheng1.jiang@intel.com>
To: maxime.coquelin@redhat.com, chenbo.xia@intel.com
Cc: dev@dpdk.org, wangzhihong.wzh@bytedance.com, jiayu.hu@intel.com,
	xuan.ding@intel.com, wenwux.ma@intel.com, yuanx.wang@intel.com,
	xingguang.he@intel.com, Cheng Jiang <cheng1.jiang@intel.com>,
	stable@dpdk.org
Subject: [PATCH] vhost: fix slot index in async split virtqueue Tx
Date: Thu, 23 Feb 2023 02:30:32 +0000	[thread overview]
Message-ID: <20230223023032.681-1-cheng1.jiang@intel.com> (raw)

The slot_idx in the asynchronous Vhost split virtqueue dequeue data path
is supposed to be decreased by 1 when desc_to_mbuf() fails.

Fixes: 84d5204310d7 ("vhost: support async dequeue for split ring")
Cc: stable@dpdk.org

Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
---
 lib/vhost/virtio_net.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/vhost/virtio_net.c b/lib/vhost/virtio_net.c
index 8caf05319e..374007a61a 100644
--- a/lib/vhost/virtio_net.c
+++ b/lib/vhost/virtio_net.c
@@ -3720,6 +3720,7 @@ virtio_dev_tx_async_split(struct virtio_net *dev, struct vhost_virtqueue *vq,
 				allocerr_warned = true;
 			}
 			dropped = true;
+			slot_idx--;
 			break;
 		}

--
2.35.1


             reply	other threads:[~2023-02-23  3:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-23  2:30 Cheng Jiang [this message]
2023-03-02 10:23 ` Maxime Coquelin
2023-03-06 14:23 ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230223023032.681-1-cheng1.jiang@intel.com \
    --to=cheng1.jiang@intel.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=jiayu.hu@intel.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    --cc=wangzhihong.wzh@bytedance.com \
    --cc=wenwux.ma@intel.com \
    --cc=xingguang.he@intel.com \
    --cc=xuan.ding@intel.com \
    --cc=yuanx.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).