[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87y5cbor6q.fsf@nemi.mork.no>
Date: Sun, 21 Apr 2013 17:10:21 +0200
From: Bjørn Mork <bjorn@...k.no>
To: Cong Wang <amwang@...hat.com>
Cc: David Stevens <dlstevens@...ibm.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [Patch net-next v4 4/5] vxlan: add scope_id support for ll addr
Cong Wang <amwang@...hat.com> writes:
> On Sun, 2013-04-21 at 16:46 +0200, Bjørn Mork wrote:
>> struct vxlan_addr *rip = &vxlan->default_dst.remote_ip;
>>
>> rip->va_sin.sin_addr.s_addr
>> rip->va_sin6.sin6_addr
>
> I don't see any difference between this with:
>
> vxlan->default_dst.remote_ip.va_sin.sin_addr.s_addr
> vxlan->default_dst.remote_ip.va_sin6.sin6_addr
>
> except making two lines shorter... People still have to go into 5 levels
> to get the final field.
Yes, of course. That's how many levels there is in this data structure.
They still have to go into 5 levels when you define away some of those
levels. Only difference is that they then have to _remember_ that one
of the labels actually is a macro hiding 3 levels...
You are obscuring the levels, not removing them. That's the problem.
Noone objects to removing levels if you can do that by moving fields
around. But if you can't, then don't try to hide it.
Bjørn
--
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