[PATCH net] iwlwifi: provide gso_type to GSO packets

Subsystems: intel wireless wifi link (iwlwifi), the rest

STALE2051d LANDED: 1 (0M)

1 review trailer; landed in mainline as 81a86e1bd8e7 on 2021-01-26.

7 messages, 7 authors, 2021-01-27 · open the first message on its own page

[PATCH net] iwlwifi: provide gso_type to GSO packets

From: Eric Dumazet <hidden>
Date: 2021-01-26 05:21:18

From: Eric Dumazet <edumazet@google.com>

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")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Ben Greear <redacted>
Bisected-by: Ben Greear [off-list ref]
Tested-by: Ben Greear <redacted>
Cc: Luca Coelho <redacted>
Cc: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>
---
 drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index a983c215df310776ffe67f3b3ffa203eab609bfc..3712adc3ccc2511d46bcc855efbfba41c487d8e6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -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;
-- 
2.30.0.280.ga3ce27912f-goog

Re: [PATCH net] iwlwifi: provide gso_type to GSO packets

From: Eric Dumazet <edumazet@google.com>
Date: 2021-01-25 15:37:55

On Mon, Jan 25, 2021 at 4:15 PM Ben Greear [off-list ref] wrote:
On 1/25/21 7:09 AM, Eric Dumazet wrote:
quoted
From: Eric Dumazet <edumazet@google.com>

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")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Ben Greear <redacted>
Bisected-by: Ben Greear [off-list ref]
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 ?

Re: [PATCH net] iwlwifi: provide gso_type to GSO packets

From: Ben Greear <hidden>
Date: 2021-01-25 15:39:25

On 1/25/21 7:09 AM, Eric Dumazet wrote:
From: Eric Dumazet <edumazet@google.com>

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")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Ben Greear <redacted>
Bisected-by: Ben Greear [off-list ref]
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 hunk
Tested-by: Ben Greear <redacted>
Cc: Luca Coelho <redacted>
Cc: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>
---
  drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +++
  1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
index a983c215df310776ffe67f3b3ffa203eab609bfc..3712adc3ccc2511d46bcc855efbfba41c487d8e6 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c
@@ -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;

-- 
Ben Greear [off-list ref]
Candela Technologies Inc  http://www.candelatech.com

Re: [PATCH net] iwlwifi: provide gso_type to GSO packets

From: Jakub Kicinski <kuba@kernel.org>
Date: 2021-01-26 23:17:31

On Mon, 25 Jan 2021 07:09:49 -0800 Eric Dumazet wrote:
From: Eric Dumazet <edumazet@google.com>

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")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Ben Greear <redacted>
Bisected-by: Ben Greear [off-list ref]
Tested-by: Ben Greear <redacted>
Cc: Luca Coelho <redacted>
Cc: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>
Johannes, Eric tagged this for net, are you okay with me taking it?
No strong preference here.

Re: [PATCH net] iwlwifi: provide gso_type to GSO packets

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-01-27 05:01:23

Hello:

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

On Mon, 25 Jan 2021 07:09:49 -0800 you wrote:
From: Eric Dumazet <edumazet@google.com>

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

Re: [PATCH net] iwlwifi: provide gso_type to GSO packets

From: Coelho, Luciano <hidden>
Date: 2021-01-27 06:20:53

On Tue, 2021-01-26 at 21:55 +0100, Johannes Berg wrote:
On Tue, 2021-01-26 at 12:32 -0800, Jakub Kicinski wrote:
quoted
On Mon, 25 Jan 2021 07:09:49 -0800 Eric Dumazet wrote:
quoted
From: Eric Dumazet <edumazet@google.com>

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")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Ben Greear <redacted>
Bisected-by: Ben Greear [off-list ref]
Tested-by: Ben Greear <redacted>
Cc: Luca Coelho <redacted>
Cc: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>
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.

Re: [PATCH net] iwlwifi: provide gso_type to GSO packets

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2021-01-27 08:39:23

On Tue, 2021-01-26 at 12:32 -0800, Jakub Kicinski wrote:
On Mon, 25 Jan 2021 07:09:49 -0800 Eric Dumazet wrote:
quoted
From: Eric Dumazet <edumazet@google.com>

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")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Ben Greear <redacted>
Bisected-by: Ben Greear [off-list ref]
Tested-by: Ben Greear <redacted>
Cc: Luca Coelho <redacted>
Cc: linux-wireless@vger.kernel.org
Cc: Johannes Berg <johannes@sipsolutions.net>
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help