Skip to content

Commit

Permalink
net: aquantia: fix rx checksum offload bits
Browse files Browse the repository at this point in the history
The last set of csum offload fixes had a leak:

Checksum enabled status bits from rx descriptor were incorrectly
interpreted. Consequently all the other valid logic worked on zero bits.
That caused rx checksum offloads never to trigger.

Tested by dumping rx descriptors and validating resulting csum_level.

Reported-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Fixes: ad703c2 ("net: aquantia: invalid checksumm offload implementation")
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dmitry Bogdanov authored and David S. Miller committed Nov 30, 2018
1 parent 43d0e96 commit 37c4b91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ static int hw_atl_b0_hw_ring_rx_receive(struct aq_hw_s *self,

rx_stat = (0x0000003CU & rxd_wb->status) >> 2;

is_rx_check_sum_enabled = (rxd_wb->type) & (0x3U << 19);
is_rx_check_sum_enabled = (rxd_wb->type >> 19) & 0x3U;

pkt_type = 0xFFU & (rxd_wb->type >> 4);

Expand Down

0 comments on commit 37c4b91

Please sign in to comment.