[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241106012214.6867-1-kuniyu@amazon.com>
Date: Tue, 5 Nov 2024 17:22:14 -0800
From: Kuniyuki Iwashima <kuniyu@...zon.com>
To: <kuba@...nel.org>
CC: <andrew+netdev@...n.ch>, <daniel@...earbox.net>, <davem@...emloft.net>,
<edumazet@...gle.com>, <horms@...nel.org>, <kuni1840@...il.com>,
<kuniyu@...zon.com>, <mailhol.vincent@...adoo.fr>, <mkl@...gutronix.de>,
<netdev@...r.kernel.org>, <pabeni@...hat.com>, <razor@...ckwall.org>
Subject: Re: [PATCH v1 net-next 3/8] rtnetlink: Add peer_type in struct rtnl_link_ops.
From: Jakub Kicinski <kuba@...nel.org>
Date: Tue, 5 Nov 2024 17:04:47 -0800
> On Tue, 5 Nov 2024 16:58:25 -0800 Kuniyuki Iwashima wrote:
> > > > I guess compiler will warn if someone tries to use < 255
> > >
> > > I chose 1 just because all of the three peer attr types were 1.
> >
> > s/chose 1/chose u8/ :)
> >
> >
> > > Should peer_type be u16 or extend when a future device use >255 for
> > > peer ifla ?
>
> I think we can extend in the future if you're doing this for packing
> reasons. Barely any family has more attrs than 256 and as I replied to
> myself we will assign a constant so compiler will warn us.
I have no strong preference so will use u16.
Also, there was a 3-bytes hole.
Thanks!
Powered by blists - more mailing lists