lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADxym3ZQt-FC0QGgHFx458ePJSTWXOEoVe2fFh_dN_Lxfe=sXA@mail.gmail.com>
Date: Sun, 1 Sep 2024 20:37:25 +0800
From: Menglong Dong <menglong8.dong@...il.com>
To: Simon Horman <horms@...nel.org>
Cc: idosch@...dia.com, kuba@...nel.org, davem@...emloft.net, 
	edumazet@...gle.com, pabeni@...hat.com, dsahern@...nel.org, 
	dongml2@...natelecom.cn, amcohen@...dia.com, gnault@...hat.com, 
	bpoirier@...dia.com, b.galvani@...il.com, razor@...ckwall.org, 
	petrm@...dia.com, linux-kernel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v2 06/12] net: vxlan: make vxlan_set_mac() return
 drop reasons

On Fri, Aug 30, 2024 at 11:31 PM Simon Horman <horms@...nel.org> wrote:
>
> On Fri, Aug 30, 2024 at 09:59:55AM +0800, Menglong Dong wrote:
> > Change the return type of vxlan_set_mac() from bool to enum
> > skb_drop_reason. In this commit, two drop reasons are introduced:
> >
> >   VXLAN_DROP_INVALID_SMAC
> >   VXLAN_DROP_ENTRY_EXISTS
> >
> > To make it easier to document the reasons in drivers/net/vxlan/drop.h,
> > we don't define the enum vxlan_drop_reason with the macro
> > VXLAN_DROP_REASONS(), but hand by hand.
> >
> > Signed-off-by: Menglong Dong <dongml2@...natelecom.cn>
> > ---
> >  drivers/net/vxlan/drop.h       |  9 +++++++++
> >  drivers/net/vxlan/vxlan_core.c | 12 ++++++------
> >  2 files changed, 15 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/net/vxlan/drop.h b/drivers/net/vxlan/drop.h
> > index 6bcc6894fbbd..876b4a9de92f 100644
> > --- a/drivers/net/vxlan/drop.h
> > +++ b/drivers/net/vxlan/drop.h
> > @@ -9,11 +9,20 @@
> >  #include <net/dropreason.h>
> >
> >  #define VXLAN_DROP_REASONS(R)                        \
> > +     R(VXLAN_DROP_INVALID_SMAC)              \
> > +     R(VXLAN_DROP_ENTRY_EXISTS)              \
> >       /* deliberate comment for trailing \ */
> >
> >  enum vxlan_drop_reason {
> >       __VXLAN_DROP_REASON = SKB_DROP_REASON_SUBSYS_VXLAN <<
> >                               SKB_DROP_REASON_SUBSYS_SHIFT,
> > +     /** @VXLAN_DROP_INVALID_SMAC: source mac is invalid */
> > +     VXLAN_DROP_INVALID_SMAC,
> > +     /**
> > +      * @VXLAN_DROP_ENTRY_EXISTS: trying to migrate a static entry or
> > +      * one pointing to a nexthop
>
> Maybe it is clearer to write: one -> an entry
>

Okay!

> > +      */
> > +     VXLAN_DROP_ENTRY_EXISTS,
> >  };
> >
> >  static inline void
>
> ...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ