Skip to contentSkip to conversation

ice: Fix DSCP PFC TLV creation

PATCH Applied Karen Ostrowska 3 participants 3 messages Jan 27, 2023 – Mar 6, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ice: Fix DSCP PFC TLV creation

From: Dave Ertman <[email protected]>

When creating the TLV to send to the FW for configuring DSCP mode PFC,the PFCENABLE field was being masked with a 4 bit mask (0xF), but this is an 8 bit bitmask for enabled classes for PFC. This means that traffic classes 4-7 could not be enabled for PFC.

Remove the mask completely, as it is not necessary, as we are assigning 8 bits to an 8 bit field.

Fixes 2a87bd73e50d ("ice: Add DSCP support")
---
 drivers/net/ethernet/intel/ice/ice_dcb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_dcb.c +1 -1
index 6be02f9b0b8c..789b99963910 100644
@@ -1372,7 +1372,7 @@ ice_add_dscp_pfc_tlv(struct ice_lldp_org_tlv *tlv, struct ice_dcbx_cfg *dcbcfg)
 	tlv->ouisubtype = htonl(ouisubtype);
 
 	buf[0] = dcbcfg->pfc.pfccap & 0xF;
-	buf[1] = dcbcfg->pfc.pfcena & 0xF;
+	buf[1] = dcbcfg->pfc.pfcena;
 }
 
 /**
Signature · 6 lines
2.31.1

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
maintainer Applied
#1 lore raw
Quoted 7 lines · Karen Ostrowska

From: Dave Ertman <[email protected]>

When creating the TLV to send to the FW for configuring DSCP mode PFC,the PFCENABLE field was being masked with a 4 bit mask (0xF), but this is an 8 bit bitmask for enabled classes for PFC. This means that traffic classes 4-7 could not be enabled for PFC.

Quoted 7 lines

Remove the mask completely, as it is not necessary, as we are assigning 8 bits to an 8 bit field.

Fixes 2a87bd73e50d ("ice: Add DSCP support")

---

Applied, however, this should be a v2 (with changelog)

Quoted 8 lines
  drivers/net/ethernet/intel/ice/ice_dcb.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_dcb.c +0 -0
index 6be02f9b0b8c..789b99963910 100644

drivers/net/ethernet/intel/ice/ice_dcb.c ice_add_dscp_pfc_tlv(struct ice_lldp_org_tlv *tlv, struct ice_dcbx_cfg *dcbcfg) · line 1378

Quoted 8 lines
drivers/net/ethernet/intel/ice/ice_dcb.c +1 -1
@@ -1372,7 +1372,7 @@ ice_add_dscp_pfc_tlv(struct ice_lldp_org_tlv *tlv, struct ice_dcbx_cfg *dcbcfg)
  	tlv->ouisubtype = htonl(ouisubtype);
 
  	buf[0] = dcbcfg->pfc.pfccap & 0xF;
-	buf[1] = dcbcfg->pfc.pfcena & 0xF;
+	buf[1] = dcbcfg->pfc.pfcena;
  }
 
  /**

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

Tested-by on v1 1/1
#2 lore raw
In reply to Karen Ostrowska
Quoted 20 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Karen Ostrowska
Sent: Friday, January 27, 2023 6:54 PM
To: [email protected]
Cc: Ostrowska, Karen <[email protected]>
Subject: [Intel-wired-lan] [PATCH net v1] ice: Fix DSCP PFC TLV creation

From: Dave Ertman <[email protected]>

When creating the TLV to send to the FW for configuring DSCP mode PFC,the PFCENABLE field was being masked with a 4 bit mask (0xF), but this is an 8 bit bitmask for enabled classes for PFC. This means that traffic classes 4-7 could not be enabled for PFC.

Remove the mask completely, as it is not necessary, as we are assigning 8 bits to an 8 bit field.

Quoted 7 lines
Fixes 2a87bd73e50d ("ice: Add DSCP support")
---
 drivers/net/ethernet/intel/ice/ice_dcb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan