[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20131228212018.GA2447@minipsycho>
Date: Sat, 28 Dec 2013 22:20:18 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: netdev@...r.kernel.org, davem@...emloft.net, kuznet@....inr.ac.ru,
jmorris@...ei.org, yoshfuji@...ux-ipv6.org, kaber@...sh.net,
thaller@...hat.com, hannes@...essinduktion.org,
vyasevich@...il.com, dcbw@...hat.com, David.Laight@...LAB.COM
Subject: Re: [patch iproute2 1/2] add support for extended ifa_flags
Sat, Dec 28, 2013 at 08:21:47PM CET, stephen@...workplumber.org wrote:
>Was about to apply this but found something while reviewing.
>
>On Fri, 6 Dec 2013 09:46:26 +0100
>Jiri Pirko <jiri@...nulli.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.
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists