> -----Original Message-----
> From: David Miller [mailto:da...@davemloft.net]
> Sent: Saturday, August 12, 2017 1:04 PM
> To: Kirsher, Jeffrey T <jeffrey.t.kirs...@intel.com>
> Cc: Keller, Jacob E <jacob.e.kel...@intel.com>; netdev@vger.kernel.org;
> nhor...@redhat.com; sassm...@redhat.com; jogre...@redhat.com
> Subject: Re: [net-next 08/15] i40e/i40evf: organize and re-number feature 
> flags
> 
> From: Jeff Kirsher <jeffrey.t.kirs...@intel.com>
> Date: Sat, 12 Aug 2017 04:08:41 -0700
> 
> > Also ensure that the flags variable is actually a u64 to guarantee
> > 64bits of space on all architectures.
> 
> Why?  You don't need 64-bits, you only need 27.
> 
> This will be unnecessarily expensive on 32-bit platforms.
> 
> Please don't do this.

I suppose a better method would be to switch to using a declare_bitmap instead, 
so that it automatically sizes based on the number of flags we have. The reason 
we chose 64bits is because we will add flags in the future, as we originally 
had more than 32 flags prior to this patch until we moved some into a separate 
field.

But now that I think about it, using DECLARE_BITMAP makes more sense, though 
it's a bit more invasive of the code.

Thanks,
Jake

Reply via email to