On Sun, 15 Mar 2026 13:30:33 +0100 Björn Töpel wrote: > Jakub Kicinski <[email protected]> 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.
