From patchwork Sun Mar 20 19:57:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 12786678 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02BD9C433FE for ; Sun, 20 Mar 2022 19:58:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343626AbiCTT76 (ORCPT ); Sun, 20 Mar 2022 15:59:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33872 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343617AbiCTT7v (ORCPT ); Sun, 20 Mar 2022 15:59:51 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B4A83587D for ; Sun, 20 Mar 2022 12:58:28 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id d18so11065035plr.6 for ; Sun, 20 Mar 2022 12:58:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XxtAdW+2OkMWPZEGxjK4r8Kg0+TC8CcVDbvHSsFo7sE=; b=IeUNOHSuASevcetRh3GZfVT/DZXAn0j7/gpJb7qs5ivwTxKfvYBtcsCObOt8JYApsY dPdrz6TcE+Ws5vYpXpr3RPestmUQUe2RbVzCiCI8Tf+Tjwotu9wnpiOBepNj60M8f+Ac KmUwO5IQdz8g5oS9LbM2vkjz4pTMNeTb/+/30= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XxtAdW+2OkMWPZEGxjK4r8Kg0+TC8CcVDbvHSsFo7sE=; b=4IBsUZlzZh6aoPdW2AoaVHl1h+mGUk0UQAeaqgVa28vgKFQB3vAiKvNz5T/TLfvtVr sJpSaDU4osQfmgtri/zndQzQT2KJP99K60J2ixk1gHiGn0nnNOShtZjNzEhpR9mx6d94 2/z13X68lmG0F+PS7ZaMIOtzrbE6aJBd2pa6kiSxUKEK40V9Sdhco7FdRG47nV0zH5xP 4hVfXO2Cqza5Ou2Lfjp3xgbLqcibcuqumKOYuch/SFzG2DQ0oiCsraJssUK04Io96mMd rpMjunPih1Hun75G+PC0mFvR60ZlswvDFL+Jqb4IzgCkAVtJ+STpT+8feGoemiOCY3/7 i8ig== X-Gm-Message-State: AOAM532TIwAzEWwkcIlzz097+xa/b5V+Bgay0QrQRG0NxWllHiXSWVmE yhf/tTqnf9m/x0AM+kVmw1KSVDEghR9dMw== X-Google-Smtp-Source: ABdhPJwCIjs/3uufaFqGcoKQpYF4+SF5mO78sL4DJI3+ZlEZurtjoAkjZkZfuFFfhrpEL7YxJr+/SQ== X-Received: by 2002:a17:90a:7304:b0:1c6:aadc:90e5 with SMTP id m4-20020a17090a730400b001c6aadc90e5mr15617288pjk.164.1647806307434; Sun, 20 Mar 2022 12:58:27 -0700 (PDT) Received: from localhost.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id h10-20020a056a001a4a00b004f7c76f29c3sm16418335pfv.24.2022.03.20.12.58.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Mar 2022 12:58:26 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, kuba@kernel.org, gospo@broadcom.com Subject: [PATCH net-next v2 04/11] bnxt: rename bnxt_rx_pages to bnxt_rx_agg_pages_skb Date: Sun, 20 Mar 2022 15:57:57 -0400 Message-Id: <1647806284-8529-5-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1647806284-8529-1-git-send-email-michael.chan@broadcom.com> References: <1647806284-8529-1-git-send-email-michael.chan@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Andy Gospodarek Clarify that this is reading buffers from the aggregation ring. Signed-off-by: Andy Gospodarek Signed-off-by: Michael Chan --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index ba01a353bb3f..3324d0070667 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -1038,10 +1038,10 @@ static struct sk_buff *bnxt_rx_skb(struct bnxt *bp, return skb; } -static u32 __bnxt_rx_pages(struct bnxt *bp, - struct bnxt_cp_ring_info *cpr, - struct skb_shared_info *shinfo, - u16 idx, u32 agg_bufs, bool tpa) +static u32 __bnxt_rx_agg_pages(struct bnxt *bp, + struct bnxt_cp_ring_info *cpr, + struct skb_shared_info *shinfo, + u16 idx, u32 agg_bufs, bool tpa) { struct bnxt_napi *bnapi = cpr->bnapi; struct pci_dev *pdev = bp->pdev; @@ -1110,15 +1110,15 @@ static u32 __bnxt_rx_pages(struct bnxt *bp, return total_frag_len; } -static struct sk_buff *bnxt_rx_pages(struct bnxt *bp, - struct bnxt_cp_ring_info *cpr, - struct sk_buff *skb, u16 idx, - u32 agg_bufs, bool tpa) +static struct sk_buff *bnxt_rx_agg_pages_skb(struct bnxt *bp, + struct bnxt_cp_ring_info *cpr, + struct sk_buff *skb, u16 idx, + u32 agg_bufs, bool tpa) { struct skb_shared_info *shinfo = skb_shinfo(skb); u32 total_frag_len = 0; - total_frag_len = __bnxt_rx_pages(bp, cpr, shinfo, idx, agg_bufs, tpa); + total_frag_len = __bnxt_rx_agg_pages(bp, cpr, shinfo, idx, agg_bufs, tpa); if (!total_frag_len) { dev_kfree_skb(skb); @@ -1660,7 +1660,7 @@ static inline struct sk_buff *bnxt_tpa_end(struct bnxt *bp, } if (agg_bufs) { - skb = bnxt_rx_pages(bp, cpr, skb, idx, agg_bufs, true); + skb = bnxt_rx_agg_pages_skb(bp, cpr, skb, idx, agg_bufs, true); if (!skb) { /* Page reuse already handled by bnxt_rx_pages(). */ cpr->sw_stats.rx.rx_oom_discards += 1; @@ -1898,7 +1898,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, } if (agg_bufs) { - skb = bnxt_rx_pages(bp, cpr, skb, cp_cons, agg_bufs, false); + skb = bnxt_rx_agg_pages_skb(bp, cpr, skb, cp_cons, agg_bufs, false); if (!skb) { cpr->sw_stats.rx.rx_oom_discards += 1; rc = -ENOMEM;