[Intel-wired-lan] [next PATCH S74-V2 05/10] i40e: separate hw_features from runtime changing flags

Bowers, AndrewX andrewx.bowers at intel.com
Wed Jun 28 23:42:09 UTC 2017


> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Friday, June 23, 2017 1:25 AM
> To: Michael, Alice <alice.michael at intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S74-V2 05/10] i40e: separate
> hw_features from runtime changing flags
> 
> From: Jacob Keller <jacob.e.keller at intel.com>
> 
> The number of flags found in pf->flags has grown quite large, and there are a
> lot of different types of flags. Most of the flags are simply hardware features
> which are enabled on some firmware or some MAC types.
> Other flags are dynamic run-time flags which enable or disable certain
> features of the driver.
> 
> Separate these two types of flags into pf->hw_features and pf->flags.
> The hw_features list will contain a set of features which are enabled at init
> time. This will not contain toggles or otherwise dynamically changing
> features. These flags should not need atomic protections, as they will be set
> once during init and then be essentially read only.
> 
> Everything else will remain in the flags variable. These flags may be modified
> at any time during run time. A future patch may wish to convert these flags
> into set_bit/clear_bit/test_bit or similar approach to ensure atomic
> correctness.
> 
> The I40E_FLAG_MFP_ENABLED flag may be a good fit for hw_features but
> currently is used by ethtool in the private flags settings, and thus has been
> left as part of flags.
> 
> Additionally, I40E_FLAG_DCB_CAPABLE may be a good fit for the
> hw_features but this patch has not tried to untangle it yet.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> ---
>  drivers/net/ethernet/intel/i40e/i40e.h             | 43 +++++++------
>  drivers/net/ethernet/intel/i40e/i40e_ethtool.c     | 34 +++++-----
>  drivers/net/ethernet/intel/i40e/i40e_main.c        | 72 +++++++++++-----------
>  drivers/net/ethernet/intel/i40e/i40e_ptp.c         |  6 +-
>  drivers/net/ethernet/intel/i40e/i40e_txrx.h        |  2 +-
>  drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c |  8 +--
>  drivers/net/ethernet/intel/i40evf/i40e_txrx.h      |  4 --
>  drivers/net/ethernet/intel/i40evf/i40evf.h         |  2 -
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c    |  2 +-
>  9 files changed, 85 insertions(+), 88 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers at intel.com>




More information about the Intel-wired-lan mailing list