From: Paolo Abeni <pabeni@redhat.com>
To: Steffen Klassert <steffen.klassert@secunet.com>
Cc: netdev@vger.kernel.org, Willem de Bruijn <willemb@google.com>
Subject: Re: [RFC PATCH v2 00/10] udp: implement GRO support
Date: Tue, 23 Oct 2018 14:22:12 +0200 [thread overview]
Message-ID: <7aecb7871f3e330debdeb81fd8a401ec5692fa81.camel@redhat.com> (raw)
In-Reply-To: <20181023121000.GP3823@gauss3.secunet.de>
Hi,
On Tue, 2018-10-23 at 14:10 +0200, Steffen Klassert wrote:
> On Fri, Oct 19, 2018 at 04:25:10PM +0200, Paolo Abeni wrote:
> > This series implements GRO support for UDP sockets, as the RX counterpart
> > of commit bec1f6f69736 ("udp: generate gso with UDP_SEGMENT").
> > The core functionality is implemented by the second patch, introducing a new
> > sockopt to enable UDP_GRO, while patch 3 implements support for passing the
> > segment size to the user space via a new cmsg.
> > UDP GRO performs a socket lookup for each ingress packets and aggregate datagram
> > directed to UDP GRO enabled sockets with constant l4 tuple.
> >
> > UDP GRO packets can land on non GRO-enabled sockets, e.g. due to iptables NAT
> > rules, and that could potentially confuse existing applications.
> >
> > The solution adopted here is to de-segment the GRO packet before enqueuing
> > as needed. Since we must cope with packet reinsertion after de-segmentation,
> > the relevant code is factored-out in ipv4 and ipv6 specific helpers and exposed
> > to UDP usage.
> >
> > While the current code can probably be improved, this safeguard ,implemented in
> > the patches 4-7, allows future enachements to enable UDP GSO offload on more
> > virtual devices eventually even on forwarded packets.
>
> I was curious what I get with this when doing packet forwarding.
> So I added forwarding support with the patch below (on top of
> your patchset). While the packet processing could work the way
> I do it in this patch, I'm not sure about the way I enable
> UDP GRO on forwarding. Maybe there it a better way than just
> do UDP GRO if forwarding is enabled on the receiving device.
My idea/hope is slightly different: ensure that UDP GRO + UDP input
path + UDP desegmentation on socket enqueue is safe and as fast as
plain UDP input path and then enable UDP GRO without socket lookup, for
each incoming frame (!!!).
If we land on the input path on a non UDP GRO enabled socket, the
packet is de-segment before enqueuing.
Socket lookup would be needed only if tunnels are enabled, to check if
the ingress frame match a tunnel. We will use UDP tunnel GRO in that
case.
> Some quick benchmark numbers with UDP packet forwarding
> (1460 byte packets) through two gateways:
>
> net-next: 16.4 Gbps
>
> net-next + UDP GRO: 20.3 Gbps
uhmmm... what do you think about this speed-up ?
I hoped that without the socket lookup we can get measurably better
figures.
Cheers,
Paolo
next prev parent reply other threads:[~2018-10-23 20:45 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-19 14:25 [RFC PATCH v2 00/10] udp: implement GRO support Paolo Abeni
2018-10-19 14:25 ` [RFC PATCH v2 01/10] udp: implement complete book-keeping for encap_needed Paolo Abeni
2018-10-22 16:06 ` Willem de Bruijn
2018-10-25 13:00 ` Paolo Abeni
2018-10-19 14:25 ` [RFC PATCH v2 02/10] udp: implement GRO for plain UDP sockets Paolo Abeni
2018-10-21 20:06 ` Willem de Bruijn
2018-10-22 10:13 ` Paolo Abeni
2018-10-22 15:15 ` Willem de Bruijn
2018-10-22 11:24 ` Steffen Klassert
2018-10-22 13:41 ` Paolo Abeni
2018-10-22 15:51 ` Willem de Bruijn
2018-10-19 14:25 ` [RFC PATCH v2 03/10] udp: add support for UDP_GRO cmsg Paolo Abeni
2018-10-21 20:07 ` Willem de Bruijn
2018-10-22 15:44 ` Paolo Abeni
2018-10-19 14:25 ` [RFC PATCH v2 04/10] ip: factor out protocol delivery helper Paolo Abeni
2018-10-19 14:25 ` [RFC PATCH v2 05/10] ipv6: " Paolo Abeni
2018-10-19 14:25 ` [RFC PATCH v2 06/10] udp: cope with UDP GRO packet misdirection Paolo Abeni
2018-10-21 20:08 ` Willem de Bruijn
2018-10-22 10:29 ` Paolo Abeni
2018-10-22 16:00 ` Willem de Bruijn
2018-10-22 11:43 ` Steffen Klassert
2018-10-22 12:51 ` Paolo Abeni
2018-10-23 10:29 ` Steffen Klassert
2018-10-22 19:04 ` Subash Abhinov Kasiviswanathan
2018-10-23 7:59 ` Paolo Abeni
2018-10-24 0:55 ` Subash Abhinov Kasiviswanathan
2018-10-19 14:25 ` [RFC PATCH v2 07/10] selftests: add GRO support to udp bench rx program Paolo Abeni
2018-10-21 20:08 ` Willem de Bruijn
2018-10-22 10:31 ` Paolo Abeni
2018-10-19 14:25 ` [RFC PATCH v2 08/10] selftests: conditionally enable XDP support in udpgso_bench_rx Paolo Abeni
2018-10-21 20:09 ` Willem de Bruijn
2018-10-22 10:37 ` Paolo Abeni
2018-10-19 14:25 ` [RFC PATCH v2 09/10] selftests: add some benchmark for UDP GRO Paolo Abeni
2018-10-19 14:25 ` [RFC PATCH v2 10/10] selftests: add functionals test " Paolo Abeni
2018-10-21 20:09 ` Willem de Bruijn
2018-10-22 10:46 ` Paolo Abeni
2018-10-21 20:05 ` [RFC PATCH v2 00/10] udp: implement GRO support Willem de Bruijn
2018-10-22 9:41 ` Paolo Abeni
2018-10-23 12:10 ` Steffen Klassert
2018-10-23 12:22 ` Paolo Abeni [this message]
2018-10-24 10:55 ` Steffen Klassert
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=7aecb7871f3e330debdeb81fd8a401ec5692fa81.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.com \
--cc=willemb@google.com \
/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).