[PATCH main v2 2/2] macsec: Fix set offload capability for MACsec

Info Skymem info at skymem.com
Tue Feb 21 05:13:14 PST 2023


Hi,
thank you for your information.

On our website you can find email addresses of companies and people.
https://www.skymem.info

In short, it’s like Google for emails.

Best regards,
Robert,
Skymem team

On Wed, Feb 15, 2023 at 9:14 AM Emeel Hakim <ehakim at nvidia.com> wrote:
>
>
>
> > -----Original Message-----
> > From: Sabrina Dubroca <sd at queasysnail.net>
> > Sent: Tuesday, 14 February 2023 20:50
> > To: Emeel Hakim <ehakim at nvidia.com>
> > Cc: libnl at lists.infradead.org
> > Subject: Re: [PATCH main v2 2/2] macsec: Fix set offload capability for MACsec
> >
> > External email: Use caution opening links or attachments
> >
> >
> > 2023-02-14, 14:19:44 +0200, Emeel Hakim wrote:
> > > Currently, rtnl_link_macsec_set_offload rejects any value greater than
> > > 1 limiting the MACSEC_ATTR_OFFLOAD attribute to the values 0 and 1
> > > where 2 is also a legal value.
> > > Fix by allowing all legal values for MACSEC_ATTR_OFFLOAD.
> > >
> > > Fixes: b6cc13d76b29 ("Supporting Hardware offload capability for
> > > MACsec")
> > > Signed-off-by: Emeel Hakim <ehakim at nvidia.com>
> > > ---
> > > V1 -> V2: Use MACSEC_OFFLOAD_ATTR_MAX
> > >
> > >  lib/route/link/macsec.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/lib/route/link/macsec.c b/lib/route/link/macsec.c index
> > > 16b65b0..af13047 100644
> > > --- a/lib/route/link/macsec.c
> > > +++ b/lib/route/link/macsec.c
> > > @@ -652,7 +652,7 @@ int rtnl_link_macsec_set_offload(struct rtnl_link
> > > *link, uint8_t offload)
> > >
> > >       IS_MACSEC_LINK_ASSERT(link);
> > >
> > > -     if (offload > 1)
> > > +     if (offload > MACSEC_OFFLOAD_ATTR_MAX)
> >
> > Um, that should be MACSEC_OFFLOAD_MAX, right? offload will take the values
> > MACSEC_OFFLOAD_OFF, _PHY, _MAC, and not MACSEC_OFFLOAD_ATTR_UNSPEC,
> > _TYPE, _PAD.
>
> Ops, my bad , good catch.
> sending new version.
>
> >
> > >               return -NLE_INVAL;
> > >
> > >       info->offload = offload;
> > > --
> > > 2.21.3
> > >
> >
> > --
> > Sabrina
>
> _______________________________________________
> libnl mailing list
> libnl at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/libnl



More information about the libnl mailing list