Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/virtio: fix split queue vectorized Rx
[ upstream commit c97e737 ] Descriptors number may be set less than queue size for split queue vectorized Rx path. Pointers to mbufs for received packets are obtained from SW ring, that is initially filled with them in the end of queue setup in virtio_dev_rx_queue_setup_finish(). The begin of the SW ring filled up to the size of descriptors number. At queue size offset from the begin of the SW ring pointers to some fake mbuf are also set for wrapping purpose. So the ring may contains the hole of invalid pointers from descriptors number offset to queue size offset, and split vectorized Rx routines could write to the invalid addresses since they use the ring up to the queue size. Fix this by setting descriptors number to queue size on Rx queue setup. Fixes: fc3d662 ("virtio: add vector Rx") Signed-off-by: Ivan Ilchenko <ivan.ilchenko@oktetlabs.ru> Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
- Loading branch information