Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4386531pxu; Mon, 21 Dec 2020 11:06:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxSUNdBDEqarSoUEkzJhILAreMLc6KtGZ42JL3szsGQZU7ePJeF81Q66XhSq0FOJDRoR0xl X-Received: by 2002:a17:906:e206:: with SMTP id gf6mr16695912ejb.342.1608577568266; Mon, 21 Dec 2020 11:06:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608577568; cv=none; d=google.com; s=arc-20160816; b=qK0DCI+PZ7VJmARUuaBmuIjnv34uNv31aZhlOGH82ukDjhWvUUoLWkmp8CNj3Q6gdB JzwCqO6maRvQpVZ4Wde/4VH2CFQS3wX5uoMavGLL4Tx4DW8NyUvwoxz7BW9in7mm9i+B GrrF7M3TfuSFbrno+v4sFABI+2xGZVV6dqmjUYgmvtKQTLBhs7hJh1VjTO+edxgoGvsU 8PpNuMxweFRDm+E5FcYg8zE2XZZDZpKh3QFy4ToY0IEqAn5EX44QmFy/tHOamZk3adZ5 TFSo+LjaXkwu9HynO5CuK/MXam1G2P08WlZXQ3/GOoQJ9GZUqbgTVV2vfIU5LPzFpnZn raKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=a513lA5SUoa7OXcTB3TXXpFwiBi1ACqz+Ol2gR+F+L0=; b=xIFtW3A3v8zoq7NqWbUFJ9kbtmtAXQb47+6YfpAH0qSu+rl4DWpvh7AAN6Eq40yIs9 5SXo/EIYtTu2K9cVogWSxyv9G9Sl+kAASr/uiBpoHLO3z/XAz1VSl5u3P07WYk/vEkuB i1q7muxd6aahN5T3mW4WOS+fSMO309nHJ2BC+DdeVL2+RJwfuJm5kgS8sZeYDbq7WoZz V24DH9sJdXeCqVaoa9aINoxPLag8gq1wzofZ5eDRMNPw0JIEWSQxmc6OgTfEUhSwh1YS SiLH6ofqP6aNzBX+MwYSAUcWbhZfeYjoarmuvWWU5nbcYb1Uq7N4T6pRmieSkhYHj5P7 vC/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nSYzDaOF; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x8si13907153edl.539.2020.12.21.11.05.44; Mon, 21 Dec 2020 11:06:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=nSYzDaOF; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726123AbgLUTFj (ORCPT + 99 others); Mon, 21 Dec 2020 14:05:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbgLUTFi (ORCPT ); Mon, 21 Dec 2020 14:05:38 -0500 Received: from mail-io1-xd33.google.com (mail-io1-xd33.google.com [IPv6:2607:f8b0:4864:20::d33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 931DBC0613D3 for ; Mon, 21 Dec 2020 11:04:58 -0800 (PST) Received: by mail-io1-xd33.google.com with SMTP id d9so9786995iob.6 for ; Mon, 21 Dec 2020 11:04:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=a513lA5SUoa7OXcTB3TXXpFwiBi1ACqz+Ol2gR+F+L0=; b=nSYzDaOF7yEiSrCNqgJdenkMV4YLb/piRTxNl82CgG7cy3leMU0dw0hBWkilijqsIB lio/mn6QJ47z7M8UNb2l/UliwR3ykaOZSijIPueedo/SrYuVATCURLaJ7FiFYu+bUdFz zoZ22KQ/GyEfyyWw3OrK8/49ShMNyM/ti9kn/KLA0wiWseWl8LNKB+X3ON4AKCylZReA ygyJPJlS+6F/zGqpJQB3SLkty2/XcJfBoF3zkbg251gjdabS1cGvRfzgtS6fk276F2ax puWED4h21NIhL7ZxbsImEr2f+i+fM0+6F/c55uXUqvQtWfDg2ox8iYUwjDGOz44DlEd3 sO7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=a513lA5SUoa7OXcTB3TXXpFwiBi1ACqz+Ol2gR+F+L0=; b=ThNCiYFJoUa4jnUq71BQ/zQpJx1vh8DEtN+hFu3S4vFSbgrhH4JadrTLH73AerhfQz F6cocKh+NJ/lExdalwn4u2DVwtMsHgMu9ui7HRzPS/DIW2coevXVZFWup93Xb125zx5P eHr+4s4km/1uRMexHDFojhCDAEtx5TFfpW0AamK7ctviEU9iHpCcRTu7JV7IweTPKBZW p1I83DzKOA273MoDMb8S64sBZHRyoq8srKEcTbx3/855/NVBYpxpyyPXX0bdlXD/JOhL gOZ8zd6vKHEDSDpHJJautIQ/6TH9G0JBgH6bNvmSpfW/9KI/dEUcE1PFumfGA0owdJvV SdGw== X-Gm-Message-State: AOAM531E53st8bw9O6qiO2peeiID/S9zHavT54Eowfu+leg7q1LuD/FU YrjKn9ejmkfsmg/7iB0VIOSlgjzk6gc1VsOnmbrqVQ== X-Received: by 2002:a02:e87:: with SMTP id 129mr15857537jae.34.1608577497769; Mon, 21 Dec 2020 11:04:57 -0800 (PST) MIME-Version: 1.0 References: <5664fa0f-aef2-c336-651a-093c9eed23ab@candelatech.com> <765f370d-ce2d-b75a-2dde-87f69ae7c185@candelatech.com> <5d89fd24-f00a-7e70-00ce-83529f13b05e@candelatech.com> <20201218121627.603329b2@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <9003ea3720a03b4bd1b8abf3d8f645563a58f953.camel@sipsolutions.net> <43a5b45c-955a-22d4-2bf9-dbab852dbb5f@candelatech.com> In-Reply-To: From: Eric Dumazet Date: Mon, 21 Dec 2020 20:04:45 +0100 Message-ID: Subject: Re: net: tso: add UDP segmentation support: adds regression for ax200 upload To: Ben Greear , Rainer Suhm Cc: Johannes Berg , Jakub Kicinski , Luca Coelho , netdev , linux-wireless@vger.kernel.org, Willem de Bruijn Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, Dec 21, 2020 at 7:46 PM Eric Dumazet wrote: > > On Sat, Dec 19, 2020 at 5:55 PM Ben Greear wrote: > > > > On 12/19/20 7:18 AM, Johannes Berg wrote: > > > On Fri, 2020-12-18 at 12:16 -0800, Jakub Kicinski wrote: > > >> On Thu, 17 Dec 2020 12:40:26 -0800 Ben Greear wrote: > > >>> On 12/17/20 10:20 AM, Eric Dumazet wrote: > > >>>> On Thu, Dec 17, 2020 at 7:13 PM Ben Greear wrote: > > >>>>> It is the iwlwifi/mvm logic that supports ax200. > > >>>> > > >>>> Let me ask again : > > >>>> > > >>>> I see two different potential call points : > > >>>> > > >>>> drivers/net/wireless/intel/iwlwifi/pcie/tx.c:1529: > > >>>> tso_build_hdr(skb, hdr_page->pos, &tso, data_left, !total_len); > > >>>> drivers/net/wireless/intel/iwlwifi/queue/tx.c:427: > > >>>> tso_build_hdr(skb, hdr_page->pos, &tso, data_left, !total_len); > > >>>> > > >>>> To the best of your knowledge, which one would be used in your case ? > > >>>> > > >>>> Both are horribly complex, I do not want to spend time studying two > > >>>> implementations. > > >>> > > >>> It is the queue/tx.c code that executes on my system, verified with > > >>> printk. > > >> > > >> Not sure why Intel's not on CC here. > > > > > > Heh :) > > > > > > Let's also add linux-wireless. > > > > > >> Luca, is the ax200 TSO performance regression with recent kernel on your > > >> radar? > > > > > > It wasn't on mine for sure, so far. But it's supposed to be Christmas > > > vacation, so haven't checked our bug tracker etc. I see Emmanuel was at > > > least looking at the bug report, but not sure what else happened yet. > > > > Not to bitch and moan too much, but even the most basic of testing would > > have shown this, how can testing be so poor on the ax200 driver? > > > > It even shows up with the out-of-tree ax200 driver. > > > > > Off the top of my head, I don't really see the issue. Does anyone have > > > the ability to capture the frames over the air (e.g. with another AX200 > > > in monitor mode, load the driver with amsdu_size=3 module parameter to > > > properly capture A-MSDUs)? > > > > I can do that at some point, and likely it could be reproduced with an /n or /ac > > AP and those are a lot easier to sniff. > > > > Thanks, > > Ben > > > > > > -- > > Ben Greear > > Candela Technologies Inc http://www.candelatech.com > > It seems the problem comes from some skbs reaching the driver with > gso_type == 0, > meaning skb_is_gso_tcp() is fuzzy. (net/core/tso.c is only one of the > skb_is_gso_tcp() users) > > Local TCP stack should provide either SKB_GSO_TCPV4 or SKB_GSO_TCPV6 > for GSO packets. > > So maybe the issue is coming from traffic coming from a VM through a > tun device or something, > and our handling of GSO_ROBUST / DODGY never cared about setting > SKB_GSO_TCPV4 or SKB_GSO_TCPV6 if not already given by user space ? > > Or a plain bug somewhere, possibly overwriting gso_type with 0 or garbage... Oh well, iwl_mvm_tx_tso_segment() 'builds' a fake gso packet. I suspect this will fix the issue : diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index a983c215df310776ffe67f3b3ffa203eab609bfc..e7ad6367c88de4aff700c630d850760d1d3bf011 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)