Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 665e350d authored by Satish Baddipadige's avatar Satish Baddipadige Committed by David S. Miller
Browse files

bnxt_en: Increment checksum error counter only if NETIF_F_RXCSUM is set.



rx_l4_csum_error is now incremented only when offload is enabled

Signed-off-by: default avatarSatish Baddipadige <sbaddipa@broadcom.com>
Signed-off-by: default avatarMichael Chan <mchan@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2731d70f
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1187,9 +1187,11 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_napi *bnapi, u32 *raw_cons,
			skb->csum_level = RX_CMP_ENCAP(rxcmp1);
		}
	} else {
		if (rxcmp1->rx_cmp_cfa_code_errors_v2 & RX_CMP_L4_CS_ERR_BITS)
		if (rxcmp1->rx_cmp_cfa_code_errors_v2 & RX_CMP_L4_CS_ERR_BITS) {
			if (dev->features & NETIF_F_RXCSUM)
				cpr->rx_l4_csum_errors++;
		}
	}

	skb_record_rx_queue(skb, bnapi->index);
	skb_mark_napi_id(skb, &bnapi->napi);