Skip to contentSkip to conversation

iwlwifi: provide gso_type to GSO packets

PATCH Applied Eric Dumazet 7 participants 7 messages Jan 25, 2021 – Jan 27, 2021

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

PATCH 1/1 iwlwifi: provide gso_type to GSO packets

From: Eric Dumazet <[email protected]>

net/core/tso.c got recent support for USO, and this broke iwlfifi because the driver implemented a limited form of GSO.

Providing ->gso_type allows for skb_is_gso_tcp() to provide a correct result.

Fixes 3d5b459ba0e3 ("net: tso: add UDP segmentation support")
Cc Luca Coelho <[email protected]>
Cc Johannes Berg <[email protected]>
---
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +3 -0
index a983c215df310776ffe67f3b3ffa203eab609bfc..3712adc3ccc2511d46bcc855efbfba41c487d8e6 100644
@@ -773,6 +773,7 @@ iwl_mvm_tx_tso_segment(struct sk_buff *skb, unsigned int num_subframes,
 
 	next = skb_gso_segment(skb, netdev_flags);
 	skb_shinfo(skb)->gso_size = mss;
+	skb_shinfo(skb)->gso_type = ipv4 ? SKB_GSO_TCPV4 : SKB_GSO_TCPV6;
 	if (WARN_ON_ONCE(IS_ERR(next)))
 		return -EINVAL;
 	else if (next)
@@ -795,6 +796,8 @@ iwl_mvm_tx_tso_segment(struct sk_buff *skb, unsigned int num_subframes,
 
 		if (tcp_payload_len > mss) {
 			skb_shinfo(tmp)->gso_size = mss;
+			skb_shinfo(tmp)->gso_type = ipv4 ? SKB_GSO_TCPV4 :
+							   SKB_GSO_TCPV6;
 		} else {
 			if (qos) {
 				u8 *qc;
Signature · 1 line
2.30.0.280.ga3ce27912f-goog
#1 lore raw
Quoted 5 lines · Eric Dumazet

From: Eric Dumazet <[email protected]>

net/core/tso.c got recent support for USO, and this broke iwlfifi because the driver implemented a limited form of GSO.

Quoted 7 lines

Providing ->gso_type allows for skb_is_gso_tcp() to provide a correct result.

Fixes 3d5b459ba0e3 ("net: tso: add UDP segmentation support")

I appreciate the credit, but the bisect and some other initial bug hunting was done by people on this thread:

https://bugzilla.kernel.org/show_bug.cgi?id=209913

Thanks,
Ben

Quoted 30 lines
---
  drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/net/wireless/intel/iwlwifi/mvm/tx.c +3 -0
index a983c215df310776ffe67f3b3ffa203eab609bfc..3712adc3ccc2511d46bcc855efbfba41c487d8e6 100644
@@ -773,6 +773,7 @@ iwl_mvm_tx_tso_segment(struct sk_buff *skb, unsigned int num_subframes,
 
  	next = skb_gso_segment(skb, netdev_flags);
  	skb_shinfo(skb)->gso_size = mss;
+	skb_shinfo(skb)->gso_type = ipv4 ? SKB_GSO_TCPV4 : SKB_GSO_TCPV6;
  	if (WARN_ON_ONCE(IS_ERR(next)))
  		return -EINVAL;
  	else if (next)
@@ -795,6 +796,8 @@ iwl_mvm_tx_tso_segment(struct sk_buff *skb, unsigned int num_subframes,
 
  		if (tcp_payload_len > mss) {
  			skb_shinfo(tmp)->gso_size = mss;
+			skb_shinfo(tmp)->gso_type = ipv4 ? SKB_GSO_TCPV4 :
+							   SKB_GSO_TCPV6;
  		} else {
  			if (qos) {
  				u8 *qc;
Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#2 lore raw
Quoted 15 lines · Ben Greear
Quoted 5 lines · Eric Dumazet

From: Eric Dumazet <[email protected]>

net/core/tso.c got recent support for USO, and this broke iwlfifi because the driver implemented a limited form of GSO.

Quoted 7 lines

Providing ->gso_type allows for skb_is_gso_tcp() to provide a correct result.

Fixes 3d5b459ba0e3 ("net: tso: add UDP segmentation support")
Quoted 5 lines

I appreciate the credit, but the bisect and some other initial bug hunting was done by people on this thread:

https://bugzilla.kernel.org/show_bug.cgi?id=209913

Well, I do not think bugzilla can display full names/emails ?

maintainer
#3 lore raw
In reply to Eric Dumazet
Quoted 8 lines · On Mon, 25 Jan 2021 07:09:49 -0800 Eric Dumazet wrote:

From: Eric Dumazet <[email protected]>

net/core/tso.c got recent support for USO, and this broke iwlfifi because the driver implemented a limited form of GSO.

Providing ->gso_type allows for skb_is_gso_tcp() to provide a correct result.

Quoted 8 lines
Fixes 3d5b459ba0e3 ("net: tso: add UDP segmentation support")
Cc Luca Coelho <[email protected]>
Cc Johannes Berg <[email protected]>

Johannes, Eric tagged this for net, are you okay with me taking it? No strong preference here.

#4 lore raw
Quoted 18 lines · Jakub Kicinski
Quoted 8 lines · On Mon, 25 Jan 2021 07:09:49 -0800 Eric Dumazet wrote:

From: Eric Dumazet <[email protected]>

net/core/tso.c got recent support for USO, and this broke iwlfifi because the driver implemented a limited form of GSO.

Providing ->gso_type allows for skb_is_gso_tcp() to provide a correct result.

Quoted 8 lines
Fixes 3d5b459ba0e3 ("net: tso: add UDP segmentation support")
Cc Luca Coelho <[email protected]>
Cc Johannes Berg <[email protected]>
Quoted 2 lines

Johannes, Eric tagged this for net, are you okay with me taking it? No strong preference here.

I guess that really would normally go through Luca's and Kalle's trees, but yes, please just take it, it's been long and it won't conflict with anything.

johannes

#5 lore raw
Quoted 19 lines · Johannes Berg
Quoted 18 lines · Jakub Kicinski
Quoted 16 lines · On Mon, 25 Jan 2021 07:09:49 -0800 Eric Dumazet wrote:

From: Eric Dumazet <[email protected]>

net/core/tso.c got recent support for USO, and this broke iwlfifi because the driver implemented a limited form of GSO.

Providing ->gso_type allows for skb_is_gso_tcp() to provide a correct result.

Fixes 3d5b459ba0e3 ("net: tso: add UDP segmentation support")
Cc Luca Coelho <[email protected]>
Cc Johannes Berg <[email protected]>
Quoted 6 lines
Quoted 2 lines

Johannes, Eric tagged this for net, are you okay with me taking it? No strong preference here.

I guess that really would normally go through Luca's and Kalle's trees, but yes, please just take it, it's been long and it won't conflict with anything.

Yes, that's fine by me too. Just take it via net and we'll get it into our trees eventually.

--
Cheers,
Luca.

#6 lore raw
In reply to Eric Dumazet
This patch was applied to netdev/net.git (refs/heads/master):

Hello:

This patch was applied to netdev/net.git (refs/heads/master):

Quoted 9 lines · On Mon, 25 Jan 2021 07:09:49 -0800 you wrote:

From: Eric Dumazet <[email protected]>

net/core/tso.c got recent support for USO, and this broke iwlfifi because the driver implemented a limited form of GSO.

Providing ->gso_type allows for skb_is_gso_tcp() to provide a correct result.

[...]

Here is the summary with links:
- [net] iwlwifi: provide gso_type to GSO packets

    https://git.kernel.org/netdev/net/c/81a86e1bd8e7

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html