* Re: [Intel-wired-lan] [PATCH net-next v4 0/3] ethtool: Dynamic RSS context indirection table resizing [not found] <20260313071322.3489243-1-bjorn@kernel.org> @ 2026-03-14 16:35 ` Jakub Kicinski 2026-03-15 12:30 ` Björn Töpel 0 siblings, 1 reply; 3+ messages in thread From: Jakub Kicinski @ 2026-03-14 16:35 UTC (permalink / raw) To: netdev Cc: Björn Töpel, Michael Chan, Pavan Chebbi, Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni, Simon Horman, linux-kselftest, Willem de Bruijn, Shuah Khan, Maxime Chevallier, Andrew Lunn, intel-wired-lan, Przemek Kitszel On Fri, 13 Mar 2026 08:13:12 +0100 Björn Töpel wrote: > Some NICs (e.g. bnxt) change their RSS indirection table size based on > the queue count, because the hardware table is a shared resource. The > ethtool core locks ctx->indir_size at context creation, so drivers > have to reject channel changes when RSS contexts exist. > > This series adds resize helpers and wires them up in bnxt. Sorry Bjorn, I was typing the explanation below and I realized that we may be violating user intent. We should already record the user_size from rss_set_prep_indir() as part of the context (and presumably some netdev state for the main context?) and don't allow shrinking the context below that mark.. Now for the broader audience - my understanding is that the RSS table is a precious resource for most if not all drivers. The direction of this work is to allow user to explicitly specify what RSS table size they want. The Netlink API for RSS already allows users to send tables smaller than what the device reports (Netlink code just "replicates" the table). So if the user asks for X entries the driver should be able to allocate a table of any size as long as its a multiple of X. This series only support "global" resizing but it should be simple to add the state for the driver to mark in the context what table size it actually allocated. The only reason we haven't added the support for that is that it's quite hard to know how to implement it without docs for the FW/HW.. fbnic has fixed table sizes so we can't even prototype there :S Please reply if you'd like to collaborate on adding support for the user-defined RSS context sizing. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Intel-wired-lan] [PATCH net-next v4 0/3] ethtool: Dynamic RSS context indirection table resizing 2026-03-14 16:35 ` [Intel-wired-lan] [PATCH net-next v4 0/3] ethtool: Dynamic RSS context indirection table resizing Jakub Kicinski @ 2026-03-15 12:30 ` Björn Töpel 2026-03-16 23:31 ` Jakub Kicinski 0 siblings, 1 reply; 3+ messages in thread From: Björn Töpel @ 2026-03-15 12:30 UTC (permalink / raw) To: Jakub Kicinski, netdev Cc: Michael Chan, Pavan Chebbi, Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni, Simon Horman, linux-kselftest, Willem de Bruijn, Shuah Khan, Maxime Chevallier, Andrew Lunn, intel-wired-lan, Przemek Kitszel Jakub Kicinski <kuba@kernel.org> writes: > On Fri, 13 Mar 2026 08:13:12 +0100 Björn Töpel wrote: >> Some NICs (e.g. bnxt) change their RSS indirection table size based on >> the queue count, because the hardware table is a shared resource. The >> ethtool core locks ctx->indir_size at context creation, so drivers >> have to reject channel changes when RSS contexts exist. >> >> This series adds resize helpers and wires them up in bnxt. > > Sorry Bjorn, I was typing the explanation below and I realized that > we may be violating user intent. We should already record the user_size > from rss_set_prep_indir() as part of the context (and presumably some > netdev state for the main context?) and don't allow shrinking the > context below that mark.. Don't be sorry! Good catch, and glad you caught it now rather than after it landed. I'll respin with user_size tracked in the context (and netdev state for context 0) as a lower bound, so resize never folds below the size the user explicitly configured. WDYT? Björn ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Intel-wired-lan] [PATCH net-next v4 0/3] ethtool: Dynamic RSS context indirection table resizing 2026-03-15 12:30 ` Björn Töpel @ 2026-03-16 23:31 ` Jakub Kicinski 0 siblings, 0 replies; 3+ messages in thread From: Jakub Kicinski @ 2026-03-16 23:31 UTC (permalink / raw) To: Björn Töpel Cc: netdev, Michael Chan, Pavan Chebbi, Andrew Lunn, David S. Miller, Eric Dumazet, Paolo Abeni, Simon Horman, linux-kselftest, Willem de Bruijn, Shuah Khan, Maxime Chevallier, Andrew Lunn, intel-wired-lan, Przemek Kitszel On Sun, 15 Mar 2026 13:30:33 +0100 Björn Töpel wrote: > Jakub Kicinski <kuba@kernel.org> writes: > > > On Fri, 13 Mar 2026 08:13:12 +0100 Björn Töpel wrote: > >> Some NICs (e.g. bnxt) change their RSS indirection table size based on > >> the queue count, because the hardware table is a shared resource. The > >> ethtool core locks ctx->indir_size at context creation, so drivers > >> have to reject channel changes when RSS contexts exist. > >> > >> This series adds resize helpers and wires them up in bnxt. > > > > Sorry Bjorn, I was typing the explanation below and I realized that > > we may be violating user intent. We should already record the user_size > > from rss_set_prep_indir() as part of the context (and presumably some > > netdev state for the main context?) and don't allow shrinking the > > context below that mark.. > > Don't be sorry! Good catch, and glad you caught it now rather than after > it landed. > > I'll respin with user_size tracked in the context (and netdev state for > context 0) as a lower bound, so resize never folds below the size the > user explicitly configured. > > WDYT? Yes, keep in mind that AFAIR context 0 is not currently tracked in the xarray. So maybe add the size of the main / default context as a field in struct ethtool_netdev_state ? Or we can start tracking it (partially). IDK what's cleaner. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-16 23:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20260313071322.3489243-1-bjorn@kernel.org>
2026-03-14 16:35 ` [Intel-wired-lan] [PATCH net-next v4 0/3] ethtool: Dynamic RSS context indirection table resizing Jakub Kicinski
2026-03-15 12:30 ` Björn Töpel
2026-03-16 23:31 ` Jakub Kicinski
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox