All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Suman Ghosh <sumang@marvell.com>
Cc: sgoutham@marvell.com, gakula@marvell.com, sbhatta@marvell.com,
	hkelam@marvell.com, davem@davemloft.net, edumazet@google.com,
	kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, lcherian@marvell.com,
	jerinj@marvell.com, john.fastabend@gmail.com,
	bbhushan2@marvell.com, hawk@kernel.org, andrew+netdev@lunn.ch,
	ast@kernel.org, daniel@iogearbox.net, bpf@vger.kernel.org
Subject: Re: [net-next PATCH v2 1/6] octeontx2-pf: Add AF_XDP non-zero copy support
Date: Thu, 9 Jan 2025 16:08:51 +0000	[thread overview]
Message-ID: <20250109160851.GJ7706@kernel.org> (raw)
In-Reply-To: <20250108183329.2207738-2-sumang@marvell.com>

On Thu, Jan 09, 2025 at 12:03:24AM +0530, Suman Ghosh wrote:
> For XDP, page_pool APIs are getting used now. But the memory type was
> not getting set due to which XDP_REDIRECT and hence AF_XDP was not
> working. This patch ads the memory type MEM_TYPE_PAGE_POOL as the memory
> model of the XDP program.
> 
> Signed-off-by: Suman Ghosh <sumang@marvell.com>

...

> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c

...

> @@ -109,6 +109,11 @@ static void otx2_xdp_snd_pkt_handler(struct otx2_nic *pfvf,
>  	otx2_dma_unmap_page(pfvf, sg->dma_addr[0],
>  			    sg->size[0], DMA_TO_DEVICE);
>  	page = virt_to_page(phys_to_virt(pa));
> +	if (page->pp) {
> +		page_pool_recycle_direct(page->pp, page);
> +		return;
> +	}
> +
>  	put_page(page);
>  }
>  

Hi Suman,

It is included indirectly in the following patch,
[v2 2/6] octeontx2-pf: Don't unmap page pool buffer used by XDP,
but I believe you need the following in order for this to compile:

#include <net/page_pool/helpers.h>

...

pw-bot: changes-requested

  reply	other threads:[~2025-01-09 16:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-08 18:33 [net-next PATCH v2 0/6] Add af_xdp support for cn10k Suman Ghosh
2025-01-08 18:33 ` [net-next PATCH v2 1/6] octeontx2-pf: Add AF_XDP non-zero copy support Suman Ghosh
2025-01-09 16:08   ` Simon Horman [this message]
2025-01-10  9:34     ` [EXTERNAL] " Suman Ghosh
2025-01-08 18:33 ` [net-next PATCH v2 2/6] octeontx2-pf: Don't unmap page pool buffer used by XDP Suman Ghosh
2025-01-08 18:33 ` [net-next PATCH v2 3/6] octeontx2-pf: Add AF_XDP zero copy support for rx side Suman Ghosh
2025-01-09 16:14   ` Simon Horman
2025-01-10  9:34     ` [EXTERNAL] " Suman Ghosh
2025-01-08 18:33 ` [net-next PATCH v2 4/6] octeontx2-pf: Reconfigure RSS table after enabling AF_XDP zerocopy on rx queue Suman Ghosh
2025-01-08 18:33 ` [net-next PATCH v2 5/6] Octeontx2-pf: Prepare for AF_XDP Suman Ghosh
2025-01-08 18:33 ` [net-next PATCH v2 6/6] octeontx2-pf: AF_XDP zero copy transmit support Suman Ghosh
  -- strict thread matches above, loose matches on Subject: below --
2025-01-08 18:29 [net-next PATCH v2 0/6] Add af_xdp support for cn10k Suman Ghosh
2025-01-08 18:29 ` [net-next PATCH v2 1/6] octeontx2-pf: Add AF_XDP non-zero copy support Suman Ghosh

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=20250109160851.GJ7706@kernel.org \
    --to=horms@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bbhushan2@marvell.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hawk@kernel.org \
    --cc=hkelam@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=sumang@marvell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.