From patchwork Fri Jul 23 18:02:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Nelson X-Patchwork-Id: 485021 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D828FC4338F for ; Fri, 23 Jul 2021 18:03:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C415560E94 for ; Fri, 23 Jul 2021 18:03:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229866AbhGWRWj (ORCPT ); Fri, 23 Jul 2021 13:22:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbhGWRWd (ORCPT ); Fri, 23 Jul 2021 13:22:33 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 083EEC0613CF for ; Fri, 23 Jul 2021 11:03:05 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id mt6so3384614pjb.1 for ; Fri, 23 Jul 2021 11:03:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=B4gD6RkuFUXJmOd+al+n+k1dHsLJ7F2zQyNlG44Ayj4=; b=13eABjQX8XbDWFYywmnCH8lXy7YZCcOwrAkqivjFP4ryyOIrRUX4PhrDybyZWqvjcg c2s99xTypdbIDqsWdYY9QTVo22i8kyjlIZbZBy77WVjELLtzfqvUP5lfOUwtJUAz1OiS LS7jPqk8TX/zbQ/24YGngeXiK4QBOr7X5i1is5Z68uwg3iRvaU9mKn38+dkeK0p734lM J4pTwvhSounvBDyN/FIfYaxLoFhwFuY5pSzWB73MTVLqTttW9zjbxlqfrQl1DjGnGu92 PUfLhiwFA3i0N9omWIgtqi3HZluhCi40nkwqzHWPIVsVKe/Bn5/p+LlUZT56V+tSr1+T g+cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B4gD6RkuFUXJmOd+al+n+k1dHsLJ7F2zQyNlG44Ayj4=; b=CCUTffo6drThcweTooijUi2MWgvm6bLmokB6SOl/VVvw7gbjPo10ACYGblwfe1RLL9 DaaQj5a1T9bzbqZAcAGeRDZ9ksogZsWn2aQbhiI3Jq2nCO56ltmhYxTaYh1mcKrnBhao VCKWiAN8oolxyrBgUgRLCMbCn7Ehm4vBiitALegnzQxWaxZSl0zSFzmT/g4sJtxqrNZ2 q3C9IDs3Tdq3I00y/YgcX58SnNhphVMh22ZXM6znsSWt0UxIjEZwRlCcs00Pv3LsZr4Z X4fvKjkbEgcEqOLZh8Qaa0KJ/ZwUl2WAS6Wqr4nVfKg4H+9NM6feAN3ML780rdcyHUZ1 dyDw== X-Gm-Message-State: AOAM533P6NAHvxkC60HBuYZvGDIAsma/0LBYQIzAKNvInAoOJYpPJNhn OmwHK4h6uhe19cg4FzDKHdbBF61XNCRkgw== X-Google-Smtp-Source: ABdhPJxgIa3RX/y3hhvdfVTZIsIhEOHhOLK65A1Z3ANJMpvSNnK5Ye4uLm0CVqZmDGNXq/0c5xg4aw== X-Received: by 2002:a65:45c7:: with SMTP id m7mr6022415pgr.282.1627063384607; Fri, 23 Jul 2021 11:03:04 -0700 (PDT) Received: from driver-dev1.pensando.io ([12.226.153.42]) by smtp.gmail.com with ESMTPSA id c23sm19437934pfo.174.2021.07.23.11.03.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jul 2021 11:03:04 -0700 (PDT) From: Shannon Nelson To: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org Cc: drivers@pensando.io, Shannon Nelson Subject: [PATCH net 5/5] ionic: count csum_none when offload enabled Date: Fri, 23 Jul 2021 11:02:49 -0700 Message-Id: <20210723180249.57599-6-snelson@pensando.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210723180249.57599-1-snelson@pensando.io> References: <20210723180249.57599-1-snelson@pensando.io> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- 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++; }