netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Gospodarek <andrew.gospodarek@broadcom.com>
To: Jonathan Lemon <jonathan.lemon@gmail.com>
Cc: netdev@vger.kernel.org, michael.chan@broadcom.com,
	davem@davemloft.net, kernel-team@fb.com
Subject: Re: [PATCH net-next] bnxt: Detach page from page pool before sending up the stack
Date: Thu, 9 Jan 2020 21:19:15 -0500	[thread overview]
Message-ID: <20200110021915.GA13304@C02YVCJELVCG> (raw)
In-Reply-To: <20200109193542.4171646-1-jonathan.lemon@gmail.com>

On Thu, Jan 09, 2020 at 11:35:42AM -0800, Jonathan Lemon wrote:
> When running in XDP mode, pages come from the page pool, and should
> be freed back to the same pool or specifically detached.  Currently,
> when the driver re-initializes, the page pool destruction is delayed
> forever since it thinks there are oustanding pages.

If you can please share a reproduction script/steps that would be
helpful for me.

Since this is an XDP_PASS case I can easily create a program that does
that, so no need to share that program -- just the sequence to remove
the program, shutdown the driver, whatever is done and the error you
see.

Thanks!

> 
> Fixes: 322b87ca55f2 ("bnxt_en: add page_pool support")
> Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
> ---
>  drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index 39d4309b17fb..33eb8cd6551e 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -944,6 +944,7 @@ static struct sk_buff *bnxt_rx_page_skb(struct bnxt *bp,
>  	dma_addr -= bp->rx_dma_offset;
>  	dma_unmap_page_attrs(&bp->pdev->dev, dma_addr, PAGE_SIZE, bp->rx_dir,
>  			     DMA_ATTR_WEAK_ORDERING);
> +	page_pool_release_page(rxr->page_pool, page);
>  
>  	if (unlikely(!payload))
>  		payload = eth_get_headlen(bp->dev, data_ptr, len);
> -- 
> 2.17.1
> 

  reply	other threads:[~2020-01-10  2:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-09 19:35 [PATCH net-next] bnxt: Detach page from page pool before sending up the stack Jonathan Lemon
2020-01-10  2:19 ` Andy Gospodarek [this message]
     [not found]   ` <402D3501-9EED-49F3-A5C8-003F78DD0D59@gmail.com>
2020-01-10 18:42     ` Andy Gospodarek
2020-01-10 19:19 ` Andy Gospodarek
2020-01-11  7:04 ` David Miller

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=20200110021915.GA13304@C02YVCJELVCG \
    --to=andrew.gospodarek@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=jonathan.lemon@gmail.com \
    --cc=kernel-team@fb.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /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).