From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Alexander Lobakin <alobakin@dlink.ru>
Cc: "David S. Miller" <davem@davemloft.net>,
Edward Cree <ecree@solarflare.com>,
Jiri Pirko <jiri@mellanox.com>,
Eric Dumazet <edumazet@google.com>,
Ido Schimmel <idosch@mellanox.com>,
Paolo Abeni <pabeni@redhat.com>,
Petr Machata <petrm@mellanox.com>,
Sabrina Dubroca <sd@queasysnail.net>,
Florian Fainelli <f.fainelli@gmail.com>,
Jassi Brar <jaswinder.singh@linaro.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 net-next] net: core: use listified Rx for GRO_NORMAL in napi_gro_receive()
Date: Wed, 24 Jun 2020 15:28:02 -0600 [thread overview]
Message-ID: <20200624212802.GA1386764@zx2c4.com> (raw)
In-Reply-To: <20200624210606.GA1362687@zx2c4.com>
On Wed, Jun 24, 2020 at 03:06:10PM -0600, Jason A. Donenfeld wrote:
> Hi Alexander,
>
> This patch introduced a behavior change around GRO_DROP:
>
> napi_skb_finish used to sometimes return GRO_DROP:
>
> > -static gro_result_t napi_skb_finish(gro_result_t ret, struct sk_buff *skb)
> > +static gro_result_t napi_skb_finish(struct napi_struct *napi,
> > + struct sk_buff *skb,
> > + gro_result_t ret)
> > {
> > switch (ret) {
> > case GRO_NORMAL:
> > - if (netif_receive_skb_internal(skb))
> > - ret = GRO_DROP;
> > + gro_normal_one(napi, skb);
> >
>
> But under your change, gro_normal_one and the various calls that makes
> never propagates its return value, and so GRO_DROP is never returned to
> the caller, even if something drops it.
>
> Was this intentional? Or should I start looking into how to restore it?
>
> Thanks,
> Jason
For some context, I'm consequently mulling over this change in my code,
since checking for GRO_DROP now constitutes dead code:
diff --git a/drivers/net/wireguard/receive.c b/drivers/net/wireguard/receive.c
index 91438144e4f7..9b2ab6fc91cd 100644
--- a/drivers/net/wireguard/receive.c
+++ b/drivers/net/wireguard/receive.c
@@ -414,14 +414,8 @@ static void wg_packet_consume_data_done(struct wg_peer *peer,
if (unlikely(routed_peer != peer))
goto dishonest_packet_peer;
- if (unlikely(napi_gro_receive(&peer->napi, skb) == GRO_DROP)) {
- ++dev->stats.rx_dropped;
- net_dbg_ratelimited("%s: Failed to give packet to userspace from peer %llu (%pISpfsc)\n",
- dev->name, peer->internal_id,
- &peer->endpoint.addr);
- } else {
- update_rx_stats(peer, message_data_len(len_before_trim));
- }
+ napi_gro_receive(&peer->napi, skb);
+ update_rx_stats(peer, message_data_len(len_before_trim));
return;
dishonest_packet_peer:
next prev parent reply other threads:[~2020-06-24 21:28 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-14 8:00 [PATCH v2 net-next] net: core: use listified Rx for GRO_NORMAL in napi_gro_receive() Alexander Lobakin
2019-10-16 1:16 ` David Miller
2019-10-16 7:31 ` Alexander Lobakin
2019-11-25 7:29 ` Nicholas Johnson
2019-11-25 7:54 ` Alexander Lobakin
2019-11-25 8:25 ` 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
2020-06-24 21:06 ` Jason A. Donenfeld
2020-06-24 21:28 ` Jason A. Donenfeld [this message]
2020-06-25 14:25 ` Edward Cree
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=20200624212802.GA1386764@zx2c4.com \
--to=jason@zx2c4.com \
--cc=alobakin@dlink.ru \
--cc=davem@davemloft.net \
--cc=ecree@solarflare.com \
--cc=edumazet@google.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=linux-kernel@vger.kernel.org \
--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).