From: David Ahern <dsahern@gmail.com>
To: Stephen Hemminger <stephen@networkplumber.org>,
Serhey Popovych <serhe.popovych@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2-next v2 1/4] utils: Introduce and use inet_prefix_reset_flags()
Date: Sun, 11 Feb 2018 18:15:20 -0700 [thread overview]
Message-ID: <01307571-e5dd-6756-897e-0b107b4d4271@gmail.com> (raw)
In-Reply-To: <20180211154850.0f3d43b7@xeon-e3>
On 2/11/18 4:48 PM, Stephen Hemminger wrote:
> On Sun, 11 Feb 2018 22:02:30 +0200
> Serhey Popovych <serhe.popovych@gmail.com> wrote:
>
>> +static inline void inet_prefix_reset_flags(inet_prefix *p)
>> +{
>> + p->flags = 0;
>> +}
>
> Just do it.
>
> Wrapper adds nothing here.
>
I asked for a wrapper to flags b/c embedding 'p->flags = 0' into code
hides what it is doing - which is resetting the address type in
inet_prefix. If inet_prefix is hiding address family and address type
details from the main ip code, details of how it works should be opaque
to that code.
next prev parent reply other threads:[~2018-02-12 1:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-11 20:02 [PATCH iproute2-next v2 0/4] ip/tunnel: Unify local/remote endpoint address parsing Serhey Popovych
2018-02-11 20:02 ` [PATCH iproute2-next v2 1/4] utils: Introduce and use inet_prefix_reset_flags() Serhey Popovych
2018-02-11 23:48 ` Stephen Hemminger
2018-02-12 1:15 ` David Ahern [this message]
2018-02-12 20:08 ` David Ahern
2018-02-11 20:02 ` [PATCH iproute2-next v2 2/4] vti/vti6: Unify local/remote endpoint address parsing Serhey Popovych
2018-02-11 20:02 ` [PATCH iproute2-next v2 3/4] gre/gre6: " Serhey Popovych
2018-02-11 20:02 ` [PATCH iproute2-next v2 4/4] iptnl/ip6tnl: Unify local/remote endpoint and 6rd " Serhey Popovych
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=01307571-e5dd-6756-897e-0b107b4d4271@gmail.com \
--to=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=serhe.popovych@gmail.com \
--cc=stephen@networkplumber.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.