Skip to content

Commit

Permalink
ionic: count csum_none when offload enabled
Browse files Browse the repository at this point in the history
[ Upstream commit f07f981 ]

Be sure to count the csum_none cases when csum offload is
enabled.

Fixes: 0f3154e ("ionic: Add Tx and Rx handling")
Signed-off-by: Shannon Nelson <snelson@pensando.io>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
emusln authored and gregkh committed Aug 4, 2021
1 parent 60decbe commit 7eefa0b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions drivers/net/ethernet/pensando/ionic/ionic_txrx.c
Expand Up @@ -197,12 +197,11 @@ static void ionic_rx_clean(struct ionic_queue *q,
}
}

if (likely(netdev->features & NETIF_F_RXCSUM)) {
if (comp->csum_flags & IONIC_RXQ_COMP_CSUM_F_CALC) {
skb->ip_summed = CHECKSUM_COMPLETE;
skb->csum = (__force __wsum)le16_to_cpu(comp->csum);
stats->csum_complete++;
}
if (likely(netdev->features & NETIF_F_RXCSUM) &&
(comp->csum_flags & IONIC_RXQ_COMP_CSUM_F_CALC)) {
skb->ip_summed = CHECKSUM_COMPLETE;
skb->csum = (__force __wsum)le16_to_cpu(comp->csum);
stats->csum_complete++;
} else {
stats->csum_none++;
}
Expand Down

0 comments on commit 7eefa0b

Please sign in to comment.