Skip to contentSkip to conversation

wifi: cfg80211: fix bug of mapping AF3x to incorrect User Priority

PATCH Superseded hhorace 6 participants 10 messages Aug 5, 2024 – Aug 21, 2024

Subsystems (3)
lore
Share & tools
lore

hhorace

author
#0 lore raw

PATCH 1/1 wifi: cfg80211: fix bug of mapping AF3x to incorrect User Priority

According to RFC8325 4.3, Multimedia Streaming: AF31(011010, 26), AF32(011100, 28), AF33(011110, 30) maps to User Priority = 4 and AC_VI (Video).

However, the original code remain the default three Most Significant Bits (MSBs) of the DSCP, which makes AF3x map to User Priority = 3 and AC_BE (Best Effort).

---
 net/wireless/util.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
net/wireless/util.c +6 -1
index 082c6f9..4e04618 100644
@@ -998,7 +998,6 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
 	 * Diffserv Service Classes no update is needed:
 	 * - Standard: DF
 	 * - Low Priority Data: CS1
-	 * - Multimedia Streaming: AF31, AF32, AF33
 	 * - Multimedia Conferencing: AF41, AF42, AF43
 	 * - Network Control Traffic: CS7
 	 * - Real-Time Interactive: CS4
@@ -1026,6 +1025,12 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
 		/* Broadcasting video: CS3 */
 		ret = 4;
 		break;
+	case 26:
+	case 28:
+	case 30:
+		/* Multimedia Streaming: AF31, AF32, AF33 */
+		ret = 4;
+		break;
 	case 40:
 		/* Signaling: CS5 */
 		ret = 5;
Signature · 1 line
2.42.0.windows.2
reviewer
#1 lore raw

+ Guillaume and Ido

Quoted 9 lines · hhorace

According to RFC8325 4.3, Multimedia Streaming: AF31(011010, 26), AF32(011100, 28), AF33(011110, 30) maps to User Priority = 4 and AC_VI (Video).

However, the original code remain the default three Most Significant Bits (MSBs) of the DSCP, which makes AF3x map to User Priority = 3 and AC_BE (Best Effort).

Adding Guillaume and Ido as this relates to DSCP.

Quoted 33 lines
---
 net/wireless/util.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
net/wireless/util.c +6 -1
index 082c6f9..4e04618 100644
@@ -998,7 +998,6 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
 	 * Diffserv Service Classes no update is needed:
 	 * - Standard: DF
 	 * - Low Priority Data: CS1
-	 * - Multimedia Streaming: AF31, AF32, AF33
 	 * - Multimedia Conferencing: AF41, AF42, AF43
 	 * - Network Control Traffic: CS7
 	 * - Real-Time Interactive: CS4
@@ -1026,6 +1025,12 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
 		/* Broadcasting video: CS3 */
 		ret = 4;
 		break;
+	case 26:
+	case 28:
+	case 30:
+		/* Multimedia Streaming: AF31, AF32, AF33 */
+		ret = 4;
+		break;
 	case 40:
 		/* Signaling: CS5 */
 		ret = 5;
Signature · 1 line
2.42.0.windows.2
Reviewed-by
#2 lore raw
Quoted 7 lines · Simon Horman

+ Guillaume and Ido

Quoted 4 lines · hhorace

According to RFC8325 4.3, Multimedia Streaming: AF31(011010, 26), AF32(011100, 28), AF33(011110, 30) maps to User Priority = 4 and AC_VI (Video).

Quoted 7 lines
Quoted 5 lines

However, the original code remain the default three Most Significant Bits (MSBs) of the DSCP, which makes AF3x map to User Priority = 3 and AC_BE (Best Effort).

Adding Guillaume and Ido as this relates to DSCP.

Thanks. The patch looks good to me (only missing a Fixes tag).

Just a note to hhorace: the entry for CS5 (case 40) is useless as CS5 is 101000. So the value of the 3 high order bits already is 5 (in case you want to make a followup patch for net-next).

Fixes 6fdb8b8781d5 ("wifi: cfg80211: Update the default DSCP-to-UP mapping")
Quoted 34 lines
Quoted 33 lines
---
 net/wireless/util.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
net/wireless/util.c +6 -1
index 082c6f9..4e04618 100644
@@ -998,7 +998,6 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
 	 * Diffserv Service Classes no update is needed:
 	 * - Standard: DF
 	 * - Low Priority Data: CS1
-	 * - Multimedia Streaming: AF31, AF32, AF33
 	 * - Multimedia Conferencing: AF41, AF42, AF43
 	 * - Network Control Traffic: CS7
 	 * - Real-Time Interactive: CS4
@@ -1026,6 +1025,12 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
 		/* Broadcasting video: CS3 */
 		ret = 4;
 		break;
+	case 26:
+	case 28:
+	case 30:
+		/* Multimedia Streaming: AF31, AF32, AF33 */
+		ret = 4;
+		break;
 	case 40:
 		/* Signaling: CS5 */
 		ret = 5;
Signature · 1 line
2.42.0.windows.2
#3 lore raw
Quoted 14 lines · Guillaume Nault
Quoted 13 lines · Simon Horman

+ Guillaume and Ido

Quoted 9 lines · hhorace

According to RFC8325 4.3, Multimedia Streaming: AF31(011010, 26), AF32(011100, 28), AF33(011110, 30) maps to User Priority = 4 and AC_VI (Video).

However, the original code remain the default three Most Significant Bits (MSBs) of the DSCP, which makes AF3x map to User Priority = 3 and AC_BE (Best Effort).

Quoted 7 lines
Quoted 1 line

Adding Guillaume and Ido as this relates to DSCP.

Thanks. The patch looks good to me (only missing a Fixes tag).

Just a note to hhorace: the entry for CS5 (case 40) is useless as CS5 is 101000. So the value of the 3 high order bits already is 5 (in case you want to make a followup patch for net-next).

Minor clarification: cfg80211 patches go to wireless-next, not net-next.

Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
author
#4 lore raw
Quoted 17 lines · Kalle Valo
Quoted 14 lines · Guillaume Nault
Quoted 13 lines · Simon Horman

+ Guillaume and Ido

Quoted 9 lines · hhorace

According to RFC8325 4.3, Multimedia Streaming: AF31(011010, 26), AF32(011100, 28), AF33(011110, 30) maps to User Priority = 4 and AC_VI (Video).

However, the original code remain the default three Most Significant Bits (MSBs) of the DSCP, which makes AF3x map to User Priority = 3 and AC_BE (Best Effort).

Quoted 7 lines
Quoted 7 lines
Quoted 1 line

Adding Guillaume and Ido as this relates to DSCP.

Thanks. The patch looks good to me (only missing a Fixes tag).

Just a note to hhorace: the entry for CS5 (case 40) is useless as CS5 is 101000. So the value of the 3 high order bits already is 5 (in case you want to make a followup patch for net-next).

Sure. I will add it in next version.

Quoted 2 lines

Minor clarification: cfg80211 patches go to wireless-next, not net-next.

Thanks for your clarification.

Quoted 5 lines

--
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

#5 lore raw
In reply to Kalle Valo
Quoted 18 lines · Kalle Valo
Quoted 16 lines · Guillaume Nault
Quoted 14 lines · Simon Horman

+ Guillaume and Ido

Quoted 9 lines · hhorace

According to RFC8325 4.3, Multimedia Streaming: AF31(011010, 26), AF32(011100, 28), AF33(011110, 30) maps to User Priority = 4 and AC_VI (Video).

However, the original code remain the default three Most Significant Bits (MSBs) of the DSCP, which makes AF3x map to User Priority = 3 and AC_BE (Best Effort).

Adding Guillaume and Ido as this relates to DSCP.

Quoted 7 lines
Quoted 5 lines

Thanks. The patch looks good to me (only missing a Fixes tag).

Just a note to hhorace: the entry for CS5 (case 40) is useless as CS5 is 101000. So the value of the 3 high order bits already is 5 (in case you want to make a followup patch for net-next).

Minor clarification: cfg80211 patches go to wireless-next, not net-next.

Yes, sorry for the confusion :-/.

Quoted 5 lines
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
author
#6 lore raw

PATCH v2 1/1 wifi: cfg80211: fix bug of mapping AF3x to incorrect User Priority

In reply to hhorace

According to RFC8325 4.3, Multimedia Streaming: AF31(011010, 26), AF32(011100, 28), AF33(011110, 30) maps to User Priority = 4 and AC_VI (Video).

However, the original code remain the default three Most Significant Bits (MSBs) of the DSCP, which makes AF3x map to User Priority = 3 and AC_BE (Best Effort).

Fixes 6fdb8b8781d5 ("wifi: cfg80211: Update the default DSCP-to-UP mapping")

---
Changes in v2:
- Remove the useless entry for CS5 (case 40) since the value of the 3 high order bits is already 5.

 net/wireless/util.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
net/wireless/util.c +6 -4
index 082c6f9..c6d0397 100644
@@ -998,10 +998,10 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
 	 * Diffserv Service Classes no update is needed:
 	 * - Standard: DF
 	 * - Low Priority Data: CS1
-	 * - Multimedia Streaming: AF31, AF32, AF33
 	 * - Multimedia Conferencing: AF41, AF42, AF43
 	 * - Network Control Traffic: CS7
 	 * - Real-Time Interactive: CS4
+	 * - Signaling: CS5
 	 */
 	switch (dscp >> 2) {
 	case 10:
@@ -1026,9 +1026,11 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb,
 		/* Broadcasting video: CS3 */
 		ret = 4;
 		break;
-	case 40:
-		/* Signaling: CS5 */
-		ret = 5;
+	case 26:
+	case 28:
+	case 30:
+		/* Multimedia Streaming: AF31, AF32, AF33 */
+		ret = 4;
 		break;
 	case 44:
 		/* Voice Admit: VA */
Signature · 1 line
2.42.0.windows.2
Reviewed-by on v2 1/1
#7 lore raw
Quoted 8 lines · hhorace

According to RFC8325 4.3, Multimedia Streaming: AF31(011010, 26), AF32(011100, 28), AF33(011110, 30) maps to User Priority = 4 and AC_VI (Video).

However, the original code remain the default three Most Significant Bits (MSBs) of the DSCP, which makes AF3x map to User Priority = 3 and AC_BE (Best Effort).

Reviewed-by on v2 1/1
#8 lore raw
In reply to hhorace
Quoted 10 lines · hhorace

According to RFC8325 4.3, Multimedia Streaming: AF31(011010, 26), AF32(011100, 28), AF33(011110, 30) maps to User Priority = 4 and AC_VI (Video).

However, the original code remain the default three Most Significant Bits (MSBs) of the DSCP, which makes AF3x map to User Priority = 3 and AC_BE (Best Effort).

Fixes 6fdb8b8781d5 ("wifi: cfg80211: Update the default DSCP-to-UP mapping")
maintainer
#9 lore raw
In reply to hhorace
Quoted 10 lines · hhorace

According to RFC8325 4.3, Multimedia Streaming: AF31(011010, 26), AF32(011100, 28), AF33(011110, 30) maps to User Priority = 4 and AC_VI (Video).

However, the original code remain the default three Most Significant Bits (MSBs) of the DSCP, which makes AF3x map to User Priority = 3 and AC_BE (Best Effort).

Fixes 6fdb8b8781d5 ("wifi: cfg80211: Update the default DSCP-to-UP mapping")

^^^ looks more like a username, is that really your name/"known identity"?

https://www.kernel.org/doc/html/latest/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin

johannes