* Re: [dpdk-dev] [PATCH] net/virtio: fix incorrect avail desc id
2021-10-21 14:25 [dpdk-dev] [PATCH] net/virtio: fix incorrect avail desc id xuan.ding
@ 2021-10-21 12:15 ` Maxime Coquelin
2021-10-21 12:35 ` Maxime Coquelin
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2021-10-21 12:15 UTC (permalink / raw)
To: xuan.ding, dev, chenbo.xia; +Cc: stable, Yong Liu, Miao Li, Marvin Liu
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio: fix incorrect avail desc id
2021-10-21 14:25 [dpdk-dev] [PATCH] net/virtio: fix incorrect avail desc id xuan.ding
2021-10-21 12:15 ` Maxime Coquelin
@ 2021-10-21 12:35 ` Maxime Coquelin
1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2021-10-21 12:35 UTC (permalink / raw)
To: xuan.ding, dev, chenbo.xia; +Cc: stable, Yong Liu, Miao Li
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;
>
Applied to dpdk-next-virtio/main.
Thanks,
Maxime
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dpdk-dev] [PATCH] net/virtio: fix incorrect avail desc id
@ 2021-10-21 14:25 xuan.ding
2021-10-21 12:15 ` Maxime Coquelin
2021-10-21 12:35 ` Maxime Coquelin
0 siblings, 2 replies; 3+ messages in thread
From: xuan.ding @ 2021-10-21 14:25 UTC (permalink / raw)
To: dev, maxime.coquelin, chenbo.xia; +Cc: Xuan Ding, stable, Yong Liu, Miao Li
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;
--
2.17.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-21 12:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 14:25 [dpdk-dev] [PATCH] net/virtio: fix incorrect avail desc id xuan.ding
2021-10-21 12:15 ` Maxime Coquelin
2021-10-21 12:35 ` Maxime Coquelin
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).