net/virtio: fix avail descriptor ID
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: b473061b0e
("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>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
This commit is contained in:
parent
028f06e8be
commit
ad6f01945a
@ -732,6 +732,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;
|
||||
|
Loading…
Reference in New Issue
Block a user