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] [day] [month] [year] [list]
Date:   Tue, 8 Feb 2022 10:56:44 +0800
From:   Menglong Dong <menglong8.dong@...il.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     Jakub Kicinski <kuba@...nel.org>, David Ahern <dsahern@...nel.org>,
        Ido Schimmel <idosch@...sch.org>,
        Neil Horman <nhorman@...driver.com>,
        David Miller <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Menglong Dong <imagedong@...cent.com>
Subject: Re: [PATCH v6 net-next] net: drop_monitor: support drop reason

On Mon, Feb 7, 2022 at 10:43 PM Steven Rostedt <rostedt@...dmis.org> wrote:
>
> On Sat,  5 Feb 2022 16:17:38 +0800
> menglong8.dong@...il.com wrote:
>
> > --- a/net/core/drop_monitor.c
> > +++ b/net/core/drop_monitor.c
> > @@ -48,6 +48,16 @@
> >  static int trace_state = TRACE_OFF;
> >  static bool monitor_hw;
> >
> > +#undef EM
> > +#undef EMe
> > +
> > +#define EM(a, b)     [a] = #b,
> > +#define EMe(a, b)    [a] = #b
> > +
> > +static const char *drop_reasons[SKB_DROP_REASON_MAX + 1] = {
>
> Do you need to define the size above? Can't the compiler do it for you?
>
> static const char *drop_reasons[] = {
>

Yeah, it seems the compiler can do this job. Thanks!

> -- Steve
>
> > +     TRACE_SKB_DROP_REASON
> > +};
> > +
> >  /* net_dm_mutex
> >   *

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ