mbox

[0/3] Virtio PMD RSS support & RSS fixes

Message ID 20210910091734.7023-1-maxime.coquelin@redhat.com (mailing list archive)
Headers

Message

Maxime Coquelin Sept. 10, 2021, 9:17 a.m. UTC
  This series is mainly adding support for RSS to Virtio PMD
driver. The two last patches are fixing an issue in testpmd
that prevents to configure the RSS hash types, and fix
an issue spotted in the mlx5 driver while looking for
inspiration.

The first motivation for this series is to eventually
support RSS down to the Vhost-user library, so that OVS can
benefit from it. But it will be also useful with vDPA
devices in the future.

Regarding the testing, I have tested it with qemu v5.2 from
Fedora 34. Since libvirt does not support yet enabling RSS
feature in the Qemu virtio-net device, and this feature is
disabled by default, the tester can either rebuild the qemu
package to enable it by default or use the qemu cmdline to
do the same.

The tester can use testpmd in icmpecho mode in the guest
and scapy on the host to inject random traffic on the tap
interface, e.g.:
sendp(Ether(src=RandMAC()) / IP(src=RandIP(), dst='192.168.123.9') / UDP(sport=RandShort(), dport=RandShort()), loop=True, iface='vnet7')

Then it can play with RSS config in testpmd to change the
reta, or hash type and see traffic being steered
accordingly by checking the Rx xstats.

Ferruh, Andrew, I have updated the driver feature list,
but I have one doubt about whether I should set RSS hash,
since the driver don't support hash reporting yet, but
the device performs RSS hashing for queue selection. WDYT?

Maxime Coquelin (3):
  net/virtio: add initial RSS support
  app/testpmd: fix RSS hash type update
  net/mlx5: Fix RSS RETA update

 app/test-pmd/config.c                  |   8 +-
 doc/guides/nics/features/virtio.ini    |   2 +
 doc/guides/nics/virtio.rst             |   3 +
 doc/guides/rel_notes/release_21_11.rst |   5 +
 drivers/net/mlx5/mlx5_rss.c            |   2 +-
 drivers/net/virtio/virtio.h            |  31 ++-
 drivers/net/virtio/virtio_ethdev.c     | 367 ++++++++++++++++++++++++-
 drivers/net/virtio/virtio_ethdev.h     |   3 +-
 drivers/net/virtio/virtqueue.h         |  21 ++
 9 files changed, 429 insertions(+), 13 deletions(-)