Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1456277
| From | Geert Uytterhoeven <geert@linux-m68k.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: net: vrf: Handle ipv6 multicast and link-local addresses |
| Date | 2016-08-04 11:50 +0200 |
| Message-ID | <s2nrQ-76H-3@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <s2aNY-7my-5@gated-at.bofh.it> <s2aXE-7pL-9@gated-at.bofh.it> <s2b7k-7uo-15@gated-at.bofh.it> <s2bAl-7Up-3@gated-at.bofh.it> <s2nrQ-76H-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi David,
On Thu, Aug 4, 2016 at 7:01 AM, David Ahern <dsa@cumulusnetworks.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@linux-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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: net: vrf: Handle ipv6 multicast and link-local addresses Geert Uytterhoeven <geert@linux-m68k.org> - 2016-08-03 22:00 +0200
Re: net: vrf: Handle ipv6 multicast and link-local addresses David Ahern <dsa@cumulusnetworks.com> - 2016-08-03 22:20 +0200
Re: net: vrf: Handle ipv6 multicast and link-local addresses Geert Uytterhoeven <geert@linux-m68k.org> - 2016-08-03 22:30 +0200
Re: net: vrf: Handle ipv6 multicast and link-local addresses David Ahern <dsa@cumulusnetworks.com> - 2016-08-03 22:40 +0200
Re: net: vrf: Handle ipv6 multicast and link-local addresses Geert Uytterhoeven <geert@linux-m68k.org> - 2016-08-03 23:10 +0200
Re: net: vrf: Handle ipv6 multicast and link-local addresses Geert Uytterhoeven <geert@linux-m68k.org> - 2016-08-04 11:50 +0200
csiph-web