From: Jiri Pirko <jiri@resnulli.us>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
kaber@trash.net, thaller@redhat.com, hannes@stressinduktion.org,
vyasevich@gmail.com, dcbw@redhat.com, David.Laight@ACULAB.COM
Subject: Re: [patch iproute2 1/2] add support for extended ifa_flags
Date: Sat, 28 Dec 2013 22:20:18 +0100 [thread overview]
Message-ID: <20131228212018.GA2447@minipsycho> (raw)
In-Reply-To: <20131228112147.67756b9c@nehalam.linuxnetplumber.net>
Sat, Dec 28, 2013 at 08:21:47PM CET, stephen@networkplumber.org wrote:
>Was about to apply this but found something while reviewing.
>
>On Fri, 6 Dec 2013 09:46:26 +0100
>Jiri Pirko <jiri@resnulli.us> wrote:
>
>> + req.ifa.ifa_flags = ifa_flags & 0xff;
>> + addattr32(&req.n, sizeof(req), IFA_FLAGS, ifa_flags);
>
>I don't like the mystery mask (0xff) here. I think this was to mask
>off private flags. Perhaps a manifest constant should be added to if.h
>lie IFA_F_RDONLY_MASK??
Hmm.. I wanted to emhasize that only 1 byte of value is taken.
But I think that simple "req.ifa.ifa_flags = ifa_flags" should be fine
here.
I will change this and repost.
Thanks!
>
>Plus from an API point of view, hard coding a value (even in #define)
>seems like a problem when future values get added.
>
prev parent reply other threads:[~2013-12-28 21:20 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 8:45 [patch net-next 0/2] ipv6: allow temporary address management for user-created addresses Jiri Pirko
2013-12-06 8:45 ` [patch net-next 1/2] ipv6 addrconf: extend ifa_flags to u32 Jiri Pirko
2013-12-06 21:35 ` David Miller
2013-12-07 8:51 ` Jiri Pirko
2013-12-06 8:45 ` [patch net-next 2/2] ipv6 addrconf: introduce IFA_F_MANAGETEMPADDR to tell kernel to manage temporary addresses Jiri Pirko
2013-12-06 21:35 ` David Miller
2013-12-07 3:36 ` Hannes Frederic Sowa
2013-12-06 8:46 ` [patch iproute2 1/2] add support for extended ifa_flags Jiri Pirko
2013-12-06 8:46 ` [patch iproute2 2/2] add support for IFA_F_MANAGETEMPADDR Jiri Pirko
2013-12-28 19:27 ` Stephen Hemminger
2013-12-28 19:21 ` [patch iproute2 1/2] add support for extended ifa_flags Stephen Hemminger
2013-12-28 21:20 ` Jiri Pirko [this message]
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=20131228212018.GA2447@minipsycho \
--to=jiri@resnulli.us \
--cc=David.Laight@ACULAB.COM \
--cc=davem@davemloft.net \
--cc=dcbw@redhat.com \
--cc=hannes@stressinduktion.org \
--cc=jmorris@namei.org \
--cc=kaber@trash.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=thaller@redhat.com \
--cc=vyasevich@gmail.com \
--cc=yoshfuji@linux-ipv6.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;
as well as URLs for NNTP newsgroup(s).