netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: William Tu <witu@nvidia.com>
Cc: netdev@vger.kernel.org, jiri@nvidia.com, bodong@nvidia.com,
	tariqt@nvidia.com, yossiku@nvidia.com
Subject: Re: [PATCH RFC v2 net-next 1/2] devlink: Add shared descriptor eswitch attr
Date: Tue, 5 Mar 2024 18:30:49 -0800	[thread overview]
Message-ID: <20240305183049.2f2b8490@kernel.org> (raw)
In-Reply-To: <49a53cb9-e04d-4afa-86e8-15b975741e4d@nvidia.com>

On Tue, 5 Mar 2024 16:27:50 -0800 William Tu wrote:
> > Can we use bytes as the unit? Like the page pool. Descriptors don't
> > mean much to the user.  
> But how about the unit size? do we assume unit size = 1 page?
> so page pool has
> order: 2^order pages on allocation
> pool_size: size of ptr_ring
> 
> How about we assume that order is 0, and let user set pool_size (number 
> of page-size entries).

Do you mean because the user doesn't know the granularity,
e.g. we can't allocate 12345 bytes most likely?

For shared buffer (the switch buffer configuration API)
we report cell size IIRC. In ethtool a lot of drivers just
round up to whatever they support. We could also treat 
the user-configured value as "upper bound" and effectively
round down but keep what the user configured exactly, when
they read back. I like the last one the most, if it makes sense.

> > Do we need this knob?
> > Can we not assume that shared-pool-count == 0 means disabled?  
> do you mean assume or not assume?

Sorry for the double negation (:

> I guess you mean assume, so use "shared-pool-count == 0" to indicate 
> disable?
> That will also work so we only need to introduce 1 attribute.

SG!

  reply	other threads:[~2024-03-06  2:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01  1:11 [PATCH RFC v2 net-next 1/2] devlink: Add shared descriptor eswitch attr William Tu
2024-03-01  1:11 ` [PATCH RFC v2 net-next 2/2] net/mlx5e: Add eswitch shared descriptor devlink William Tu
2024-03-01  1:46 ` [PATCH RFC v2 net-next 1/2] devlink: Add shared descriptor eswitch attr Samudrala, Sridhar
2024-03-01 17:25   ` William Tu
2024-03-05  4:37 ` Jakub Kicinski
2024-03-06  0:27   ` William Tu
2024-03-06  2:30     ` Jakub Kicinski [this message]
2024-03-06  5:18       ` William Tu

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=20240305183049.2f2b8490@kernel.org \
    --to=kuba@kernel.org \
    --cc=bodong@nvidia.com \
    --cc=jiri@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=tariqt@nvidia.com \
    --cc=witu@nvidia.com \
    --cc=yossiku@nvidia.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).