]> git.baikalelectronics.ru Git - 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)
commit756bd464eb9cdc7175b74fb8215f4d181c2069a4
tree8af407ef0c68462fd23a40940b87f03f8084fb40
parentc2875a8067518e169e8b98a96cf193be182d5d29
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: 77715448cda3 ("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