lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250109160851.GJ7706@kernel.org>
Date: Thu, 9 Jan 2025 16:08:51 +0000
From: Simon Horman <horms@...nel.org>
To: Suman Ghosh <sumang@...vell.com>
Cc: sgoutham@...vell.com, gakula@...vell.com, sbhatta@...vell.com,
	hkelam@...vell.com, davem@...emloft.net, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, lcherian@...vell.com,
	jerinj@...vell.com, john.fastabend@...il.com, bbhushan2@...vell.com,
	hawk@...nel.org, andrew+netdev@...n.ch, ast@...nel.org,
	daniel@...earbox.net, bpf@...r.kernel.org
Subject: Re: [net-next PATCH v2 1/6] octeontx2-pf: Add AF_XDP non-zero copy
 support

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@...vell.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ