From: Jakub Kicinski <kuba@kernel.org>
To: Gur Stavi <gur.stavi@huawei.com>
Cc: Fan Gong <gongfan1@huawei.com>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>, <linux-doc@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Bjorn Helgaas <helgaas@kernel.org>, luosifu <luosifu@huawei.com>,
Xin Guo <guoxin09@huawei.com>,
Shen Chenyang <shenchenyang1@hisilicon.com>,
Zhou Shuai <zhoushuai28@huawei.com>, Wu Like <wulike1@huawei.com>,
Shi Jing <shijing34@huawei.com>,
Meny Yossefi <meny.yossefi@huawei.com>,
Lee Trager <lee@trager.us>, Michael Ellerman <mpe@ellerman.id.au>,
Suman Ghosh <sumang@marvell.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Joe Damato <jdamato@fastly.com>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: Re: [PATCH net-next v12 1/1] hinic3: module initialization and tx/rx logic
Date: Thu, 24 Apr 2025 19:10:46 -0700 [thread overview]
Message-ID: <20250424191046.523383fd@kernel.org> (raw)
In-Reply-To: <cc01acb5ebc96c4edc7f85955379fb50ce27484b.1745411775.git.gur.stavi@huawei.com>
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
prev parent reply other threads:[~2025-04-25 2:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-23 12:41 [PATCH net-next v12 0/1] net: hinic3: Add a driver for Huawei 3rd gen NIC Gur Stavi
2025-04-23 12:41 ` [PATCH net-next v12 1/1] hinic3: module initialization and tx/rx logic Gur Stavi
2025-04-25 2:10 ` Jakub Kicinski [this message]
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=20250424191046.523383fd@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=christophe.jaillet@wanadoo.fr \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gongfan1@huawei.com \
--cc=guoxin09@huawei.com \
--cc=gur.stavi@huawei.com \
--cc=helgaas@kernel.org \
--cc=horms@kernel.org \
--cc=jdamato@fastly.com \
--cc=lee@trager.us \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luosifu@huawei.com \
--cc=meny.yossefi@huawei.com \
--cc=mpe@ellerman.id.au \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=shenchenyang1@hisilicon.com \
--cc=shijing34@huawei.com \
--cc=sumang@marvell.com \
--cc=wulike1@huawei.com \
--cc=zhoushuai28@huawei.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 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).