Skip to content

Commit

Permalink
net: aquantia: do not pass lro session with invalid tcp checksum
Browse files Browse the repository at this point in the history
Individual descriptors on LRO TCP session should be checked
for CRC errors. It was discovered that HW recalculates
L4 checksums on LRO session and does not break it up on bad L4
csum.

Thus, driver should aggregate HW LRO L4 statuses from all individual
buffers of LRO session and drop packet if one of the buffers has bad
L4 checksum.

Fixes: f38f1ee ("net: aquantia: check rx csum for all packets in LRO session")
Signed-off-by: Dmitry Bogdanov <dmitry.bogdanov@aquantia.com>
Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dmitry Bogdanov authored and David S. Miller committed Oct 15, 2019
1 parent ed4d81c commit d08b9a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/ethernet/aquantia/atlantic/aq_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,15 @@ int aq_ring_rx_clean(struct aq_ring_s *self,
break;

buff->is_error |= buff_->is_error;
buff->is_cso_err |= buff_->is_cso_err;

} while (!buff_->is_eop);

if (!is_rsc_completed) {
err = 0;
goto err_exit;
}
if (buff->is_error) {
if (buff->is_error || buff->is_cso_err) {
buff_ = buff;
do {
next_ = buff_->next,
Expand Down

0 comments on commit d08b9a0

Please sign in to comment.