summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
diff options
context:
space:
mode:
authorGal Pressman <galp@mellanox.com>2017-12-20 08:48:24 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2018-02-20 12:52:54 -0800
commit8babd44d2079079f9d5a4aca7005aed80236efe0 (patch)
tree3b24901155a14d4419325a437d2db326659797ec /drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
parent7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (diff)
net/mlx5e: Fix TCP checksum in LRO buffers
When receiving an LRO packet, the checksum field is set by the hardware to the checksum of the first coalesced packet. Obviously, this checksum is not valid for the merged LRO packet and should be fixed. We can use the CQE checksum which covers the checksum of the entire merged packet TCP payload to help us calculate the checksum incrementally. Tested by sending IPv4/6 traffic with LRO enabled, RX checksum disabled and watching nstat checksum error counters (in addition to the obvious bandwidth drop caused by checksum errors). This bug is usually "hidden" since LRO packets would go through the CHECKSUM_UNNECESSARY flow which does not validate the packet checksum. It's important to note that previous to this patch, LRO packets provided with CHECKSUM_UNNECESSARY are indeed packets with a correct validated checksum (even though the checksum inside the TCP header is incorrect), since the hardware LRO aggregation is terminated upon receiving a packet with bad checksum. Fixes: e586b3b0baee ("net/mlx5: Ethernet Datapath files") Signed-off-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c')
0 files changed, 0 insertions, 0 deletions