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 A811D1DE8AE; Mon, 10 Nov 2025 23:46:46 +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=1762818406; cv=none; b=G78Lfrd/3ZmONF4M4j+JBaWGvLxY5O+X2ipAjb/ErHsPoXg2+92PiTj6Y0TLB0sINRyUmAW1Td8VthevJIcUQ6tpJp5jc6kH1NU3xSUnq/wvg1XHOuk84cKS9fuZOr1eU2gPH+9dPr0Y+z8fsGU0kTZrDX2RaLME2wakO+BJR4U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762818406; c=relaxed/simple; bh=4e1bgpUV/iimHsy8hCdENWKdiFeyy00W/2NkO5sEUAI=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hc1vpq+YHIP7Y6K9fhHX8A5AH0KpARdFzL522+BGIzcq0Jk3oZ8u4ZR3r4SEfU24yDaDp9Z/8SHQEStF6jp/wXKDuIurX25JUSwhZOJs67aup0Sjc/KhbLGyE8/4u8t+SYQynXhPehsl2cuRo4A6fQ+5DXzI7fxm6vK023A39t0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oP2yrdDG; 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="oP2yrdDG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 28E6FC4CEF5; Mon, 10 Nov 2025 23:46:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1762818406; bh=4e1bgpUV/iimHsy8hCdENWKdiFeyy00W/2NkO5sEUAI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oP2yrdDG0/mUFvFidbKQaKe6gJ9F/49YmJX2dk2zIRQVnLBAUt5Bk09EXUhtxHglT RAHcKDqMcD6UbGffywoOsfuUPYOzyut01P+a224sUF9Q/lCufFp9yx3N1QHe8hHzQ1 h1Gcdd3ZW0XNvLVdJLo0EU9+29ceM4l9zpj0MH6jJCfTtB7C1/yevHRx8d/7412s8d I7WAj66CpWa5b2UnoISnNm/NI/L7rkfg3Llh78AlgAm4kaqySG0bWidh4Tqr8v6nCf UIrKMk8d7m0dQaOHa+KAQEtIcdyh5ignOrmz8lLJaeASJcxf/Y4qB4NfmGN21hdN5y KC7cNoFQCREBw== Date: Mon, 10 Nov 2025 15:46:43 -0800 From: Jakub Kicinski To: Jiri Pirko Cc: Saeed Mahameed , Daniel Zahka , "David S. Miller" , Eric Dumazet , Paolo Abeni , Simon Horman , Jonathan Corbet , Srujana Challa , Bharat Bhushan , Herbert Xu , Brett Creeley , Andrew Lunn , Michael Chan , Pavan Chebbi , Tony Nguyen , Przemek Kitszel , Sunil Goutham , Linu Cherian , Geetha sowjanya , Jerin Jacob , hariprasad , Subbaraya Sundeep , Tariq Toukan , Saeed Mahameed , Leon Romanovsky , Mark Bloch , Ido Schimmel , Petr Machata , Manish Chopra , Maxime Coquelin , Alexandre Torgue , Siddharth Vadapalli , Roger Quadros , Loic Poulain , Sergey Ryazanov , Johannes Berg , Vladimir Oltean , Michal Swiatkowski , Aleksandr Loktionov , Dave Ertman , Vlad Dumitrescu , "Russell King (Oracle)" , Alexander Sverdlin , Lorenzo Bianconi , netdev@vger.kernel.org, linux-doc@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-rdma@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: Re: [PATCH net-next v3 2/2] net/mlx5: implement swp_l4_csum_mode via devlink params Message-ID: <20251110154643.66d15800@kernel.org> In-Reply-To: References: <20251107204347.4060542-1-daniel.zahka@gmail.com> <20251107204347.4060542-3-daniel.zahka@gmail.com> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 9 Nov 2025 11:46:37 +0100 Jiri Pirko wrote: > >So, I checked a couple of flows internally, and it seems this allows > >some flexibility in the FW to decide later on which mode to pick, > >based on other parameters, which practically means > >"user has no preference on this param". Driver can only find out > >after boot, when it reads the runtime capabilities, but still > >this is a bug, by the time the driver reads this (in devlink), the > >default value should've already been determined by FW, so FW must > >return the actual runtime value. Which can only be one of the following > > I don't think it is correct to expose the "default" as a value. > > On read, user should see the configured value, either "full_csum" or > "l4_only". Reporting "default" to the user does not make any sense. > On write, user should pass either "full_csum" or "l4_only". Why we would > ever want to pass "default"? FWIW I agree that this feels a bit odd. Should the default be a flag attr? On get flag being present means the value is the FW default (no override present). On set passing the flag means user wants to reset to FW default (remove override)? > Regardless this patch, since this is param to be reflected on fw reboot > (permanent cmode), I think it would be nice to expose indication if > param value passed to user currently affects the fw, or if it is going > to be applied after fw reboot. Perhaps a simple bool attr would do? IIUC we're basically talking about user having no information that the update is pending? Could this be done by the core? Core can do a ->get prior to calling ->set and if the ->set succeeds and cmode != runtime record that the update is pending? That feels very separate from the series tho, there are 3 permanent params in mlx5, already. Is there something that makes this one special?