netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Tariq Toukan <ttoukan.linux@gmail.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
	tariqt@nvidia.com, hawk@kernel.org
Subject: Re: [PATCH net-next 1/4] eth: mlx4: create a page pool for Rx
Date: Thu, 6 Feb 2025 15:04:34 -0800	[thread overview]
Message-ID: <20250206150434.4aff906b@kernel.org> (raw)
In-Reply-To: <76129ce2-37a7-4e97-81f6-f73f72723a17@gmail.com>

On Thu, 6 Feb 2025 21:44:38 +0200 Tariq Toukan wrote:
> > -	if (xdp_rxq_info_reg(&ring->xdp_rxq, priv->dev, queue_index, 0) < 0)
> > +	pp.flags = PP_FLAG_DMA_MAP;
> > +	pp.pool_size = MLX4_EN_MAX_RX_SIZE;  
> 
> Pool size is not accurate.
>  From one side, MLX4_EN_MAX_RX_SIZE might be too big compared to the 
> actual size.
> 
> However, more importantly, it can be too small when working with large 
> MTU. This is mutually exclusive with XDP in mlx4.
> 
> Rx ring entries consist of 'frags', each entry needs between 1 to 4 
> (MLX4_EN_MAX_RX_FRAGS) frags. In default MTU, each page shared between 
> two entries.

The pool_size is just the size of the cache, how many unallocated
DMA mapped pages we can keep around before freeing them to system
memory. It has no implications for correctness.

  reply	other threads:[~2025-02-06 23:04 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05  3:12 [PATCH net-next 0/4] eth: mlx4: use the page pool for Rx buffers Jakub Kicinski
2025-02-05  3:12 ` [PATCH net-next 1/4] eth: mlx4: create a page pool for Rx Jakub Kicinski
2025-02-06 19:44   ` Tariq Toukan
2025-02-06 23:04     ` Jakub Kicinski [this message]
2025-02-11 18:01       ` Tariq Toukan
2025-02-11 19:06         ` Jakub Kicinski
2025-02-11 19:11           ` Tariq Toukan
2025-02-11 19:21             ` Tariq Toukan
2025-02-11 19:23               ` Jakub Kicinski
2025-02-11 19:38                 ` Tariq Toukan
2025-02-11 19:18   ` Tariq Toukan
2025-02-11 19:44     ` Jakub Kicinski
2025-02-05  3:12 ` [PATCH net-next 2/4] eth: mlx4: don't try to complete XDP frames in netpoll Jakub Kicinski
2025-02-06 19:50   ` Tariq Toukan
2025-02-06 23:05     ` Jakub Kicinski
2025-02-05  3:12 ` [PATCH net-next 3/4] eth: mlx4: remove the local XDP fast-recycling ring Jakub Kicinski
2025-02-05  3:12 ` [PATCH net-next 4/4] eth: mlx4: use the page pool for Rx buffers Jakub Kicinski
2025-02-05 18:05   ` Ido Schimmel
2025-02-05 19:11     ` Jakub Kicinski
2025-02-06 12:57 ` [PATCH net-next 0/4] " Tariq Toukan
2025-02-06 15:58   ` Jakub Kicinski
2025-02-11 18:05     ` Tariq Toukan
2025-02-11 18:50       ` Jakub Kicinski

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=20250206150434.4aff906b@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tariqt@nvidia.com \
    --cc=ttoukan.linux@gmail.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).