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] [day] [month] [year] [list]
Message-ID: <20250424191046.523383fd@kernel.org>
Date: Thu, 24 Apr 2025 19:10:46 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Gur Stavi <gur.stavi@...wei.com>
Cc: Fan Gong <gongfan1@...wei.com>, <netdev@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>, "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Simon
 Horman <horms@...nel.org>, Andrew Lunn <andrew+netdev@...n.ch>,
 <linux-doc@...r.kernel.org>, Jonathan Corbet <corbet@....net>, Bjorn
 Helgaas <helgaas@...nel.org>, luosifu <luosifu@...wei.com>, Xin Guo
 <guoxin09@...wei.com>, Shen Chenyang <shenchenyang1@...ilicon.com>, Zhou
 Shuai <zhoushuai28@...wei.com>, Wu Like <wulike1@...wei.com>, Shi Jing
 <shijing34@...wei.com>, Meny Yossefi <meny.yossefi@...wei.com>, Lee Trager
 <lee@...ger.us>, Michael Ellerman <mpe@...erman.id.au>, Suman Ghosh
 <sumang@...vell.com>, Przemek Kitszel <przemyslaw.kitszel@...el.com>, Joe
 Damato <jdamato@...tly.com>, Christophe JAILLET
 <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH net-next v12 1/1] hinic3: module initialization and
 tx/rx logic

On Wed, 23 Apr 2025 15:41:53 +0300 Gur Stavi wrote:
> +	/* flip page offset to other buffer */
> +	rx_info->page_offset ^= rxq->buf_len;
> +	get_page(page);

Please don't implement local page recycling. Use page_pool instead,
it's been around for almost a decade and because its explicitly
managed by the networking stack its much more effective.

I pointed the same thing out during Yunsilicon XSC driver review,
which is ongoing in parallel. You should really read the mailing list
if you want to make progress with work within the community.

> +reuse_rx_page:
> +	hinic3_reuse_rx_page(rxq, rx_info);
> +	return;
> +
> +unmap_page:
> +	/* we are not reusing the buffer so unmap it */
> +	dma_unmap_page(rxq->dev, rx_info->buf_dma_addr, rxq->dma_rx_buff_size, DMA_FROM_DEVICE);

nit: please wrap the lines at 80 chars, unless it hurts readability.
You can use --max-line-length=80 with checkpatch
-- 
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ