Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp5309569ybc; Wed, 27 Nov 2019 01:59:39 -0800 (PST) X-Google-Smtp-Source: APXvYqwfhjOLOHeyJT8unmxWkn1w+sHSpXnAHzc1fgKd8AJthHSLUqdh8brZmU7hZHCHfwZAbfv4 X-Received: by 2002:a50:b626:: with SMTP id b35mr30875615ede.183.1574848779228; Wed, 27 Nov 2019 01:59:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574848779; cv=none; d=google.com; s=arc-20160816; b=BF/ABwwy02CKtWMd1WmZ0yYoOFX8jkRrgH8BfX+YTAGS8CSedLxuV3hqECIQrBAN1/ nqLeYQvjcK33psnvS1ZWp3t4qeycumN545O6uAo5VcoEGFYmGUW+FaTcEk2aw6LZ4L9z i87JVuK9TIsLw23yeFE0438RTRydzUv6UcSr6jQOsgZh+ECC+o14eMer/4t0bOHoypAt ucsVRhelkx2OHJISrJL242e619NUlxEWA6GiimtPzYzEcLItEamK6kU+/pyIUAX8yMoS +mrKYDMD+fLO6Byzd3q6f3nihshwzxyZlWEAJQx5zxCSfyGkUQwl+7OHsZxZ4S+n+OUG KjZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=hx9Cb8/N7nKvffeZ0RSc0IF80kzoOXaeitzxSOIHvW0=; b=UCkbTDky19L9oTKTjAbovj86rmQBZ+hO9xCzDg54l5ttD8Kd46pRjcImESL2YQ2pYa /myy0lMFOYhhzq+PXPd5XavfUPin881vQiw6vfb6xOpyLZwpAYHUKnmdcPS9xgRpxeuZ PEwiKAtybQ6MmV3xCMpFo/nq24UFDAB0TGmLHl0ERATXAgKi3OkuUwi2RWRilBEusdS1 cLLB+OhSHFVZDBPpBC/T03S0pvjSO7KpYOPYd0e5622HGgAJBFzZbdmCYw8cH1bpvjK6 MZgQfy+oImEA+JiRwjM6qahTINcpdest6VTRCMS+3Hgl0dWGZjlCAOKDtdBDAJHlzwWX isYA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t12si9083821ejr.6.2019.11.27.01.59.12; Wed, 27 Nov 2019 01:59:39 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726515AbfK0J6l (ORCPT + 99 others); Wed, 27 Nov 2019 04:58:41 -0500 Received: from mga18.intel.com ([134.134.136.126]:44617 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726227AbfK0J6k (ORCPT ); Wed, 27 Nov 2019 04:58:40 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Nov 2019 01:58:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,249,1571727600"; d="scan'208";a="206849762" Received: from slehanex-mobl1.ger.corp.intel.com ([10.252.10.177]) by fmsmga007.fm.intel.com with ESMTP; 27 Nov 2019 01:58:34 -0800 Message-ID: <7a9332bf645fbb8c9fff634a3640c092fb9b4b79.camel@intel.com> Subject: Re: [PATCH net] net: wireless: intel: iwlwifi: fix GRO_NORMAL packet stalling From: Luciano Coelho To: Alexander Lobakin , "David S. Miller" Cc: Edward Cree , Jiri Pirko , Eric Dumazet , Ido Schimmel , Paolo Abeni , Petr Machata , Sabrina Dubroca , Florian Fainelli , Jassi Brar , Manish Chopra , GR-Linux-NIC-Dev@marvell.com, Johannes Berg , Emmanuel Grumbach , Intel Linux Wireless , Kalle Valo , Nicholas Johnson , "Kenneth R. Crudup" , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 27 Nov 2019 11:58:33 +0200 In-Reply-To: <20191127094123.18161-1-alobakin@dlink.ru> References: <20191127094123.18161-1-alobakin@dlink.ru> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.1-2+b1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, 2019-11-27 at 12:41 +0300, 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 > --- We don't usually use "net: wireless: intel:" in the commit message, we would use "iwlwifi: pcie:", but I don't care much. Otherwise: Acked-by: Luca Coelho Thanks a lot for the fix! Dave, I'm assuming you'll take this directly into your tree, right? -- Cheers, Luca.