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:
 <SJ0PR18MB5216127E87F0B3DDAB5ACD7FDB192@SJ0PR18MB5216.namprd18.prod.outlook.com>
Date: Wed, 15 Jan 2025 18:29:56 +0000
From: Suman Ghosh <sumang@...vell.com>
To: Paolo Abeni <pabeni@...hat.com>, "horms@...nel.org" <horms@...nel.org>,
        Sunil Kovvuri Goutham <sgoutham@...vell.com>,
        Geethasowjanya Akula
	<gakula@...vell.com>,
        Subbaraya Sundeep Bhatta <sbhatta@...vell.com>,
        Hariprasad Kelam <hkelam@...vell.com>,
        "davem@...emloft.net"
	<davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "netdev@...r.kernel.org"
	<netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>,
        Linu Cherian <lcherian@...vell.com>, Jerin
 Jacob <jerinj@...vell.com>,
        "john.fastabend@...il.com"
	<john.fastabend@...il.com>,
        Bharat Bhushan <bbhushan2@...vell.com>,
        "hawk@...nel.org" <hawk@...nel.org>,
        "andrew+netdev@...n.ch"
	<andrew+netdev@...n.ch>,
        "ast@...nel.org" <ast@...nel.org>,
        "daniel@...earbox.net" <daniel@...earbox.net>,
        "bpf@...r.kernel.org"
	<bpf@...r.kernel.org>
Subject: RE: [EXTERNAL] Re: [net-next PATCH v3 1/6] octeontx2-pf: Don't unmap
 page pool buffer used by XDP

>> diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
>> b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
>> index e1dde93e8af8..8ba44164736a 100644
>> --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
>> +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
>> @@ -2701,11 +2701,15 @@ static int otx2_xdp_xmit_tx(struct otx2_nic
>*pf, struct xdp_frame *xdpf,
>>  	if (dma_mapping_error(pf->dev, dma_addr))
>>  		return -ENOMEM;
>>
>> -	err = otx2_xdp_sq_append_pkt(pf, dma_addr, xdpf->len, qidx);
>> +	err = otx2_xdp_sq_append_pkt(pf, dma_addr, xdpf->len,
>> +				     qidx, XDP_REDIRECT);
>>  	if (!err) {
>>  		otx2_dma_unmap_page(pf, dma_addr, xdpf->len, DMA_TO_DEVICE);
>>  		page = virt_to_page(xdpf->data);
>> -		put_page(page);
>> +		if (page->pp)
>> +			page_pool_recycle_direct(page->pp, page);
>> +		else
>> +			put_page(page);
>
>Side note for a possible follow-up: I guess that if you enable the page
>pool usage for all the RX ring, regardless of XDP presence you could
>avoid a bunch of conditionals in the fast-path and simplify the code a
>bit.
>
[Suman] Yes, we are thinking about that too, will update in some future patches.
>/P

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ