lkml.org 
[lkml]   [2021]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.13 059/104] ionic: count csum_none when offload enabled
    Date
    From: Shannon Nelson <snelson@pensando.io>

    [ Upstream commit f07f9815b7046e25cc32bf8542c9c0bbc5eb6e0e ]

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

    Fixes: 0f3154e6bcb3 ("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>
    ---
    drivers/net/ethernet/pensando/ionic/ionic_txrx.c | 11 +++++------
    1 file changed, 5 insertions(+), 6 deletions(-)

    diff --git a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c
    index 1c6e2b9fc96b..08870190e4d2 100644
    --- a/drivers/net/ethernet/pensando/ionic/ionic_txrx.c
    +++ b/drivers/net/ethernet/pensando/ionic/ionic_txrx.c
    @@ -274,12 +274,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++;
    }
    --
    2.30.2


    \
     
     \ /
      Last update: 2021-08-02 16:17    [W:4.179 / U:0.000 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site