[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWd1mYcPFU6Xntr96AkHoiZ_gOC61Oe_pnHcq1mWfoRdA@mail.gmail.com>
Date: Thu, 4 Aug 2016 11:43:25 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: David Ahern <dsa@...ulusnetworks.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: net: vrf: Handle ipv6 multicast and link-local addresses
Hi David,
On Thu, Aug 4, 2016 at 7:01 AM, David Ahern <dsa@...ulusnetworks.com> wrote:
> Does making the code the same between those 2 functions matter?
Yes, it does make the warning go away.
> diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
> index 1ce7420322ee..3951a2c98431 100644
> --- a/drivers/net/vrf.c
> +++ b/drivers/net/vrf.c
> @@ -862,15 +862,17 @@ static void vrf_ip6_input_dst(struct sk_buff *skb, struct net_device *vrf_dev,
> int ifindex)
> {
> const struct ipv6hdr *iph = ipv6_hdr(skb);
> + struct net *net = dev_net(vrf_dev);
> struct flowi6 fl6 = {
> + .flowi6_oif = 0,
> + .flowi6_iif = ifindex,
> .daddr = iph->daddr,
> .saddr = iph->saddr,
> .flowlabel = ip6_flowinfo(iph),
> .flowi6_mark = skb->mark,
> .flowi6_proto = iph->nexthdr,
> - .flowi6_iif = ifindex,
> + .flowi6_flags = 0,
> };
> - struct net *net = dev_net(vrf_dev);
> struct rt6_info *rt6;
The critical change seems to be moving the initialization of
.flowi6_iif: if that
is done before the initialization of .flowlabel, there's no compiler warning.
The generated asm output is identical, though, so I think this is some sort of
false positive or compiler bug. Hence let's ignore it.
Thanks!
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists