From: David Miller <davem@davemloft.net>
To: kafai@fb.com
Cc: netdev@vger.kernel.org, hannes@stressinduktion.org, kernel-team@fb.com
Subject: Re: [RFC PATCH 04/10] ipv6: Only create RTF_CACHE routes after encountering pmtu exception
Date: Mon, 20 Apr 2015 14:27:29 -0400 (EDT) [thread overview]
Message-ID: <20150420.142729.802138559230125552.davem@davemloft.net> (raw)
In-Reply-To: <1428717253-1006248-5-git-send-email-kafai@fb.com>
From: Martin KaFai Lau <kafai@fb.com>
Date: Fri, 10 Apr 2015 18:54:07 -0700
> @@ -1171,8 +1170,15 @@ void ip6_update_pmtu(struct sk_buff *skb, struct net *net, __be32 mtu,
> fl6.flowlabel = ip6_flowinfo(iph);
>
> dst = ip6_route_output(net, NULL, &fl6);
> - if (!dst->error)
> + if (!dst->error) {
> + unsigned char *outer_network_header = skb_network_header(skb);
> + int offset;
> +
> + skb_reset_network_header(skb);
> + offset = outer_network_header - skb_network_header(skb);
> ip6_rt_update_pmtu(dst, NULL, skb, ntohl(mtu));
> + skb_set_network_header(skb, offset);
> + }
I seriously object to adjusting then restoring the location of the SKB
network header in this kind of code path.
Instead, adjust the interfaces to the code doing the packet header
inspection so that it can accomodate an offset or something like that
instead.
next prev parent reply other threads:[~2015-04-20 18:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-11 1:54 [RFC PATCH 00/10] ipv6: Only create RTF_CACHE route after encountering pmtu exception Martin KaFai Lau
2015-04-11 1:54 ` [RFC PATCH 01/10] ipv6: Remove external dependency on rt6i_dst and rt6i_src Martin KaFai Lau
2015-04-11 1:54 ` [RFC PATCH 02/10] ipv6: Remove external dependency on rt6i_gateway and RTF_ANYCAST Martin KaFai Lau
2015-04-11 1:54 ` [RFC PATCH 03/10] ipv6: Combine rt6_alloc_cow and rt6_alloc_clone Martin KaFai Lau
2015-04-11 1:54 ` [RFC PATCH 04/10] ipv6: Only create RTF_CACHE routes after encountering pmtu exception Martin KaFai Lau
2015-04-20 18:27 ` David Miller [this message]
2015-04-20 18:28 ` David Miller
2015-04-11 1:54 ` [RFC PATCH 05/10] ipv6: Allow pmtu update on /128 via gateway route Martin KaFai Lau
2015-04-11 1:54 ` [RFC PATCH 06/10] ipv6: Avoid deleting RTF_CACHE route from ip6_route_del() Martin KaFai Lau
2015-04-20 18:23 ` David Miller
2015-04-20 19:33 ` Martin KaFai Lau
2015-04-20 19:37 ` David Miller
2015-04-11 1:54 ` [RFC PATCH 07/10] ipv6: Extend the route lookups to low priority metrics Martin KaFai Lau
2015-04-11 1:54 ` [RFC PATCH 08/10] ipv6: Do not use inetpeer when creating RTF_CACHE route for /128 via gateway entry Martin KaFai Lau
2015-04-11 1:54 ` [RFC PATCH 09/10] ipv6: Break up ip6_rt_copy() Martin KaFai Lau
2015-04-11 1:54 ` [RFC PATCH 10/10] ipv6: Create percpu rt6_info Martin KaFai Lau
2015-04-20 18:29 ` [RFC PATCH 00/10] ipv6: Only create RTF_CACHE route after encountering pmtu exception 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=20150420.142729.802138559230125552.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=hannes@stressinduktion.org \
--cc=kafai@fb.com \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/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).