Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5700121ybc; Wed, 27 Nov 2019 08:07:45 -0800 (PST) X-Google-Smtp-Source: APXvYqxHLwJ/zu/addsRdV0QYFNFpwwgcceh/AFx5EBfMbinaz9LY3aU2P02SwdsJMKIyeFPyHYk X-Received: by 2002:a1c:6405:: with SMTP id y5mr5447290wmb.175.1574870865159; Wed, 27 Nov 2019 08:07:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574870865; cv=none; d=google.com; s=arc-20160816; b=QkXDxY8fvMjk8DLZmPQkSFhqmMoSkXRG+APqDigZwyKXWT33AxorZYs3IvBq7Rk4iw oqGJDW+XJluxiPzjrJHQEzW7laWMRv1r7lFieeP2X0IQAD20I6dbzeqnBXYUKIDD1KIM KNkPifybLGBf3EylCHH1uy1c6sPJYr/zctwp3P0fIjGFmUDRZDCI2TKMFrc/IiZlEcD9 qzN5rml4rVo2+NTq99vW29igVvV4kQvcLr8FA3G3LFg4VmwUoUgC4BJiKwAJnGQzrmyW W73dXD00q977XEpC3dsSqBaBO2n+RWE7YRJnLdAARFHTqNPuU8DItDoeufXmX4nhmRz4 25OA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=01GTAHVsQk9EbZg1oQ0m4o33MHFqegd+6nVN0Si7vq4=; b=fgxG08nxBOuSlJVUeBp1fJ7fZMJ1bHPOrnVzwwSYcqQTwcLTE8YNiRt8Xhkk+epMiG ZXO/WJ5banP4AoNKN3JlWBn9iQ4PC+fpFOLcCmaamn9gmQmP8u8PSodvCvDs69JurqYZ 1jAgFFB1tsKLb3AZLNGYn/VxHqELVJfP4t1EStvN+QBX7OJU8JY/Tlmo9PTD+3yDKg4G sOMiqnzrav8Qh64vJZSTv4m8gIgo16z7nmFoEL6eBnknyib97DkarguEhrmwovziuHK/ aCveFrMm6Wz5wofsDA6Odf4WPIqXv8TxIfWBOdj2Wv9ssl6Gx++HOSRBdsgofx3DzmGJ 2cRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cz21si4221310edb.185.2019.11.27.08.06.59; Wed, 27 Nov 2019 08:07:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727125AbfK0QFg (ORCPT + 99 others); Wed, 27 Nov 2019 11:05:36 -0500 Received: from dispatch1-us1.ppe-hosted.com ([67.231.154.164]:55650 "EHLO dispatch1-us1.ppe-hosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726603AbfK0QFg (ORCPT ); Wed, 27 Nov 2019 11:05:36 -0500 X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us4.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id DC4ED140091; Wed, 27 Nov 2019 16:05:33 +0000 (UTC) Received: from [10.17.20.203] (10.17.20.203) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 27 Nov 2019 16:05:22 +0000 Subject: Re: [PATCH net] net: wireless: intel: iwlwifi: fix GRO_NORMAL packet stalling To: Alexander Lobakin , "David S. Miller" CC: Jiri Pirko , Eric Dumazet , "Ido Schimmel" , Paolo Abeni , Petr Machata , Sabrina Dubroca , Florian Fainelli , Jassi Brar , "Manish Chopra" , , Johannes Berg , Emmanuel Grumbach , Luca Coelho , Intel Linux Wireless , Kalle Valo , Nicholas Johnson , "Kenneth R. Crudup" , , , References: <20191127094123.18161-1-alobakin@dlink.ru> From: Edward Cree Message-ID: <20a018a6-827a-de47-a0e4-45ff8c02087b@solarflare.com> Date: Wed, 27 Nov 2019 16:05:18 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20191127094123.18161-1-alobakin@dlink.ru> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Originating-IP: [10.17.20.203] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-25068.003 X-TM-AS-Result: No-2.916000-8.000000-10 X-TMASE-MatchedRID: 1GZI+iG+MtfmLzc6AOD8DfHkpkyUphL9B7lMZ4YsZk/RLEyE6G4DRFDT Kayi2ZF6QOaAfcvrs35HBaYvF0hxKFQcsas26nLQLyz9QvAyHjo0AJe3B5qfBgQsw9A3PIlLfeR HqXTAYgbUqkiO26feqA2FRXLSS+vrmKa4M58UVVYBnSWdyp4eoXFa/hQHt1A1wubD3SFbWzv3h2 jybQkTkqdL8KI7XN648dZ5VcPdHTpyPzMTUSO1JP5/gVn+bUDMNV9S7O+u3KYZwGrh4y4izH1a0 2rGxHiJ31rPPTNFvISK2jE700vQHbp4BGlNqtR8LbjXqdzdtCXrixWWWJYrH01+zyfzlN7ygxsf zkNRlfKx5amWK2anSPoLR4+zsDTt+GYUedkXNWqMK5Qm/U0G90/h8PPR9Wyqvd+6IqaLHYtW8qO kPe265is7C65Y7GDJDGmw3Q+A1RzSS97R9sl6CenrP6nUgUSzU7PqY3kOZ2mHzGTHoCwyHhlNKS p2rPkW5wiX7RWZGYs2CWDRVNNHuzflzkGcoK72 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--2.916000-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-25068.003 X-MDID: 1574870734-9g_yLSIuo-Lh Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 27/11/2019 09:41, Alexander Lobakin wrote: > Commit 6570bc79c0df ("net: core: use listified Rx for GRO_NORMAL in > napi_gro_receive()") has applied batched GRO_NORMAL packets processing > to all napi_gro_receive() users, including mac80211-based drivers. > > However, this change has led to a regression in iwlwifi driver [1][2] as > it is required for NAPI users to call napi_complete_done() or > napi_complete() and the end of every polling iteration, whilst iwlwifi > doesn't use NAPI scheduling at all and just calls napi_gro_flush(). > In that particular case, packets which have not been already flushed > from napi->rx_list stall in it until at least next Rx cycle. > > Fix this by adding a manual flushing of the list to iwlwifi driver right > before napi_gro_flush() call to mimic napi_complete() logics. > > I prefer to open-code gro_normal_list() rather than exporting it for 2 > reasons: > * to prevent from using it and napi_gro_flush() in any new drivers, > as it is the *really* bad way to use NAPI that should be avoided; > * to keep gro_normal_list() static and don't lose any CC optimizations. > > I also don't add the "Fixes:" tag as the mentioned commit was only a > trigger that only exposed an improper usage of NAPI in this particular > driver. > > [1] https://lore.kernel.org/netdev/PSXP216MB04388962C411CD0B17A86F47804A0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM > [2] https://bugzilla.kernel.org/show_bug.cgi?id=205647 > > Signed-off-by: Alexander Lobakin Reviewed-by: Edward Cree