Re: [PATCH nft 8/9] datatype: use __attribute__((packed)) instead of enum bitfields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2023-09-20 at 18:02 +0200, Pablo Neira Ayuso wrote:
> On Wed, Sep 20, 2023 at 04:26:09PM +0200, Thomas Haller wrote:
> 
> > +       enum ops                op;
> 
> This is saving _a lot of space_ for us, we currently have a problem
> with memory consumption, this is going in the opposite direction.
> 
> I prefer to ditch this patch.

The packed enums are only one uint8_t large. The memory-saving compared
to a :8 bitfield is exactly the same.

Thomas





[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux