πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #26628

Re: [PATCH net-next 3/4] ice: translate FW to SW for max num TCs encoding

#26628
From: netdev-bot+sashiko
Date: Fri, 04 Dec 2026 00:24
98 lines
11435 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The commit message says the translated max-TC value "is used for
  reporting only" and that "no configuration issues are seen due to…
- [Low] The patch fixes a user-visible defect that dates back to 2019,
  but it has no Fixes: tag.

--

ice: translate FW to SW for max num TCs encoding

The firmware encodes 8 max TCs as 0x0 in its 3-bit field. This commit
translates that value in ice_parse_ieee_etscfg_tlv(), so 8 is stored
instead of 0. It also adds the ICE_DCB_MAXTC and ICE_DCB_MAXTC_ENCODE
defines to ice_dcb.h.

> The driver currently does not translate this value and reports 0 max TCs
> instead of 8. Add a translation when interfacing with the FW to use 0x0
> as the value for 8 max TCs. This value is used for reporting only;
> configuration uses the hardware capabilities so no configuration issues
> are seen due to this.

[Severity: Low]
Is "used for reporting only" accurate here? etscfg.maxtcs is a field of
struct ice_dcbx_cfg, and some configuration decisions memcmp() the whole
struct:

ice_dcb_lib.c:ice_pf_dcb_cfg() {
    ...
	if (!memcmp(new_cfg, curr_cfg, sizeof(*new_cfg))) {
		dev_dbg(dev, "No change in DCB config required\n");
		return ret;
	}
    ...
}

ice_dcb_lib.c:ice_dcb_process_lldp_set_mib_change() {
    ...
	if (!memcmp(&tmp_dcbx_cfg, &pi->qos_cfg.local_dcbx_cfg,
		    sizeof(tmp_dcbx_cfg))) {
    ...
}

The VF LAG DCB compatibility check in ice_lag.c does the same:

		if (memcmp(dcb_cfg, peer_dcb_cfg,
			   sizeof(struct ice_dcbx_cfg))) {

Configs built in software take maxtcs from the hardware caps, in both
ice_dcb_sw_dflt_cfg() and ice_dcbnl_setets():

	dcbcfg->etscfg.maxtcs = hw->func_caps.common_cap.maxtc;

Before this patch, a config parsed from firmware held 0 here. Now it
holds 8. The kzalloc'ed err_cfg in the ice_dcb_rebuild() error path still
holds 0.

So comparing a firmware-parsed config with a software-built or zeroed
config can now give a different result. For example, ice_pf_dcb_cfg() may
now skip a commit (VSI disable/reconfigure, ice_set_dcb_cfg()) that it
used to perform. Also, err_cfg no longer matches a parsed config.

The new behavior looks benign. ice_add_ieee_ets_tlv() still masks maxtcs
with ICE_IEEE_ETS_MAXTC_M, so 8 is still written back to firmware as 0.

Could the commit message say that this also changes these memcmp()-based
no-change decisions, instead of saying the value is used for reporting
only?

[Severity: Low]
Should this have a Fixes: tag? ice_dcbnl_getets() passes the parsed
value straight to userspace:

ice_dcb_nl.c:ice_dcbnl_getets() {
    ...
	ets->ets_cap = dcbxcfg->etscfg.maxtcs;
    ...
}

When the firmware encodes 8 TCs, IEEE dcbnl tools such as dcb ets show
or lldptool report an ETS capability of 0.

The untranslated parse in ice_parse_ieee_etscfg_tlv() comes from:

Fixes: 0ebd3ff13cca ("ice: Add code for DCB initialization part 2/4")

The value has been reported through dcbnl since commit b94b013eb626
("ice: Implement DCBNL support").

Without a Fixes: tag, stable kernels will not pick up this fix.

-- 
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261203002248.348492-1-anthony.l.nguyen%40intel.com
Technical Details
Message-ID: <179634387483.3146.15472779215026410165@kernel.org>
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376933-linux-kernel-netdev=dewy.ru
References: <20261203002248.348492-4-anthony.l.nguyen@intel.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-mo.newsdeef.eu!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376933-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next 3/4] ice: translate FW to SW for max num TCs encoding
Date: Fri, 04 Dec 2026 00:24:34 +0000
Organization: Usenet Network
Message-ID: <179634387483.3146.15472779215026410165@kernel.org>
References: <20261203002248.348492-4-anthony.l.nguyen@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="2638694"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:YHjcYpKIIlh9U9MxGQMjP0bdrGU= sha256:2mo/OG2bunSnD8Cd8VedoH6lgbnhT79ssw7YmqqOAmY=
	sha1:EIPUfeJkC9wHcz8jU7Y0y6RrHuU= sha256:/MnQb4Mvy9hHxfh187i32jBygflUEGULdBBvM37BXCo=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 9DDCD117A7E; Fri,  4 Dec 2026 03:24:52 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.639
X-Spam-Status: No, score=-3.639 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id o0IQtyzITmv9;
	Fri,  4 Dec 2026 03:24:49 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-376933-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id C6C731179D5; Fri,  4 Dec 2026 03:24:40 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 75211260FE; Fri,  4 Dec 2026 00:24:37 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796343877;
	b=5AY0dNuCLb6IPrXDnOfgUyaN4D9XXX3yGA9FidlRxIxXTKp1dnPoxtMRKFsHM6AktCaX
	 31WUnUJQIZ6WFYd7F5Cle/gjiw3Uh2xkkQ/VdqF9qxnduzB24KM/aGtejrQzWLJeOhGvE
	 YOSF6+LNKn7p3WNE18kpJN/0dnKTjVTw4Sb4xHE7ATsjh9GcJn859UyM35k1/JzMsCg+D
	 VHCnQz8xTzVCkzrr62SqxFfIzYDkD+18xy6MDERwMkwhvLcqT27NoA6WNLqmJYQUgGuT5
	 1rCwQ8IMo533DW6bF8Fmpak7UFsflcdvcCkYU6Ws6067/9dX8XrRKMxqRHwqgPIeY9w==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796343877;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=/cT6wg2yqMWvkBHqwJr19+lDtUE3Uvl/NeUWAxjIA84=;
	b=ybWWI0Kahn1pWOox8CDJae1c57a2/ENxhq5LeCPEowb/mr/Ko7bmf5R36zf5E1uUVfWd
	 ddxhB+5vsFmdUxgQco8Tfu3K6VpAr+JixnCWYh7SB/MFeQWCEO5bweRE8q6rc45D3pdGm
	 T92KKMiJB/DdyZXS/wTKRZxf161AsDw2mlFM4Txe0topIqFeXQWjSsHLQiu5qFfeAdA74
	 JkcDR613+jXkjTFxrTAOaH8Pb5MWRI/EjacaZXcQ/RjP+2D63xKS3xxHkC2+R2GxTsiV6
	 PbBVvOE5F8ImbzmHL5mOZ2wYYv6U6C4gSgzz8IftyqTtNaoWWJCeaQpD3lD+Qbb05pw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=oc4v1Gwa;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A099606A322;
	Fri,  4 Dec 2026 00:24:37 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=oc4v1Gwa
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796343876;
	b=0hHiMWmiybFYiulpjwPibb9t60kk2Jk8MpPDpOtpzPjjEG3zxC7y5q66ZLypQR1xst72
	 CFU7dkOJGNTbbTpe3w66fx7fMuGOCIWfGBhijnx1Twi6H25/i2OU4vbhD/S/4GooB1Hst
	 /N4iKKyBhOnh5CAz5MewGynBsn4YAlXAjllbpqHPcB85zMZKijeXShacabfnDxRvki6/W
	 Ph0CIUhx5Vj2UpULExhcJcaev/AAJGx+b/wd5kMFaYJF5F0IPI23exEi4Osi94S2wcIOW
	 DrXL1qhBQghXG/OSRRKddMK/QYHFiwHObr1eF6/KROSWr5zs4KtDTiMAmcyQ4ayjbWA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796343876;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=/cT6wg2yqMWvkBHqwJr19+lDtUE3Uvl/NeUWAxjIA84=;
	b=0qX8FlvnQmU7OaA0fZ4UqKI5/iSeRiQbqIo7xlR549bK+huvOnW5zKLltSPSe4zGP50Y
	 NlH+8OytIglw5sEWGztrpnP7bGqh4svpKQpzP3XKDEbK2ZZbe+erTSuav/Z6nIKdScBDh
	 dV28qXjXBTf+MYt0KljpAD8h8D6YnLgrGixNIRSdRSIEUdM/bz+V3l1MzzCWwi8GNZwgC
	 Bf1aVRwiykxxvF9cBER2ScunhyAEsSlUyJDAaq2vYZNKxjimlkK8tlUpS5iCTyT7HM2pJ
	 oNym3geLRvIyCMzBpigqwy/jc9wPiU3cHqBRiTl/NyqH4dUI2DKa5i50GgvK4rTrP7w==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=oc4v1Gwa;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67820606A334
	for <netdev@vger.kernel.org>; Fri,  4 Dec 2026 00:24:36 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DDFC1F000CE;
	Fri,  4 Dec 2026 00:24:35 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796343876;
	bh=/cT6wg2yqMWvkBHqwJr19+lDtUE3Uvl/NeUWAxjIA84=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=oc4v1GwaDXgyM7FWrq0q/2qUoX7q5g1GEpEFI2fpw23ARCE1eyCK2ggcUxVOaFOXW
	 BYakKuRVpL7qMybcXFeC6R8toP4m8raNQEZFPs0b4VmSRsRsYXSAqR/S53Z8RTCwTC
	 WV0BMBniPzPwX5KcTyw7UiEU1QhwaFmZ6EfAM7Ad++eWQ3S/sOckFNYwBdgbyagBbA
	 cEMhVoDrPgEe0Qz1smUvDMBZoXhmcxz/foXHyxWTBnECMxeKKeWAWpOga9znNt2WHU
	 gjWSDUqSMWp43gtauSpBhmXZ2xoockV0uOlltrzVo8wJeUa46JseaLZZVB0qO9PTKR
	 ANgrOrDT/KPJg==
X-Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
 edumazet@kernel.org, andrew+netdev@lunn.ch, willemb@google.com,
 netdev@vger.kernel.org, marcin.szycik@intel.com,
 arkadiusz.kubalewski@intel.com, poros@redhat.com, david.m.ertman@intel.com,
 przemyslaw.kitszel@intel.com, aleksandr.loktionov@intel.com, joe@dama.to,
 patryk.holda@intel.com
X-In-Reply-To: <20261203002248.348492-4-anthony.l.nguyen@intel.com>
X-sashiko-severity: Low
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list