TencentOS-kernel/drivers/net
Jason Wang b50a785eee virtio-net: use NETIF_F_GRO_HW instead of NETIF_F_LRO
[upstream commit dbcf24d153884439dad30484a0e3f02350692e4c]

Commit a02e8964eaf92 ("virtio-net: ethtool configurable LRO")
maps LRO to virtio guest offloading features and allows the
administrator to enable and disable those features via ethtool.

This leads to several issues:

- For a device that doesn't support control guest offloads, the "LRO"
  can't be disabled triggering WARN in dev_disable_lro() when turning
  off LRO or when enabling forwarding bridging etc.

- For a device that supports control guest offloads, the guest
  offloads are disabled in cases of bridging, forwarding etc slowing
  down the traffic.

Fix this by using NETIF_F_GRO_HW instead. Though the spec does not
guarantee packets to be re-segmented as the original ones,
we can add that to the spec, possibly with a flag for devices to
differentiate between GRO and LRO.

Further, we never advertised LRO historically before a02e8964eaf92
("virtio-net: ethtool configurable LRO") and so bridged/forwarded
configs effectively always relied on virtio receive offloads behaving
like GRO - thus even if this breaks any configs it is at least not
a regression.

Fixes: a02e8964eaf92 ("virtio-net: ethtool configurable LRO")
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reported-by: Ivan <ivan@prestigetransportation.com>
Tested-by: Ivan <ivan@prestigetransportation.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Menglong Dong <imagedong@tencent.com>
2022-10-18 10:47:43 +08:00
..
appletalk
arcnet
bonding net: bonding proc file 2021-03-16 16:43:58 +08:00
caif
can drivers: net: fix memory leak in peak_usb_create_dev 2021-05-20 16:07:04 +08:00
dsa net: phy: marvell: fix detection of PHY on Topaz switches 2021-05-20 16:07:14 +08:00
ethernet drivers/net/bnxt: fix xdp initialization error in bnxt_xdp.c 2022-08-29 10:55:12 +08:00
fddi FDDI: defxx: Bail out gracefully with unassigned PCI resource for CSR 2021-05-20 16:07:40 +08:00
fjes
hamradio yam: fix possible memory leak in yam_init_driver 2021-03-16 16:30:06 +08:00
hippi hippi: Fix a size used in a 'pci_free_consistent()' in an error handling path 2021-03-16 16:32:23 +08:00
hyperv hv_netvsc: Remove "unlikely" from netvsc_select_queue 2021-03-16 16:36:11 +08:00
ieee802154 drivers: net: fix memory leak in atusb_probe 2021-05-20 16:07:03 +08:00
ipvlan ipvlan: fix device features 2021-03-16 16:34:45 +08:00
netdevsim netdevsim: init u64 stats for 32bit hardware 2021-04-12 12:52:59 +08:00
phy net: phy: intel-xway: enable integrated led functions 2021-05-20 16:08:00 +08:00
plip
ppp pppoe: only process PADT targeted at local interfaces 2021-03-16 16:27:47 +08:00
slip
team team: protect features update by RCU to avoid deadlock 2021-04-12 12:51:48 +08:00
usb net: usb: ax88179_178a: initialize local variables before use 2021-05-20 16:07:17 +08:00
vmxnet3 vmxnet3: use correct tcp hdr length when packet is encapsulated 2021-03-16 16:33:49 +08:00
wan net: lapbether: Prevent racing when checking whether the netif is running 2021-05-20 16:07:55 +08:00
wimax staging: wimax/i2400m: fix byte-order issue 2021-05-20 16:07:23 +08:00
wireless ath10k: Fix ath10k_wmi_tlv_op_pull_peer_stats_info() unlock without lock 2021-05-20 16:08:00 +08:00
xen-netback xen-netback: Check for hotplug-status existence before watching 2021-05-20 16:07:15 +08:00
Kconfig
LICENSE.SRC
Makefile
Space.c
dummy.c
eql.c
geneve.c net: geneve: modify IP header check in geneve6_xmit_skb and geneve_xmit_skb 2021-05-20 16:08:00 +08:00
gtp.c net: icmp: pass zeroed opts from icmp{,v6}_ndo_send before sending 2021-04-12 12:52:42 +08:00
ifb.c
loopback.c
macsec.c macsec: avoid use-after-free in macsec_handle_frame() 2021-03-16 16:37:58 +08:00
macvlan.c macvlan: validate setting of multiple remote source MAC addresses 2021-03-16 16:35:08 +08:00
macvtap.c
mdio.c
mii.c
net_failover.c net_failover: fixed rollback in net_failover_open() 2021-03-16 16:28:54 +08:00
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c net: fix dev_ifsioc_locked() race condition 2021-04-12 12:52:45 +08:00
thunderbolt.c
tun.c net: tun: set tun->dev->addr_len during TUNSETLINK processing 2021-05-20 16:07:03 +08:00
veth.c bpf: Add redirect_peer helper 2022-08-30 11:33:35 +08:00
virtio_net.c virtio-net: use NETIF_F_GRO_HW instead of NETIF_F_LRO 2022-10-18 10:47:43 +08:00
vrf.c vrf: packets with lladdr src needs dst at input with orig_iif when needs strict 2021-03-16 16:42:16 +08:00
vsockmon.c
vxlan.c vxlan: move debug check after netdev unregister 2021-04-12 12:52:31 +08:00
xen-netfront.c xen-netfront: fix potential deadlock in xennet_remove() 2021-03-16 16:32:57 +08:00