Commit d08b9a0a authored by Dmitry Bogdanov's avatar Dmitry Bogdanov Committed by David S. Miller

net: aquantia: do not pass lro session with invalid tcp checksum

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: f38f1ee8 ("net: aquantia: check rx csum for all packets in LRO session")
Signed-off-by: default avatarDmitry Bogdanov <dmitry.bogdanov@aquantia.com>
Signed-off-by: default avatarIgor Russkikh <igor.russkikh@aquantia.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ed4d81c4
...@@ -313,6 +313,7 @@ int aq_ring_rx_clean(struct aq_ring_s *self, ...@@ -313,6 +313,7 @@ int aq_ring_rx_clean(struct aq_ring_s *self,
break; break;
buff->is_error |= buff_->is_error; buff->is_error |= buff_->is_error;
buff->is_cso_err |= buff_->is_cso_err;
} while (!buff_->is_eop); } while (!buff_->is_eop);
...@@ -320,7 +321,7 @@ int aq_ring_rx_clean(struct aq_ring_s *self, ...@@ -320,7 +321,7 @@ int aq_ring_rx_clean(struct aq_ring_s *self,
err = 0; err = 0;
goto err_exit; goto err_exit;
} }
if (buff->is_error) { if (buff->is_error || buff->is_cso_err) {
buff_ = buff; buff_ = buff;
do { do {
next_ = buff_->next, next_ = buff_->next,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment