* [PATCH iwl-next] ice: init desired_dcbx_cfg in default DCB config
@ 2026-03-20 5:05 Aleksandr Loktionov
2026-03-20 19:31 ` Simon Horman
0 siblings, 1 reply; 2+ messages in thread
From: Aleksandr Loktionov @ 2026-03-20 5:05 UTC (permalink / raw)
To: intel-wired-lan, anthony.l.nguyen, aleksandr.loktionov
Cc: netdev, Lukasz Czapnik
From: Lukasz Czapnik <lukasz.czapnik@intel.com>
When DCBX is disabled in firmware the driver falls back to software LLDP
mode and applies a default DCB configuration via ice_dcb_sw_dflt_cfg().
This function properly initializes local_dcbx_cfg with valid parameters
including etscfg.maxtcs from hardware capabilities. However,
desired_dcbx_cfg was never initialized in this path.
All DCB netlink functions (ice_dcbnl_setpfc, ice_dcbnl_setets, etc.)
use desired_dcbx_cfg as the base configuration for user-requested changes.
When desired_dcbx_cfg remains uninitialized with etscfg.maxtcs=0, the
firmware rejects the configuration for 4+ port NICs, causing DCB
configuration commands to fail.
It is not a problem for 1 or 2 port NICs where we support 8 TCs - in
that case FW accepts maxtc=0, treating it as 8.
Fix it by copying local_dcbx_cfg (which was freshly initialized) into
desired_dcbx_cfg after the default config is applied.
Fixes: b94b013eb626 ("ice: Implement DCBNL support")
Signed-off-by: Lukasz Czapnik <lukasz.czapnik@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
---
drivers/net/ethernet/intel/ice/ice_dcb_lib.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c
index bd77f1c..060744c 100644
--- a/drivers/net/ethernet/intel/ice/ice_dcb_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_dcb_lib.c
@@ -669,6 +669,9 @@ int ice_dcb_sw_dflt_cfg(struct ice_pf *pf, bool ets_willing, bool locked)
if (ret)
return ret;
+ /* init desired_dcbx_cfg from local_dcbx_cfg */
+ pi->qos_cfg.desired_dcbx_cfg = pi->qos_cfg.local_dcbx_cfg;
+
return ice_query_port_ets(pi, &buf, sizeof(buf), NULL);
}
--
2.52.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH iwl-next] ice: init desired_dcbx_cfg in default DCB config
2026-03-20 5:05 [PATCH iwl-next] ice: init desired_dcbx_cfg in default DCB config Aleksandr Loktionov
@ 2026-03-20 19:31 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2026-03-20 19:31 UTC (permalink / raw)
To: Aleksandr Loktionov
Cc: intel-wired-lan, anthony.l.nguyen, netdev, Lukasz Czapnik
On Fri, Mar 20, 2026 at 06:05:41AM +0100, Aleksandr Loktionov wrote:
> From: Lukasz Czapnik <lukasz.czapnik@intel.com>
>
> When DCBX is disabled in firmware the driver falls back to software LLDP
> mode and applies a default DCB configuration via ice_dcb_sw_dflt_cfg().
> This function properly initializes local_dcbx_cfg with valid parameters
> including etscfg.maxtcs from hardware capabilities. However,
> desired_dcbx_cfg was never initialized in this path.
>
> All DCB netlink functions (ice_dcbnl_setpfc, ice_dcbnl_setets, etc.)
> use desired_dcbx_cfg as the base configuration for user-requested changes.
> When desired_dcbx_cfg remains uninitialized with etscfg.maxtcs=0, the
> firmware rejects the configuration for 4+ port NICs, causing DCB
> configuration commands to fail.
>
> It is not a problem for 1 or 2 port NICs where we support 8 TCs - in
> that case FW accepts maxtc=0, treating it as 8.
>
> Fix it by copying local_dcbx_cfg (which was freshly initialized) into
> desired_dcbx_cfg after the default config is applied.
>
> Fixes: b94b013eb626 ("ice: Implement DCBNL support")
> Signed-off-by: Lukasz Czapnik <lukasz.czapnik@intel.com>
> Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-20 19:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20 5:05 [PATCH iwl-next] ice: init desired_dcbx_cfg in default DCB config Aleksandr Loktionov
2026-03-20 19:31 ` Simon Horman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox