virtio-net: ethtool configurable RXCSUM
authorTonghao Zhang <xiangxia.m.yue@gmail.com>
Mon, 12 Oct 2020 01:58:20 +0000 (09:58 +0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 14 Oct 2020 00:27:05 +0000 (17:27 -0700)
commit3618ad2a7c0e78e4258386394d5d5f92a3dbccf8
tree9828906ad4223fea7b342f9566be7572ad80958e
parentc9bf52a173c73be41742c768728e239ffbb63a71
virtio-net: ethtool configurable RXCSUM

Allow user configuring RXCSUM separately with ethtool -K,
reusing the existing virtnet_set_guest_offloads helper
that configures RXCSUM for XDP. This is conditional on
VIRTIO_NET_F_CTRL_GUEST_OFFLOADS.

If Rx checksum is disabled, LRO should also be disabled.

Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20201012015820.62042-1-xiangxia.m.yue@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/virtio_net.c