RE: [Intel-wired-lan] [PATCH iwl-next 3/6] i40e: Use DECLARE_BITMAP for flags and hw_features fields in i40e_pf

From: Pucha, HimasekharX Reddy
Date: Mon Oct 30 2023 - 05:04:11 EST


> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@xxxxxxxxxx> On Behalf Of Ivan Vecera
> Sent: Saturday, October 21, 2023 1:08 AM
> To: netdev@xxxxxxxxxxxxxxx
> Cc: Eric Dumazet <edumazet@xxxxxxxxxx>; dacampbe@xxxxxxxxxx; Richard Cochran <richardcochran@xxxxxxxxx>; Brandeburg, Jesse <jesse.brandeburg@xxxxxxxxx>; open list <linux-kernel@xxxxxxxxxxxxxxx>; Nguyen, Anthony L <anthony.l.nguyen@xxxxxxxxx>; moderated list:INTEL ETHERNET DRIVERS <intel-wired-lan@xxxxxxxxxxxxxxxx>; Keller, Jacob E <jacob.e.keller@xxxxxxxxx>; Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; David S. Miller <davem@xxxxxxxxxxxxx>
> Subject: [Intel-wired-lan] [PATCH iwl-next 3/6] i40e: Use DECLARE_BITMAP for flags and hw_features fields in i40e_pf
>
> Convert flags and hw_features fields from i40e_pf from u32 to
> bitmaps and their usage to use bit access functions.
>
> Changes:
> - Convert "pf_ptr->(flags|hw_features) & FL" to "test_bit(FL, ...)"
> - Convert "pf_ptr->(flags|hw_features) |= FL" to "set_bit(FL, ...)"
> - Convert "pf_ptr->(flags|hw_features) &= ~FL" to "clear_bit(FL, ...)"
> - Rename flag field to bitno in i40e_priv_flags and adjust ethtool
> callbacks to work with flags bitmap
> - Rename flag names where '_ENABLED'->'_ENA' and '_DISABLED'->'_DIS'
> like in ice driver
>
> Signed-off-by: Ivan Vecera <ivecera@xxxxxxxxxx>
> ---
> drivers/net/ethernet/intel/i40e/i40e.h | 165 ++---
> drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c | 24 +-
> .../net/ethernet/intel/i40e/i40e_debugfs.c | 4 +-
> .../net/ethernet/intel/i40e/i40e_ethtool.c | 209 ++++---
> drivers/net/ethernet/intel/i40e/i40e_main.c | 587 +++++++++---------
> drivers/net/ethernet/intel/i40e/i40e_ptp.c | 26 +-
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 20 +-
> drivers/net/ethernet/intel/i40e/i40e_txrx.h | 4 +-
> .../ethernet/intel/i40e/i40e_virtchnl_pf.c | 20 +-
> 9 files changed, 544 insertions(+), 515 deletions(-)
>

Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@xxxxxxxxx> (A Contingent worker at Intel)