net/virtio: fix Rx scatter offload
authorIvan Ilchenko <ivan.ilchenko@oktetlabs.ru>
Tue, 20 Jul 2021 07:54:45 +0000 (10:54 +0300)
committerChenbo Xia <chenbo.xia@intel.com>
Wed, 21 Jul 2021 05:56:13 +0000 (07:56 +0200)
commit4e8169eb0d2d34067f56b368633f816ce927650a
treebdbc3ef51d9fa64a0a49f0f5914039c5b80c3619
parentfa51f1aa087fe64148ef499dd1bc71b8a5c985df
net/virtio: fix Rx scatter offload

Report Rx scatter offload capability depending on VIRTIO_NET_F_MRG_RXBUF.

If Rx scatter is not requested, ensure that provided Rx buffers on
each Rx queue are big enough to fit Rx packets up to configured MTU.

Fixes: ce17eddefc20 ("ethdev: introduce Rx queue offloads API")
Cc: stable@dpdk.org
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>
drivers/net/virtio/virtio.h
drivers/net/virtio/virtio_ethdev.c
drivers/net/virtio/virtio_ethdev.h
drivers/net/virtio/virtio_rxtx.c