From bfe040c3851ad09e0944de7b0973a71323610e23 Mon Sep 17 00:00:00 2001 From: Jacob Keller Date: Fri, 16 Mar 2018 01:26:30 -0700 Subject: i40e: move I40E_FLAG_FILTER_SYNC to a state bit The I40E_FLAG_FILTER_SYNC flag is modified during run time possibly when the RTNL lock is not held. Thus, it should not be part of pf->flags, and instead should be using atomic bit operations in the pf->state field. Create a __I40E_MACVLAN_SYNC_PENDING state bit, and use it instead of the old I40E_FLAG_FILTER_SYNC flag. This is part of a larger effort to remove the need for cmpxchg64 in i40e_set_priv_flags(). Signed-off-by: Jacob Keller Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher --- drivers/net/ethernet/intel/i40e/i40e.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/net/ethernet/intel/i40e/i40e.h') diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h index 1d33a8b3ef54..52f99142244b 100644 --- a/drivers/net/ethernet/intel/i40e/i40e.h +++ b/drivers/net/ethernet/intel/i40e/i40e.h @@ -162,6 +162,7 @@ enum i40e_state_t { __I40E_RESET_FAILED, __I40E_PORT_SUSPENDED, __I40E_VF_DISABLE, + __I40E_MACVLAN_SYNC_PENDING, /* This must be last as it determines the size of the BITMAP */ __I40E_STATE_SIZE__, }; @@ -516,7 +517,7 @@ struct i40e_pf { #define I40E_FLAG_MSIX_ENABLED BIT_ULL(2) #define I40E_FLAG_RSS_ENABLED BIT_ULL(3) #define I40E_FLAG_VMDQ_ENABLED BIT_ULL(4) -#define I40E_FLAG_FILTER_SYNC BIT_ULL(5) +/* Gap for BIT_ULL(5) */ #define I40E_FLAG_SRIOV_ENABLED BIT_ULL(6) #define I40E_FLAG_DCB_CAPABLE BIT_ULL(7) #define I40E_FLAG_DCB_ENABLED BIT_ULL(8) -- cgit v1.2.3