]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net/mlx5e: Move to HW checksumming advertising
authorAriel Levkovich <lariel@mellanox.com>
Wed, 8 Apr 2020 06:56:01 +0000 (14:56 +0800)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 29 Apr 2020 12:56:17 +0000 (14:56 +0200)
commit1cf7ba6fbbecf3d1f09f863f23844e90e17811bf
tree02436a0d7129fb3b0e5f4f09f2134f01b92ef776
parentf0a86409c87f2c9d352a868c5ca141e4a0ee6b59
net/mlx5e: Move to HW checksumming advertising

BugLink: https://bugs.launchpad.net/bugs/1851446
This patch changes the way the driver advertises its checksum offload
capabilities within the net device features bit mask.

Instead of advertising protocol specific checksumming capabilities
which are limited today to IPv4 and IPv6, we move to reporing
generic HW checksumming capabilities.

This will allow the network stack to let mlx5 device offload checksum
for cases where the IP header is encapsulated within another protocol
and the skb->protocol doesn't indicate one of the IP versions protocol,
specifically in the case of MPLS label encapsulating the IP header and
the skb->protocol indiciates MPLS ethertype rather than IP.

Moving the HW_CSUM reporting is required in the basic net device hw
features mask and also in the extensions (vlan and encpasulation
features) since the extensions are always multiplied by the basic
features set during the packet's traversal through the stack's tx flow.

Signed-off-by: Ariel Levkovich <lariel@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
(backported from commit e4683f35f8e5ef43fb75e306113814a563ed1f18)
[PHLin: context adjustment]
Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Sultan Alsawaf <sultan.alsawaf@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c