Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2875265ybc; Mon, 25 Nov 2019 05:41:01 -0800 (PST) X-Google-Smtp-Source: APXvYqw9NXQkRvSBfjTwCHEua9zkfAr7y6jid0fUGP/PWOcW+GKhUVEOffhelM3jttpIYxxa9LLV X-Received: by 2002:a50:b6f8:: with SMTP id f53mr18569349ede.29.1574689261068; Mon, 25 Nov 2019 05:41:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574689261; cv=none; d=google.com; s=arc-20160816; b=t5Xc145sUc+RHpLdthR+F6xD16SvmMXqPZZX6lY5Dne2mWgKOZa9STbVdROOORI0Ng 9N+93M44xViQ1XZMXmFLHv/i0+E0N/f+4UswRVnhgbXvYT6IhUfRG+ceY4i9HniuHRgd rBK7YW9YXvEwZjgr/IF/yVuGmPwC0kOzl3x/3BwzdU2PY+cIyNrIl0G1lkPebtAmc+Z4 BWsrjgxQIELmOf4JSEbQkN9Ak1RvaxfN4Ni4XSqosTv5zovzlgfPNbDTtfkFGXTJ6bLw 0199U0KNSG3Zra4MosdUzIoTyLBOZOulWs0e/QQL2qXAoKCcePKZE4A3OwCJnG5eJmPb BLcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:user-agent:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-filter:dkim-signature:dkim-filter; bh=mUx+/0bX0CiB4xSiEyVtzLFAJqKDHPBseAUT4sDjloA=; b=CMro2RUCIAUbLTTC8ulgdT/qCjoRSDf/c8dC5+pVWyW89w/i/yOx1LMf+7DdUZp22e OyDxvBt0AlTxtUUx1Tmg2e5ELprLk04xzqHEI3zmCDpHBGaG8XMAE29i6EDxLHVkB29R Ps3/YK0bW9djdsWYO5nF1VaNLVN7FkSO+50zYvdlU6eG49Zg1PopmX5y+LJKSs82Q5yr mcXYKnL0TVPz6WZvrsURRviZfbNCkAS7qcmz1UStR76VizbbnXfZu5du88Ehp3yIAsZa UKcN5CFbEjfPegg5KkWJvQ38WdZ9dfrJvb6l+rvtiDGj+HXywyMmwxB9VGDzdOTchT7Q JO3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dlink.ru header.s=mail header.b=D2hCanD0; 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 h18si4510171ejc.16.2019.11.25.05.40.30; Mon, 25 Nov 2019 05:41:01 -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; dkim=pass header.i=@dlink.ru header.s=mail header.b=D2hCanD0; 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 S1727655AbfKYNkJ (ORCPT + 99 others); Mon, 25 Nov 2019 08:40:09 -0500 Received: from mail.dlink.ru ([178.170.168.18]:40630 "EHLO fd.dlink.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725862AbfKYNkJ (ORCPT ); Mon, 25 Nov 2019 08:40:09 -0500 Received: by fd.dlink.ru (Postfix, from userid 5000) id A43BC1B20153; Mon, 25 Nov 2019 16:40:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 fd.dlink.ru A43BC1B20153 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dlink.ru; s=mail; t=1574689206; bh=mUx+/0bX0CiB4xSiEyVtzLFAJqKDHPBseAUT4sDjloA=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=D2hCanD0o5oUPnfhsQ3ZHwy0xXwoz5aiGYNnjjXtNWlahFdhyRsW9wl7cjlV1T0pK 5Fzg9etkRMRJ/zWlGSMFIgUgUCXEpJLBpX46OIqqmilwhIbaU1hZpoWb4oFcuW1dtc GdUX53MVAuqlVoLIIiWZnpKLGZDgBaI1gICUk7fo= X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.dlink.ru X-Spam-Level: X-Spam-Status: No, score=-99.2 required=7.5 tests=BAYES_50,USER_IN_WHITELIST autolearn=disabled version=3.4.2 Received: from mail.rzn.dlink.ru (mail.rzn.dlink.ru [178.170.168.13]) by fd.dlink.ru (Postfix) with ESMTP id D57261B207E1; Mon, 25 Nov 2019 16:39:55 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 fd.dlink.ru D57261B207E1 Received: from mail.rzn.dlink.ru (localhost [127.0.0.1]) by mail.rzn.dlink.ru (Postfix) with ESMTP id 8D89F1B22662; Mon, 25 Nov 2019 16:39:55 +0300 (MSK) Received: from mail.rzn.dlink.ru (localhost [127.0.0.1]) by mail.rzn.dlink.ru (Postfix) with ESMTPA; Mon, 25 Nov 2019 16:39:55 +0300 (MSK) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Mon, 25 Nov 2019 16:39:55 +0300 From: Alexander Lobakin To: Edward Cree Cc: Paolo Abeni , Johannes Berg , Nicholas Johnson , David Miller , jiri@mellanox.com, edumazet@google.com, idosch@mellanox.com, petrm@mellanox.com, sd@queasysnail.net, f.fainelli@gmail.com, jaswinder.singh@linaro.org, ilias.apalodimas@linaro.org, linux-kernel@vger.kernel.org, emmanuel.grumbach@intel.com, luciano.coelho@intel.com, linuxwifi@intel.com, kvalo@codeaurora.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org Subject: Re: [PATCH v2 net-next] net: core: use listified Rx for GRO_NORMAL in napi_gro_receive() In-Reply-To: References: <20191014080033.12407-1-alobakin@dlink.ru> <20191015.181649.949805234862708186.davem@davemloft.net> <7e68da00d7c129a8ce290229743beb3d@dlink.ru> <746f768684f266e5a5db1faf8314cd77@dlink.ru> <3147bff57d58fce651fe2d3ca53983be@dlink.ru> <414288fcac2ba4fcee48a63bdbf28f7b9a5037c6.camel@sipsolutions.net> User-Agent: Roundcube Webmail/1.4.0 Message-ID: <6ff190a3b00aae0a9b9388f60791528a@dlink.ru> X-Sender: alobakin@dlink.ru Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Edward Cree wrote 25.11.2019 16:21: > On 25/11/2019 12:02, Alexander Lobakin wrote: >> I'm not very familiar with iwlwifi, but as a work around manual >> napi_gro_flush() you can also manually flush napi->rx_list to >> prevent packets from stalling: >> >> diff -Naur a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c >> b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c >> --- a/drivers/net/wireless/intel/iwlwifi/pcie/rx.c    2019-11-25 >> 14:55:03.610355230 +0300 >> +++ b/drivers/net/wireless/intel/iwlwifi/pcie/rx.c    2019-11-25 >> 14:57:29.399556868 +0300 >> @@ -1526,8 +1526,16 @@ >>      if (unlikely(emergency && count)) >>          iwl_pcie_rxq_alloc_rbs(trans, GFP_ATOMIC, rxq); >> >> -    if (rxq->napi.poll) >> +    if (rxq->napi.poll) { >> +        if (rxq->napi.rx_count) { >> +            netif_receive_skb_list(&rxq->napi.rx_list); >> + >> +            INIT_LIST_HEAD(&rxq->napi.rx_list); >> +            rxq->napi.rx_count = 0; >> +        } >> + >>          napi_gro_flush(&rxq->napi, false); >> +    } >> >>      iwl_pcie_rxq_restock(trans, rxq); >>  } > ... or we could export gro_normal_list(), instead of open-coding it >  in the driver? I thought about this too, but don't like it. This patch is proposed as a *very* temporary solution until iwlwifi will get more straightforward logic. I wish we could make napi_gro_flush() static in the future and keep gro_normal_list() private to: - prevent them from using in any new drivers; - give more opportunity to CC to optimize the core code. > > -Ed Regards, ᚷ ᛖ ᚢ ᚦ ᚠ ᚱ