From: Jiri Benc <jbenc@redhat.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: davem@davemloft.net, alexei.starovoitov@gmail.com, tgraf@suug.ch,
netdev@vger.kernel.org
Subject: Re: [PATCH net-next 7/7] vxlan: allow setting ipv6 traffic class
Date: Wed, 16 Mar 2016 11:59:52 +0100 [thread overview]
Message-ID: <20160316115952.463e851c@griffin> (raw)
In-Reply-To: <c50f1e302411f7e4fe73ec469e0683f3e14fe830.1457099834.git.daniel@iogearbox.net>
On Fri, 4 Mar 2016 15:15:08 +0100, Daniel Borkmann wrote:
> We can already do that for IPv4, but IPv6 support was missing. Add
> it for vxlan, so it can be used with collect metadata frontends.
>
> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
> ---
> drivers/net/vxlan.c | 14 +++++++++-----
> 1 file changed, 9 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index 366a858..d33a434 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -1788,7 +1788,7 @@ static struct rtable *vxlan_get_route(struct vxlan_dev *vxlan,
>
> #if IS_ENABLED(CONFIG_IPV6)
> static struct dst_entry *vxlan6_get_route(struct vxlan_dev *vxlan,
> - struct sk_buff *skb, int oif,
> + struct sk_buff *skb, int oif, u8 tos,
> const struct in6_addr *daddr,
> struct in6_addr *saddr,
> struct dst_cache *dst_cache,
> @@ -1799,6 +1799,8 @@ static struct dst_entry *vxlan6_get_route(struct vxlan_dev *vxlan,
> struct flowi6 fl6;
> int err;
>
> + if (tos && !info)
> + use_cache = false;
> if (use_cache) {
> ndst = dst_cache_get_ip6(dst_cache, saddr);
> if (ndst)
> @@ -1807,6 +1809,7 @@ static struct dst_entry *vxlan6_get_route(struct vxlan_dev *vxlan,
>
> memset(&fl6, 0, sizeof(fl6));
> fl6.flowi6_oif = oif;
> + fl6.flowi6_tos = RT_TOS(tos);
Nothing against this but the reason it was missing was that it's never
used. Unless I'm missing something the IPv6 code does not use this
field at all for lookups.
This patch is not wrong but it's effectively dead code right now.
I'll be happy to be proven wrong, though.
(Sorry for answering after such long time, I'm catching up after a
vacation.)
Jiri
next prev parent reply other threads:[~2016-03-16 10:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-04 14:15 [PATCH net-next 0/7] BPF updates Daniel Borkmann
2016-03-04 14:15 ` [PATCH net-next 1/7] bpf: allow bpf_csum_diff to feed bpf_l3_csum_replace as well Daniel Borkmann
2016-03-04 14:15 ` [PATCH net-next 2/7] bpf: add flags to bpf_skb_store_bytes for clearing hash Daniel Borkmann
2016-03-04 14:15 ` [PATCH net-next 3/7] bpf: make helper function protos static Daniel Borkmann
2016-03-04 14:15 ` [PATCH net-next 4/7] bpf: allow to propagate df in bpf_skb_set_tunnel_key Daniel Borkmann
2016-03-04 14:15 ` [PATCH net-next 5/7] bpf: support for access to tunnel options Daniel Borkmann
2016-03-04 14:15 ` [PATCH net-next 6/7] bpf, vxlan, geneve, gre: fix usage of dst_cache on xmit Daniel Borkmann
2016-03-04 14:15 ` [PATCH net-next 7/7] vxlan: allow setting ipv6 traffic class Daniel Borkmann
2016-03-16 10:59 ` Jiri Benc [this message]
2016-03-16 12:52 ` Daniel Borkmann
2016-03-08 19:05 ` [PATCH net-next 0/7] BPF updates David Miller
2016-03-08 19:19 ` Daniel Borkmann
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=20160316115952.463e851c@griffin \
--to=jbenc@redhat.com \
--cc=alexei.starovoitov@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--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).