Re: [PATCH net-next v12 1/1] hinic3: module initialization and tx/rx logic
From: Jakub Kicinski
Date: Thu Apr 24 2025 - 22:10:57 EST
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