From: Jiri Benc <jbenc@redhat.com>
To: ebiederm@xmission.com (Eric W. Biederman)
Cc: Thomas Graf <tgraf@suug.ch>,
netdev@vger.kernel.org, Roopa Prabhu <roopa@cumulusnetworks.com>
Subject: Re: [PATCH net 0/2] lwtunnel: make it really work, for IPv4
Date: Thu, 24 Sep 2015 10:19:43 +0200 [thread overview]
Message-ID: <20150924101943.26f3daf2@griffin> (raw)
In-Reply-To: <87lhbws6pz.fsf@x220.int.ebiederm.org>
On Thu, 24 Sep 2015 00:54:00 -0500, Eric W. Biederman wrote:
> My only interest in this is to help figure out how to make IPv6 ndisc
> work over light weight tunnels.
Thanks for that. However, as much as some of the things you wrote in
this mail make sense (see below), I don't see how they help with this
particular problem. You seem to be concerned mostly with ingress and
the existence of metadata_dst, while the problem with IPv6 is there's
currently no place to attach egress tunnel info to.
> We can't use the metadata dst for IPv6 neighbour discovery. Neighbour
> discovery processing comes after ip6_route_input. That is what makes
> such a network device operation interesting today.
>
> We don't need the information in the metadata dst because the
> information that was in the metadata dst is still in the packet we just
> need to reparse the packet.
That's an interesting point. For ARP and ndisc, we can certainly do
that. For ovs and similar use cases, I'm not sure. We can certainly
make it work this way but we'd need a ndo for reparsing the header.
Compared to the current situation where we just carry the parsed data,
reparsing seems to be more expensive. I'd expect this would show in
performance numbers.
> Given that the input network device is per tunnel type, the network
> device method will already know the format of the tunnel packet and so
> should not have any trouble parsing it.
Yes.
> As an assist we can preserve 90% of the information in ip_tunnel_key by
> repurposing inner_transport_header, inner_network_header and
> inner_mac_header (which are only valid on output packets today) as
> outer_transport_header, outer_network_header and outer_mac_header for
> input packets.
>
> That makes tun_id the only field of struct ip_tunnel_key that we have to
> work to find.
You will need to know the format of the tunnel header to get tun_id.
Because we want the users generic, it means a ndo to parse the headers.
> Creating outer_transport_header, outer_network_header and
> outer_mac_header should open up a lot of optmization opportunities
> for input tunnel processing. I expect with just a little bit of care
> we should be able to replace the input metadata dst with a handful
> of fields stored in skb->cb. Which in turn means no memory allocations
> are necessary, and that the work can be done unconditionally.
Which would mean no GRO. Which is probably no problem. Seems it may
indeed be an optimization. Doesn't have much to do with this set,
though, we'd still have the exact same problems as now and the exact
same ways to fix them.
Jiri
--
Jiri Benc
next prev parent reply other threads:[~2015-09-24 8:19 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 16:12 [PATCH net 0/2] lwtunnel: make it really work, for IPv4 Jiri Benc
2015-09-22 16:12 ` [PATCH net 1/2] ipv4: send arp replies to the correct tunnel Jiri Benc
2015-09-23 8:10 ` Thomas Graf
2015-09-22 16:12 ` [PATCH net 2/2] lwtunnel: remove source and destination UDP port config option Jiri Benc
2015-09-23 8:12 ` Thomas Graf
2015-09-23 4:39 ` [PATCH net 0/2] lwtunnel: make it really work, for IPv4 Eric W. Biederman
2015-09-23 8:09 ` Thomas Graf
2015-09-23 12:17 ` Eric W. Biederman
2015-09-23 14:29 ` Jiri Benc
2015-09-23 17:42 ` Eric W. Biederman
2015-09-23 20:54 ` Jiri Benc
2015-09-23 21:09 ` Eric W. Biederman
2015-09-23 23:08 ` Thomas Graf
2015-09-24 5:54 ` Eric W. Biederman
2015-09-24 8:19 ` Jiri Benc [this message]
2015-09-24 8:35 ` Jiri Benc
2015-09-23 8:08 ` Thomas Graf
2015-09-24 21:32 ` David Miller
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=20150924101943.26f3daf2@griffin \
--to=jbenc@redhat.com \
--cc=ebiederm@xmission.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.com \
--cc=tgraf@suug.ch \
/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).