]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net/mlx5e: Rx, Fix checksum calculation for new hardware
authorSaeed Mahameed <saeedm@mellanox.com>
Tue, 10 Dec 2019 23:24:00 +0000 (00:24 +0100)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:23:08 +0000 (14:23 -0300)
commit786fb87b8f559e49b6971fd8c4aed68f2e6feb06
tree63d3e4ad9364772ad2bc5d7a619f1909c85064e6
parentd1a32cb24dfe39ead2299c7dc9d77424fb167c3c
net/mlx5e: Rx, Fix checksum calculation for new hardware

BugLink: https://bugs.launchpad.net/bugs/1854842
CQE checksum full mode in new HW, provides a full checksum of rx frame.
Covering bytes starting from eth protocol up to last byte in the received
frame (frame_size - ETH_HLEN), as expected by the stack.

Fixing up skb->csum by the driver is not required in such case. This fix
is to avoid wrong checksum calculation in drivers which already support
the new hardware with the new checksum mode.

Fixes: 85327a9c4150 ("net/mlx5: Update the list of the PCI supported devices")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
(backported from commit db849faa9bef993a1379dc510623f750a72fa7ce)
[mruffell: minor context adjustments, offset recalculations]
Signed-off-by: Matthew Ruffell <matthew.ruffell@canonical.com>
Acked-by: Connor Kuehl <connor.kuehl@canonical.com>
Acked-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
include/linux/mlx5/mlx5_ifc.h