Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1456027

Re: net: vrf: Handle ipv6 multicast and link-local addresses

From Geert Uytterhoeven <geert@linux-m68k.org>
Newsgroups linux.kernel
Subject Re: net: vrf: Handle ipv6 multicast and link-local addresses
Date 2016-08-03 23:10 +0200
Message-ID <s2bAl-7Up-3@gated-at.bofh.it> (permalink)
References <s2auB-715-13@gated-at.bofh.it> <s2auB-715-11@gated-at.bofh.it> <s2aNY-7my-5@gated-at.bofh.it> <s2aXE-7pL-9@gated-at.bofh.it> <s2b7k-7uo-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Aug 3, 2016 at 10:36 PM, David Ahern <dsa@cumulusnetworks.com> wrote:
> On 8/3/16 2:27 PM, Geert Uytterhoeven wrote:
>> On Wed, Aug 3, 2016 at 10:11 PM, David Ahern <dsa@cumulusnetworks.com> wrote:
>>> On 8/3/16 1:57 PM, Geert Uytterhoeven wrote:
>>>>> +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 flowi6 fl6 = {
>>>>>> +               .daddr          = iph->daddr,
>>>>>> +               .saddr          = iph->saddr,
>>>>>> +               .flowlabel      = ip6_flowinfo(iph),
>>>> The above assignment causes the following compiler warning with
>>>> m68k-linux-gnu-gcc-4.1:
>>>>
>>>>     drivers/net/vrf.c: In function ‘vrf_ip6_input_dst’:
>>>>     drivers/net/vrf.c:870: warning: initialized field with
>>>> side-effects overwritten
>>>>     drivers/net/vrf.c:870: warning: (near initialization for ‘fl6’)
>>>>
>>>> Unfortunately I have no idea what it means, nor do I see what's wrong
>>>> with the code.
>>>
>>> no idea. Fields are initialized once and left and right data types are the same.
>>>
>>> Can you remove one line at a time? Line 870 is ".flowi6_proto   = iph->nexthdr," but all of the flowi6 macros are unique references to unique fields in flowi_common. The flowlabel line you point out is a unique field as well.
>>
>> The only thing that seems to matter is assigning the result of the call to
>> ip6_flowinfo() to .flowlabel. Assigning a constant makes the warning go away.
>
> No complaints for the same initialization style at line 151?

No.

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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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