From: Edward Cree <ecree.xilinx@gmail.com>
To: John Ousterhout <ouster@cs.stanford.edu>,
Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: GRO: can't force packet up stack immediately?
Date: Fri, 4 Dec 2020 11:20:33 +0000 [thread overview]
Message-ID: <4d5b237b-3439-8242-4d2c-b27f9fcb49ca@gmail.com> (raw)
In-Reply-To: <CAGXJAmwEEnhX5KBvPZmwOKF_0hhVuGfvbXsoGR=+vB8bGge1sQ@mail.gmail.com>
On 03/12/2020 19:52, John Ousterhout wrote:
> Homa uses GRO to collect batches of packets for protocol processing,
> but there are times when it wants to push a batch of packet up through
> the stack immediately (it doesn't want any more packets to be
> processed at NAPI level before pushing the batch up). However, I can't
> see a way to achieve this goal.
It's kinda hacky, but you might be able to call netif_receive_skb_internal()
yourself, and then return ERR_PTR(-EINPROGRESS), so that dev_gro_receive()
returns GRO_CONSUMED.
Of course, you'd need to be careful about out-of-order issues in case
any earlier homa packets were still sitting in the rx_list.
Other than that, I don't think there's currently a way for a protocol
to tell GRO to flush out the whole rx_list (which could be argued to
be a layering violation, anyway). You might potentially be able to
add a flag to struct napi_gro_cb and teach napi_gro_complete() or
gro_normal_one() to check for it, but — we'd only consider adding
something like that with an in-tree user, which your protocol doesn't
appear to be AFAICT.
-ed
next prev parent reply other threads:[~2020-12-04 11:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 19:03 GRO: can't force packet up stack immediately? John Ousterhout
2020-12-03 19:35 ` Eric Dumazet
2020-12-03 19:52 ` John Ousterhout
2020-12-04 11:20 ` Edward Cree [this message]
2020-12-07 5:51 ` John Ousterhout
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=4d5b237b-3439-8242-4d2c-b27f9fcb49ca@gmail.com \
--to=ecree.xilinx@gmail.com \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=ouster@cs.stanford.edu \
/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).