linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Johnson <nicholas.johnson-opensource@outlook.com.au>
To: Edward Cree <ecree@solarflare.com>
Cc: Alexander Lobakin <alobakin@dlink.ru>,
	David Miller <davem@davemloft.net>,
	"jiri@mellanox.com" <jiri@mellanox.com>,
	"edumazet@google.com" <edumazet@google.com>,
	"idosch@mellanox.com" <idosch@mellanox.com>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"petrm@mellanox.com" <petrm@mellanox.com>,
	"sd@queasysnail.net" <sd@queasysnail.net>,
	"f.fainelli@gmail.com" <f.fainelli@gmail.com>,
	"jaswinder.singh@linaro.org" <jaswinder.singh@linaro.org>,
	"ilias.apalodimas@linaro.org" <ilias.apalodimas@linaro.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"johannes.berg@intel.com" <johannes.berg@intel.com>,
	"emmanuel.grumbach@intel.com" <emmanuel.grumbach@intel.com>,
	"luciano.coelho@intel.com" <luciano.coelho@intel.com>,
	"linuxwifi@intel.com" <linuxwifi@intel.com>,
	"kvalo@codeaurora.org" <kvalo@codeaurora.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-wireless@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()
Date: Mon, 25 Nov 2019 13:11:18 +0000	[thread overview]
Message-ID: <PSXP216MB0438DBC8CF65DCA2DD0E3441804A0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <cc08834c-ccb3-263a-2967-f72a9d72535a@solarflare.com>

On Mon, Nov 25, 2019 at 10:31:12AM +0000, Edward Cree wrote:
> On 25/11/2019 09:09, Nicholas Johnson wrote:
> > The default value of /proc/sys/net/core/gro_normal_batch was 8.
> > Setting it to 1 allowed it to connect to Wi-Fi network.
> >
> > Setting it back to 8 did not kill the connection.
> >
> > But when I disconnected and tried to reconnect, it did not re-connect.
> >
> > Hence, it appears that the problem only affects the initial handshake 
> > when associating with a network, and not normal packet flow.
> That sounds like the GRO batch isn't getting flushed at the endof the
>  NAPI — maybe the driver isn't calling napi_complete_done() at the
>  appropriate time?
> Indeed, from digging through the layers of iwlwifi I eventually get to
>  iwl_pcie_rx_handle() which doesn't really have a NAPI poll (the
>  napi->poll function is iwl_pcie_dummy_napi_poll() { WARN_ON(1);
>  return 0; }) and instead calls napi_gro_flush() at the end of its RX
>  handling.  Unfortunately, napi_gro_flush() is no longer enough,
>  because it doesn't call gro_normal_list() so the packets on the
>  GRO_NORMAL list just sit there indefinitely.
> 
> It was seeing drivers calling napi_gro_flush() directly that had me
>  worried in the first place about whether listifying napi_gro_receive()
>  was safe and where the gro_normal_list() should go.
> I wondered if other drivers that show up in [1] needed fixing with a
>  gro_normal_list() next to their napi_gro_flush() call.  From a cursory
>  check:
> brocade/bna: has a real poller, calls napi_complete_done() so is OK.
> cortina/gemini: calls napi_complete_done() straight after
>  napi_gro_flush(), so is OK.
> hisilicon/hns3: calls napi_complete(), so is _probably_ OK.
> But it's far from clear to me why *any* of those drivers are calling
>  napi_gro_flush() themselves...
Pardon my lack of understanding, but is it unusual that something that 
the drivers should not be calling be exposed to the drivers? Could it be 
hidden from the drivers so that it is out of scope, once the current 
drivers are modified to not use it?

> 
> -Ed
> 
> [1]: https://elixir.bootlin.com/linux/latest/ident/napi_gro_flush
Kind regards,
Nicholas

      parent reply	other threads:[~2019-11-25 13:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191014080033.12407-1-alobakin@dlink.ru>
     [not found] ` <20191015.181649.949805234862708186.davem@davemloft.net>
     [not found]   ` <7e68da00d7c129a8ce290229743beb3d@dlink.ru>
     [not found]     ` <PSXP216MB04388962C411CD0B17A86F47804A0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM>
     [not found]       ` <c762f5eee08a8f2d0d6cb927d7fa3848@dlink.ru>
2019-11-25  8:25         ` [PATCH v2 net-next] net: core: use listified Rx for GRO_NORMAL in napi_gro_receive() Alexander Lobakin
2019-11-25  9:09           ` Nicholas Johnson
2019-11-25 10:31             ` Edward Cree
2019-11-25 10:58               ` Alexander Lobakin
2019-11-25 11:05                 ` Johannes Berg
2019-11-25 11:42                   ` Paolo Abeni
2019-11-25 12:02                     ` Alexander Lobakin
2019-11-25 13:21                       ` Edward Cree
2019-11-25 13:39                         ` Alexander Lobakin
2019-11-26 23:57                       ` David Miller
2019-11-27  7:47                         ` Alexander Lobakin
2019-11-27  8:30                           ` Johannes Berg
2019-11-27  9:47                         ` Alexander Lobakin
2019-11-25 12:11                     ` Kalle Valo
2019-11-25 13:07                     ` Nicholas Johnson
2019-11-25 13:11               ` Nicholas Johnson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PSXP216MB0438DBC8CF65DCA2DD0E3441804A0@PSXP216MB0438.KORP216.PROD.OUTLOOK.COM \
    --to=nicholas.johnson-opensource@outlook.com.au \
    --cc=alobakin@dlink.ru \
    --cc=davem@davemloft.net \
    --cc=ecree@solarflare.com \
    --cc=edumazet@google.com \
    --cc=emmanuel.grumbach@intel.com \
    --cc=f.fainelli@gmail.com \
    --cc=idosch@mellanox.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jaswinder.singh@linaro.org \
    --cc=jiri@mellanox.com \
    --cc=johannes.berg@intel.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linuxwifi@intel.com \
    --cc=luciano.coelho@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@mellanox.com \
    --cc=sd@queasysnail.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).