]> 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)
commit73c937881ebc44b0c9a530c7b1d3417caaa13172
tree8af407ef0c68462fd23a40940b87f03f8084fb40
parente690505ae486d8eb11b70d9cb9f14eb51f9f75b4
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: 0aa244b6ea0f ("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