Netdev List
 help / color / mirror / Atom feed
From: David Ahern <dsa@cumulusnetworks.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: net: vrf: Handle ipv6 multicast and link-local addresses
Date: Wed, 3 Aug 2016 14:36:34 -0600	[thread overview]
Message-ID: <b23bf44d-1334-cbbc-6fa3-e1705a8e06f0@cumulusnetworks.com> (raw)
In-Reply-To: <CAMuHMdWGX3owP=xr-hhr6gE9PFRFc55Rzsc1M1JVoFLHdmuUYQ@mail.gmail.com>

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?

  reply	other threads:[~2016-08-03 20:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20160727215224.EB4E26611D4@gitolite.kernel.org>
2016-08-03 19:57 ` net: vrf: Handle ipv6 multicast and link-local addresses Geert Uytterhoeven
2016-08-03 20:11   ` David Ahern
2016-08-03 20:27     ` Geert Uytterhoeven
2016-08-03 20:36       ` David Ahern [this message]
2016-08-03 21:07         ` Geert Uytterhoeven
     [not found]           ` <b8b9a578-2a69-1b99-f919-f7d2e937846c@cumulusnetworks.com>
2016-08-04  9:43             ` Geert Uytterhoeven
2016-10-03 19:59       ` Arnaldo Carvalho de Melo

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=b23bf44d-1334-cbbc-6fa3-e1705a8e06f0@cumulusnetworks.com \
    --to=dsa@cumulusnetworks.com \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --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