[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240309092158.5a8191dc@hermes.local>
Date: Sat, 9 Mar 2024 09:21:58 -0800
From: Stephen Hemminger <stephen@...workplumber.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Petr Machata <petrm@...dia.com>, David Ahern <dsahern@...nel.org>,
<netdev@...r.kernel.org>, Ido Schimmel <idosch@...dia.com>,
<mlxsw@...dia.com>
Subject: Re: [PATCH iproute2-next 1/4] libnetlink: Add rta_getattr_uint()
On Fri, 8 Mar 2024 19:43:34 -0800
Jakub Kicinski <kuba@...nel.org> wrote:
> On Fri, 8 Mar 2024 14:58:59 -0800 Stephen Hemminger wrote:
> > > +static inline __u64 rta_getattr_uint(const struct rtattr *rta)
> > > +{
> > > + if (RTA_PAYLOAD(rta) == sizeof(__u32))
> > > + return rta_getattr_u32(rta);
> > > + return rta_getattr_u64(rta);
> >
> > Don't understand the use case here.
> > The kernel always sends the same payload size for the same attribute.
>
> Please see commit 374d345d9b5e13380c in the kernel.
Ok, but maybe go further and handle u16 and u8
Powered by blists - more mailing lists