]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
bnxt_en: Increment checksum error counter only if NETIF_F_RXCSUM is set.
authorSatish Baddipadige <sbaddipa@broadcom.com>
Sun, 27 Dec 2015 23:19:21 +0000 (18:19 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Dec 2015 05:57:28 +0000 (00:57 -0500)
rx_l4_csum_error is now incremented only when offload is enabled

Signed-off-by: Satish Baddipadige <sbaddipa@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c

index e340fb31ed78667f45b8b33069936053ddab8d0a..3ce3bd337bb34783c2e6f56b1e29bd7df987258b 100644 (file)
@@ -1187,8 +1187,10 @@ 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)
-                       cpr->rx_l4_csum_errors++;
+               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);