Re: [PATCH] netdev: Use flexible array for trailing private bytes
From: Eric Dumazet
Date: Fri Mar 01 2024 - 03:04:23 EST
On Fri, Mar 1, 2024 at 7:59 AM Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
>
> On Thu, 29 Feb 2024 13:30:22 -0800 Kees Cook wrote:
> > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> > index 118c40258d07..b476809d0bae 100644
> > --- a/include/linux/netdevice.h
> > +++ b/include/linux/netdevice.h
> > @@ -1815,6 +1815,8 @@ enum netdev_stat_type {
> > NETDEV_PCPU_STAT_DSTATS, /* struct pcpu_dstats */
> > };
> >
> > +#define NETDEV_ALIGN 32
>
> Unless someone knows what this is for it should go.
> Align priv to cacheline size.
+2
#define NETDEV_ALIGN L1_CACHE_BYTES
or a general replacement of NETDEV_ALIGN....