* [Intel-wired-lan] [PATCH net-next] ice: Fix problems with DSCP QoS implementation
@ 2021-10-12 20:31 Dave Ertman
2021-12-07 10:04 ` G, GurucharanX
0 siblings, 1 reply; 2+ messages in thread
From: Dave Ertman @ 2021-10-12 20:31 UTC (permalink / raw)
To: intel-wired-lan
The patch that implemented DSCP QoS implementation removed a
bandwidth check that was used to check for a specific condition
caused by some corner cases. This check should not of been
removed.
The same patch also added a check for when the DCBx state could
be changed in relation to DSCP, but the check was erroneously
added nested in a check for CEE mode, which made the check useless.
Fix these problems by re-adding the bandwidth check and relocating
the DSCP mode check earlier in the function that changes DCBx state
in the driver.
Fixes: 2a87bd73e5 ("ice: Add DSCP support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
---
drivers/net/ethernet/intel/ice/ice_dcb_nl.c | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_dcb_nl.c b/drivers/net/ethernet/intel/ice/ice_dcb_nl.c
index 7fdeb411b6df..3eb01731e496 100644
--- a/drivers/net/ethernet/intel/ice/ice_dcb_nl.c
+++ b/drivers/net/ethernet/intel/ice/ice_dcb_nl.c
@@ -97,6 +97,9 @@ static int ice_dcbnl_setets(struct net_device *netdev, struct ieee_ets *ets)
new_cfg->etscfg.maxtcs = pf->hw.func_caps.common_cap.maxtc;
+ if (!bwcfg)
+ new_cfg->etscfg.tcbwtable[0] = 100;
+
if (!bwrec)
new_cfg->etsrec.tcbwtable[0] = 100;
@@ -167,15 +170,18 @@ static u8 ice_dcbnl_setdcbx(struct net_device *netdev, u8 mode)
if (mode == pf->dcbx_cap)
return ICE_DCB_NO_HW_CHG;
- pf->dcbx_cap = mode;
qos_cfg = &pf->hw.port_info->qos_cfg;
- if (mode & DCB_CAP_DCBX_VER_CEE) {
- if (qos_cfg->local_dcbx_cfg.pfc_mode == ICE_QOS_MODE_DSCP)
- return ICE_DCB_NO_HW_CHG;
+
+ /* DSCP configuration is not DCBx negotiated */
+ if (qos_cfg->local_dcbx_cfg.pfc_mode == ICE_QOS_MODE_DSCP)
+ return ICE_DCB_NO_HW_CHG;
+
+ pf->dcbx_cap = mode;
+
+ if (mode & DCB_CAP_DCBX_VER_CEE)
qos_cfg->local_dcbx_cfg.dcbx_mode = ICE_DCBX_MODE_CEE;
- } else {
+ else
qos_cfg->local_dcbx_cfg.dcbx_mode = ICE_DCBX_MODE_IEEE;
- }
dev_info(ice_pf_to_dev(pf), "DCBx mode = 0x%x\n", mode);
return ICE_DCB_HW_CHG_RST;
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Intel-wired-lan] [PATCH net-next] ice: Fix problems with DSCP QoS implementation
2021-10-12 20:31 [Intel-wired-lan] [PATCH net-next] ice: Fix problems with DSCP QoS implementation Dave Ertman
@ 2021-12-07 10:04 ` G, GurucharanX
0 siblings, 0 replies; 2+ messages in thread
From: G, GurucharanX @ 2021-12-07 10:04 UTC (permalink / raw)
To: intel-wired-lan
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Dave
> Ertman
> Sent: Wednesday, October 13, 2021 2:01 AM
> To: intel-wired-lan at osuosl.org
> Subject: [Intel-wired-lan] [PATCH net-next] ice: Fix problems with DSCP QoS
> implementation
>
> The patch that implemented DSCP QoS implementation removed a bandwidth
> check that was used to check for a specific condition caused by some corner
> cases. This check should not of been removed.
>
> The same patch also added a check for when the DCBx state could be changed
> in relation to DSCP, but the check was erroneously added nested in a check for
> CEE mode, which made the check useless.
>
> Fix these problems by re-adding the bandwidth check and relocating the DSCP
> mode check earlier in the function that changes DCBx state in the driver.
>
> Fixes: 2a87bd73e5 ("ice: Add DSCP support")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice_dcb_nl.c | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-07 10:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-12 20:31 [Intel-wired-lan] [PATCH net-next] ice: Fix problems with DSCP QoS implementation Dave Ertman
2021-12-07 10:04 ` G, GurucharanX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox