]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net/mlx5e: When RXFCS is set, add FCS data into checksum calculation
authorEran Ben Elisha <eranbe@mellanox.com>
Tue, 1 May 2018 13:25:07 +0000 (16:25 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 24 May 2018 21:40:39 +0000 (14:40 -0700)
commit902a545904c71d719ed144234d67df75f31db63b
tree8af407ef0c68462fd23a40940b87f03f8084fb40
parentd546b67cda015fb92bfee93d5dc0ceadb91deaee
net/mlx5e: When RXFCS is set, add FCS data into checksum calculation

When RXFCS feature is enabled, the HW do not strip the FCS data,
however it is not present in the checksum calculated by the HW.

Fix that by manually calculating the FCS checksum and adding it to the SKB
checksum field.

Add helper function to find the FCS data for all SKB forms (linear,
one fragment or more).

Fixes: 102722fc6832 ("net/mlx5e: Add support for RXFCS feature flag")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c