From: netdev-bot+sashiko@kernel.org
To: anthony.l.nguyen@intel.com
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
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 [thread overview]
Message-ID: <179634387483.3146.15472779215026410165@kernel.org> (raw)
In-Reply-To: <20261203002248.348492-4-anthony.l.nguyen@intel.com>
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
next prev parent reply other threads:[~2026-12-04 0:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 0:22 [PATCH net-next 0/4][pull request] Intel Wired LAN Driver Updates 2026-12-02 (ice) Tony Nguyen
2026-12-03 0:22 ` [PATCH net-next 1/4] ice: add support for unmanaged DPLL on E830 NIC Tony Nguyen
2026-12-04 0:24 ` netdev-bot+sashiko
2026-12-03 0:22 ` [PATCH net-next 2/4] ice: describe generic DPLL pins from firmware pin classification Tony Nguyen
2026-12-04 0:24 ` netdev-bot+sashiko
2026-12-03 0:22 ` [PATCH net-next 3/4] ice: translate FW to SW for max num TCs encoding Tony Nguyen
2026-12-04 0:24 ` netdev-bot+sashiko [this message]
2026-12-03 0:22 ` [PATCH net-next 4/4] ice: remove excessive memory allocation in ice_create_lag_recipe() Tony Nguyen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179634387483.3146.15472779215026410165@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=davem@davemloft.net \
--cc=david.m.ertman@intel.com \
--cc=edumazet@kernel.org \
--cc=joe@dama.to \
--cc=kuba@kernel.org \
--cc=marcin.szycik@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=patryk.holda@intel.com \
--cc=poros@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox