drivers/net/virtio_net: Added RSS hash report control.
authorAndrew Melnychenko <andrew@daynix.com>
Mon, 28 Mar 2022 17:53:36 +0000 (20:53 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 28 Mar 2022 20:52:59 +0000 (16:52 -0400)
commitc11708209df216aee72adf97d13c72c093a4ffce
tree104a6ddb8ac6230de5cbdfa3bff37b5079c0c1c3
parent91f41f01d2195d4d059ad7f141e41d40a45e1e1c
drivers/net/virtio_net: Added RSS hash report control.

Now it's possible to control supported hashflows.
Added hashflow set/get callbacks.
Also, disabling RXH_IP_SRC/DST for TCP would disable then for UDP.
TCP and UDP supports only:
ethtool -U eth0 rx-flow-hash tcp4 sd
    RXH_IP_SRC + RXH_IP_DST
ethtool -U eth0 rx-flow-hash tcp4 sdfn
    RXH_IP_SRC + RXH_IP_DST + RXH_L4_B_0_1 + RXH_L4_B_2_3
Disabling happens because VirtioNET hashtype for IP doesn't check L4 proto,
it works for all IP packets(TCP, UDP, ICMP, etc.).
For TCP and UDP, it's possible to set IP+PORT hashes.
But disabling IP hashes will disable them for TCP and UDP simultaneously.
It's possible to set IP+PORT for TCP/UDP and disable/enable IP
for everything else(UDP, ICMP, etc.).

Signed-off-by: Andrew Melnychenko <andrew@daynix.com>
Link: https://lore.kernel.org/r/20220328175336.10802-5-andrew@daynix.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/net/virtio_net.c