[Intel-wired-lan] [PATCH net v5 2/2] ice: Remove umac_shared

Tony Nguyen anthony.l.nguyen at intel.com
Tue Jul 19 22:01:54 UTC 2022



On 7/18/2022 9:42 AM, Jedrzej Jagielski wrote:
> Remove umac_shared as it was always true. Remove helper function
> to set umac_shared. Remove the code depending on umac_shared
> from ice_add_mac and ice_remove_mac.
> Remove ice_find_ucast_rule_entry function as it was only
> used when umac_shared was set to false.

This should go to net-next as it's not fixing any bugs.

> Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch at intel.com>
> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski at intel.com>
> ---
>   drivers/net/ethernet/intel/ice/ice_common.c |  11 --
>   drivers/net/ethernet/intel/ice/ice_common.h |   1 -
>   drivers/net/ethernet/intel/ice/ice_main.c   |   2 -
>   drivers/net/ethernet/intel/ice/ice_switch.c | 164 +-------------------
>   drivers/net/ethernet/intel/ice/ice_type.h   |   3 -
>   5 files changed, 5 insertions(+), 176 deletions(-)
> 

<snip>

> --- a/drivers/net/ethernet/intel/ice/ice_switch.c
> +++ b/drivers/net/ethernet/intel/ice/ice_switch.c
> @@ -3424,31 +3424,17 @@ bool ice_vlan_fltr_exist(struct ice_hw *hw, u16 vlan_id, u16 vsi_handle)
>    * ice_add_mac - Add a MAC address based filter rule
>    * @hw: pointer to the hardware structure
>    * @m_list: list of MAC addresses and forwarding information
> - *
> - * IMPORTANT: When the umac_shared flag is set to false and m_list has
> - * multiple unicast addresses, the function assumes that all the
> - * addresses are unique in a given add_mac call. It doesn't
> - * check for duplicates in this case, removing duplicates from a given
> - * list should be taken care of in the caller of this function.
>    */
>   int ice_add_mac(struct ice_hw *hw, struct list_head *m_list)
>   {
> -	struct ice_sw_rule_lkup_rx_tx *s_rule, *r_iter;
>   	struct ice_fltr_list_entry *m_list_itr;
> -	struct list_head *rule_head;
> -	u16 total_elem_left, s_rule_size;
>   	struct ice_switch_info *sw;
> -	struct mutex *rule_lock; /* Lock to protect filter rule list */
> -	u16 num_unicast = 0;
>   	int status = 0;
> -	u8 elem_sent;

../drivers/net/ethernet/intel/ice/ice_switch.c: In function ‘ice_add_mac’:
../drivers/net/ethernet/intel/ice/ice_switch.c:3431:26: warning: 
variable ‘sw’ set but not used [-Wunused-but-set-variable]
   struct ice_switch_info *sw;

>   
>   	if (!m_list || !hw)
>   		return -EINVAL;
>   
> -	s_rule = NULL;
>   	sw = hw->switch_info;
> -	rule_lock = &sw->recp_list[ICE_SW_LKUP_MAC].filt_rule_lock;
>   	list_for_each_entry(m_list_itr, m_list, list_entry) {
>   		u8 *add = &m_list_itr->fltr_info.l_data.mac.mac_addr[0];
>   		u16 vsi_handle;



More information about the Intel-wired-lan mailing list