From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69D5B26E6FA; Mon, 16 Mar 2026 23:31:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773703893; cv=none; b=Bm5R16rDIjgpLUcSpKh0wilSgvZ2KWx11yckNZu4T8Sj44VNnITX4yTHMmKSoLAF7xBOV2aM/kJ2PWxrOeWPMr5IccM6DmEFLxLqrNoFpuyqvHqqyWUpMLmRDjLL+MSJmicxNuA4R0iOMpASRw91DQ/FdeZcOlqlsfzFNilh9xo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773703893; c=relaxed/simple; bh=mokbVaSNGRbUCQQ4SGbI4E3yKDImZ3QdINhNbLzi8Po=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=oJOxktom5xoSENDTSL6KYlNk5xLg/ZFHmKCTk/7PNpeuPAtJ1fqvrfOoThwvOPdpP5gtRYVsv751Y0iXrtySzmHawfvtq6Na3fGveEKbj6yXc6/8TqiJgpnFdgAWSlp4OwnbrZKVFZDxIh7k1cqUfq9cyF4vviGIUAGQPDVWboA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hN1fRzFk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hN1fRzFk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A749C19421; Mon, 16 Mar 2026 23:31:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773703893; bh=mokbVaSNGRbUCQQ4SGbI4E3yKDImZ3QdINhNbLzi8Po=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=hN1fRzFkuoAPo5qf7cCUj/3UZ74Zrg2FGMIpeV+WXs3DgSmup1ufDh90hMZjFc0TC DFJ5TZCjZPQKQKjORnD6nXc/kg4X+SL6SJtuFZKzc/SmJH8x3Lpni7zXRGSJmC7zCx g7VH7wJOZJqANs6wbO3dzR0eI7+48NtQaOEffLB3o9yHJpLmt0FdQpGcv1EWJJtNb/ ADvmnC44FS9xSHGIWnlJtVwSRO6c9ouBQkKC+O0VI4rosda2SYh3oAyxbDRgyDV0SU SPJVnJB69/VFFVSBjUhPhbnu67KO1WBCN7X1nUwGRmGsi0HPAY8in067EPcMCo8ChC 2fFBt9f9P7NSg== Date: Mon, 16 Mar 2026 16:31:31 -0700 From: Jakub Kicinski To: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= Cc: netdev@vger.kernel.org, Michael Chan , Pavan Chebbi , Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , linux-kselftest@vger.kernel.org, Willem de Bruijn , Shuah Khan , Maxime Chevallier , Andrew Lunn , intel-wired-lan@lists.osuosl.org, Przemek Kitszel Subject: Re: [PATCH net-next v4 0/3] ethtool: Dynamic RSS context indirection table resizing Message-ID: <20260316163131.2ff161c5@kernel.org> In-Reply-To: <87a4w9p95i.fsf@all.your.base.are.belong.to.us> References: <20260313071322.3489243-1-bjorn@kernel.org> <20260314093518.43b820b7@kernel.org> <87a4w9p95i.fsf@all.your.base.are.belong.to.us> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, 15 Mar 2026 13:30:33 +0100 Bj=C3=B6rn T=C3=B6pel wrote: > Jakub Kicinski writes: >=20 > > On Fri, 13 Mar 2026 08:13:12 +0100 Bj=C3=B6rn T=C3=B6pel wrote: =20 > >> 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. > >>=20 > >> This series adds resize helpers and wires them up in bnxt. =20 > > > > Sorry Bjorn, I was typing the explanation below and I realized that=20 > > 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.. =20 >=20 > Don't be sorry! Good catch, and glad you caught it now rather than after > it landed. >=20 > 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. >=20 > 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=20 as a field in struct ethtool_netdev_state ? Or we can start tracking it (partially). IDK what's cleaner.