Re: [PATCH net-next] net: skb: export skb drop reaons to user by TRACE_DEFINE_ENUM

From: Menglong Dong
Date: Thu Sep 01 2022 - 22:13:23 EST


On Fri, Sep 2, 2022 at 5:12 AM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Thu, 1 Sep 2022 23:23:39 +0800 menglong8.dong@xxxxxxxxx wrote:
> > +#undef FN
> > +#define FN(reason) [SKB_DROP_REASON_##reason] = #reason,
> > +const char * const drop_reasons[] = {
> > + DEFINE_DROP_REASON(FN, FN)
> > +};
>
> The undef looks a little backwards, no? We don't want to pollute all
> users of skbuff.h with a FN define.
>
> #define FN....
> /* use it */
> #undef FN

Okay, Thanks! I'll wait a moment to see if there are other comments
before sending the next version.

Menglong Dong