diff mbox series

[net] iwlwifi: provide gso_type to GSO packets

Message ID 20210125150949.619309-1-eric.dumazet@gmail.com (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show
Series [net] iwlwifi: provide gso_type to GSO packets | expand

Commit Message

Eric Dumazet Jan. 25, 2021, 3:09 p.m. UTC
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 <greearb@candelatech.com>
Bisected-by: Ben Greear <greearb@candelatech.com>
Tested-by: Ben Greear <greearb@candelatech.com>
Cc: Luca Coelho <luciano.coelho@intel.com>
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(+)

Comments

Jakub Kicinski Jan. 26, 2021, 8:32 p.m. UTC | #1
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 <greearb@candelatech.com>
> Bisected-by: Ben Greear <greearb@candelatech.com>
> Tested-by: Ben Greear <greearb@candelatech.com>
> Cc: Luca Coelho <luciano.coelho@intel.com>
> 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.
Johannes Berg Jan. 26, 2021, 8:55 p.m. UTC | #2
On Tue, 2021-01-26 at 12:32 -0800, Jakub Kicinski wrote:
> 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 <greearb@candelatech.com>
> > Bisected-by: Ben Greear <greearb@candelatech.com>
> > Tested-by: Ben Greear <greearb@candelatech.com>
> > Cc: Luca Coelho <luciano.coelho@intel.com>
> > 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
patchwork-bot+netdevbpf@kernel.org Jan. 26, 2021, 11:20 p.m. UTC | #3
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
Luca Coelho Jan. 27, 2021, 6:02 a.m. UTC | #4
On Tue, 2021-01-26 at 21:55 +0100, Johannes Berg wrote:
> On Tue, 2021-01-26 at 12:32 -0800, Jakub Kicinski wrote:
> > 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 <greearb@candelatech.com>
> > > Bisected-by: Ben Greear <greearb@candelatech.com>
> > > Tested-by: Ben Greear <greearb@candelatech.com>
> > > Cc: Luca Coelho <luciano.coelho@intel.com>
> > > 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.
diff mbox series

Patch

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;