From: Jakub Kicinski <kuba@kernel.org>
To: Michael Chan <michael.chan@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, gospo@broadcom.com, bpf@vger.kernel.org,
somnath.kotur@broadcom.com,
Andy Gospodarek <andrew.gospodarek@broadcom.com>
Subject: Re: [PATCH net-next 1/3] bnxt_en: Fix page pool logic for page size >= 64K
Date: Fri, 28 Jul 2023 17:35:46 -0700 [thread overview]
Message-ID: <20230728173546.122c3135@kernel.org> (raw)
In-Reply-To: <20230728231829.235716-2-michael.chan@broadcom.com>
On Fri, 28 Jul 2023 16:18:27 -0700 Michael Chan wrote:
> From: Somnath Kotur <somnath.kotur@broadcom.com>
>
> The RXBD length field on all bnxt chips is 16-bit and so we cannot
> support a full page when the native page size is 64K or greater.
> The non-XDP (non page pool) code path has logic to handle this but
> the XDP page pool code path does not handle this. Add the missing
> logic to use page_pool_dev_alloc_frag() to allocate 32K chunks if
> the page size is 64K or greater.
>
> Fixes: 9f4b28301ce6 ("bnxt: XDP multibuffer enablement")
> Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
> Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
> Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Fix is a fix... Let's get this into net, first.
> - dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, PAGE_SIZE, bp->rx_dir,
> + dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, BNXT_RX_PAGE_SIZE, bp->rx_dir,
> DMA_ATTR_WEAK_ORDERING);
this
> - dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, PAGE_SIZE, bp->rx_dir,
> + dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, BNXT_RX_PAGE_SIZE, bp->rx_dir,
> DMA_ATTR_WEAK_ORDERING);
this
> - dma_unmap_page_attrs(&pdev->dev, mapping, PAGE_SIZE,
> + dma_unmap_page_attrs(&pdev->dev, mapping, BNXT_RX_PAGE_SIZE,
> bp->rx_dir,
> DMA_ATTR_WEAK_ORDERING);
and this - unnecessarily go over 80 chars when there's already
a continuation line that could take the last argument.
> @@ -185,7 +185,7 @@ void bnxt_xdp_buff_init(struct bnxt *bp, struct bnxt_rx_ring_info *rxr,
> struct xdp_buff *xdp)
> {
> struct bnxt_sw_rx_bd *rx_buf;
> - u32 buflen = PAGE_SIZE;
> + u32 buflen = BNXT_RX_PAGE_SIZE;
nit: rev xmas tree here
> struct pci_dev *pdev;
> dma_addr_t mapping;
> u32 offset;
--
pw-bot: cr
next prev parent reply other threads:[~2023-07-29 0:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-28 23:18 [PATCH net-next 0/3] bnxt_en: Add support for page pool Michael Chan
2023-07-28 23:18 ` [PATCH net-next 1/3] bnxt_en: Fix page pool logic for page size >= 64K Michael Chan
2023-07-29 0:35 ` Jakub Kicinski [this message]
2023-07-28 23:18 ` [PATCH net-next 2/3] bnxt_en: Use the unified RX page pool buffers for XDP and non-XDP Michael Chan
2023-07-28 23:18 ` [PATCH net-next 3/3] bnxt_en: Let the page pool manage the DMA mapping Michael Chan
2023-07-29 0:42 ` Jakub Kicinski
2023-07-31 17:47 ` Jesper Dangaard Brouer
2023-07-31 18:00 ` Jakub Kicinski
2023-07-31 18:16 ` Michael Chan
2023-07-31 18:44 ` Jakub Kicinski
2023-07-31 20:20 ` Michael Chan
2023-07-31 20:44 ` Jakub Kicinski
2023-07-31 21:11 ` Michael Chan
2023-08-01 17:06 ` Jesper Dangaard Brouer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230728173546.122c3135@kernel.org \
--to=kuba@kernel.org \
--cc=andrew.gospodarek@broadcom.com \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gospo@broadcom.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=somnath.kotur@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).