DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: xuan.ding@intel.com, dev@dpdk.org, chenbo.xia@intel.com
Cc: stable@dpdk.org, Yong Liu <yong.liu@intel.com>,
	Miao Li <miao.li@intel.com>, Marvin Liu <yong.liu@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/virtio: fix incorrect avail desc id
Date: Thu, 21 Oct 2021 14:15:37 +0200	[thread overview]
Message-ID: <687f8c41-cdce-e69a-396b-c6644adbcab4@redhat.com> (raw)
In-Reply-To: <20211021142540.43753-1-xuan.ding@intel.com>



On 10/21/21 16:25, xuan.ding@intel.com wrote:
> From: Xuan Ding <xuan.ding@intel.com>
> 
> Vhost will update desc’s Buffer ID advance to next used descriptor when
> VIRTIO_F_IN_ORDER feature negotiated. When virtio reuses the descriptor,
> the Buffer ID should be restored even VIRTQ_DESC_F_INDIRECT
> feature negotiated.
> 
> Fixes: b473061b0e1d ("net/virtio: fix indirect descriptors in packed datapaths")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Xuan Ding <xuan.ding@intel.com>
> Signed-off-by: Yong Liu <yong.liu@intel.com>
> Signed-off-by: Miao Li <miao.li@intel.com>
> ---
>   drivers/net/virtio/virtqueue.h | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
> index d0c48ca415..5259a6f814 100644
> --- a/drivers/net/virtio/virtqueue.h
> +++ b/drivers/net/virtio/virtqueue.h
> @@ -709,6 +709,9 @@ virtqueue_enqueue_xmit_packed(struct virtnet_tx *txvq, struct rte_mbuf *cookie,
>   			RTE_PTR_DIFF(&txr[idx].tx_packed_indir, txr);
>   		start_dp[idx].len   = (seg_num + 1) *
>   			sizeof(struct vring_packed_desc);
> +		/* Packed descriptor id needs to be restored when inorder. */
> +		if (in_order)
> +			start_dp[idx].id = idx;
>   		/* reset flags for indirect desc */
>   		head_flags = VRING_DESC_F_INDIRECT;
>   		head_flags |= vq->vq_packed.cached_flags;
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


  reply	other threads:[~2021-10-21 12:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-21 14:25 xuan.ding
2021-10-21 12:15 ` Maxime Coquelin [this message]
2021-10-21 12:35 ` 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=687f8c41-cdce-e69a-396b-c6644adbcab4@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=miao.li@intel.com \
    --cc=stable@dpdk.org \
    --cc=xuan.ding@intel.com \
    --cc=yong.liu@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).