From patchwork Fri Apr 8 07:58:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Chan X-Patchwork-Id: 12806227 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 6D1F2C433EF for ; Fri, 8 Apr 2022 08:00:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230311AbiDHICX (ORCPT ); Fri, 8 Apr 2022 04:02:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230317AbiDHIBz (ORCPT ); Fri, 8 Apr 2022 04:01:55 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5A8116E205 for ; Fri, 8 Apr 2022 00:59:43 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id c2so7110297pga.10 for ; Fri, 08 Apr 2022 00:59:43 -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=PC3Obz5UD/8uSUU3eK/IwemnOGlCDB5+MJ7a0W2vUgE=; b=WrDaONjLXzqBpydoiQihW4TGEEhvYwoK+JLHjp6zk31fRJlrPK8Y+q+43JMJBxqgQe vNl6/Vrm9Ypa6dZWnxpzV2wH6KxZuYXBr5lIfYFTa1+NWYylYmDvWBPo0TdbEmwnzsfv NIQWj+BpRl/5QReeEy9+tkBnnoyfdZ/jCoV7Y= 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=PC3Obz5UD/8uSUU3eK/IwemnOGlCDB5+MJ7a0W2vUgE=; b=6bq1LpJABDqCyBncGgBI5p3Mhog7MMckKMT3PNVto/b9q5CMYDdr5aIbkNQyjOwBlR nicnqZp6fikPLvN24XT7iA5PtfsGvDRFfe1B6U2wz15LF2NkGybMkAdELteDjxiUq7E8 3Ht7oFqNbVrhkQk7FFEDYl1FJB2ByBM2D1BwxRKjOxsPC82EZyiedllZzTi/Nj3gq3+f ZuLDcVCuP9EMkdGSr+a6uLXKQSnrHnCp07DSffEpoczD28gQnOdS1hHsy9hbt5q0g5KW mSBT0DfrOpzqsBhWhtIdV2GeTlGwCa2uIHr329HZYKKFsIP6BSd1X4x25f5ivwT3/XBT w+dQ== X-Gm-Message-State: AOAM532QAokkPwPbDH83/o8qbCCgh6A7Adu5fBfUIWJ7qOTgAR8LXmG0 jfVgzYDWLK8Ux8x9a+rvF7/H1g== X-Google-Smtp-Source: ABdhPJyCykRlWBodnmi8xA6WPfCZKsuPE2oYBKlWhULATr+GfNCisFKGrGHZaBmC5WHDPRCjaKgicQ== X-Received: by 2002:a65:62d0:0:b0:381:d38:c7b0 with SMTP id m16-20020a6562d0000000b003810d38c7b0mr14526911pgv.186.1649404782479; Fri, 08 Apr 2022 00:59:42 -0700 (PDT) Received: from localhost.swdvt.lab.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id l2-20020a637c42000000b003644cfa0dd1sm20507448pgn.79.2022.04.08.00.59.41 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Apr 2022 00:59:42 -0700 (PDT) From: Michael Chan To: davem@davemloft.net Cc: netdev@vger.kernel.org, kuba@kernel.org, gospo@broadcom.com, bpf@vger.kernel.org, john.fastabend@gmail.com, toke@redhat.com, lorenzo@kernel.org, ast@kernel.org, daniel@iogearbox.net, echaudro@redhat.com, pabeni@redhat.com Subject: [PATCH net-next v4 04/11] bnxt: rename bnxt_rx_pages to bnxt_rx_agg_pages_skb Date: Fri, 8 Apr 2022 03:58:59 -0400 Message-Id: <1649404746-31033-5-git-send-email-michael.chan@broadcom.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1649404746-31033-1-git-send-email-michael.chan@broadcom.com> References: <1649404746-31033-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 4ae94387d07b..5487d8661f13 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;