Commit f8844df
virtio-net: enable NETIF_F_GRO_HW only if GRO-related offloads are supported
Negotiating VIRTIO_NET_F_CTRL_GUEST_OFFLOADS indicates the device
allows control over offload support, but the offloads that can be
controlled may have nothing to do with GRO (e.g., if neither GUEST_TSO4
nor GUEST_TSO6 is supported).
In such a setup, reporting NETIF_F_GRO_HW as available for the device
is too optimistic and misleading to the user.
Improve the situation by masking off NETIF_F_GRO_HW unless the device
possesses actual GRO-related offload capabilities. Out of an abundance
of caution, this does not change the current behaviour for hardware with
just v6 or just v4 GRO: current interfaces do not allow distinguishing
between v6/v4 GRO, so we can't expose them to userspace precisely.
Signed-off-by: Di Zhu <zhud@hygon.cn>
Acked-by: Jason Wang <jasowang@redhat.com>
Link: https://patch.msgid.link/20260323041730.986351-1-zhud@hygon.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 6a539ee commit f8844df
1 file changed
Lines changed: 13 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6800 | 6800 | | |
6801 | 6801 | | |
6802 | 6802 | | |
6803 | | - | |
6804 | | - | |
6805 | 6803 | | |
6806 | 6804 | | |
6807 | 6805 | | |
| |||
6994 | 6992 | | |
6995 | 6993 | | |
6996 | 6994 | | |
| 6995 | + | |
| 6996 | + | |
| 6997 | + | |
| 6998 | + | |
| 6999 | + | |
| 7000 | + | |
| 7001 | + | |
| 7002 | + | |
| 7003 | + | |
| 7004 | + | |
| 7005 | + | |
| 7006 | + | |
| 7007 | + | |
6997 | 7008 | | |
6998 | 7009 | | |
6999 | 7010 | | |
| |||
7076 | 7087 | | |
7077 | 7088 | | |
7078 | 7089 | | |
7079 | | - | |
7080 | | - | |
7081 | | - | |
7082 | | - | |
7083 | | - | |
7084 | | - | |
7085 | | - | |
7086 | | - | |
7087 | | - | |
7088 | 7090 | | |
7089 | 7091 | | |
7090 | 7092 | | |
| |||
0 commit comments