net/virtio: fix refill order in packed ring datapath
authorCheng Jiang <cheng1.jiang@intel.com>
Thu, 8 Jul 2021 09:58:01 +0000 (09:58 +0000)
committerChenbo Xia <chenbo.xia@intel.com>
Wed, 21 Jul 2021 05:56:13 +0000 (07:56 +0200)
commit2d91b28730a945def257bc372a525c9b5dbf181c
tree032718dc59225024b56bf232ea6c48563d09ccf0
parent0c0935c5f794c66e587d8e0fa5bb2dc75c9c010d
net/virtio: fix refill order in packed ring datapath

The front-end should refill the descriptor with the mbuf indicated by
the buff_id rather then the index of used descriptor. Back-end may
return buffers out of order if async copy mode is enabled.

When initializing rxq, refill the descriptors in order as buff_id is
not available at that time.

Fixes: a76290c8f1cf ("net/virtio: implement Rx path for packed queues")
Cc: stable@dpdk.org
Signed-off-by: Cheng Jiang <cheng1.jiang@intel.com>
Signed-off-by: Marvin Liu <yong.liu@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
drivers/net/virtio/virtio_rxtx.c