[Intel-wired-lan] [PATCH net v4] ice: Fix VSIs unable to share unicast MAC

kernel test robot lkp at intel.com
Mon Jul 18 09:37:00 UTC 2022


Hi Jedrzej,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Jedrzej-Jagielski/ice-Fix-VSIs-unable-to-share-unicast-MAC/20220718-150030
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 11052589cf5c0bab3b4884d423d5f60c38fcf25d
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220718/202207181711.LUIFqImA-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/b3781a141e58204a573a255b21f3f7f8faecba58
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Jedrzej-Jagielski/ice-Fix-VSIs-unable-to-share-unicast-MAC/20220718-150030
        git checkout b3781a141e58204a573a255b21f3f7f8faecba58
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/ethernet/intel/ice/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/intel/ice/ice_switch.c: In function 'ice_remove_mac':
>> drivers/net/ethernet/intel/ice/ice_switch.c:3973:21: warning: unused variable 'add' [-Wunused-variable]
    3973 |                 u8 *add = &list_itr->fltr_info.l_data.mac.mac_addr[0];
         |                     ^~~
   drivers/net/ethernet/intel/ice/ice_switch.c:3965:23: warning: variable 'rule_lock' set but not used [-Wunused-but-set-variable]
    3965 |         struct mutex *rule_lock; /* Lock to protect filter rule list */
         |                       ^~~~~~~~~
   At top level:
   drivers/net/ethernet/intel/ice/ice_switch.c:3930:1: warning: 'ice_find_ucast_rule_entry' defined but not used [-Wunused-function]
    3930 | ice_find_ucast_rule_entry(struct ice_hw *hw, u8 recp_id,
         | ^~~~~~~~~~~~~~~~~~~~~~~~~


vim +/add +3973 drivers/net/ethernet/intel/ice/ice_switch.c

8b2c858240aca4 Akeem G Abodunrin      2019-07-25  3948  
d76a60ba7afb89 Anirudh Venkataramanan 2018-03-20  3949  /**
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3950   * ice_remove_mac - remove a MAC address based filter rule
d76a60ba7afb89 Anirudh Venkataramanan 2018-03-20  3951   * @hw: pointer to the hardware structure
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3952   * @m_list: list of MAC addresses and forwarding information
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3953   *
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3954   * This function removes either a MAC filter rule or a specific VSI from a
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3955   * VSI list for a multicast MAC address.
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3956   *
5518ac2a64423f Tony Nguyen            2021-10-07  3957   * Returns -ENOENT if a given entry was not added by ice_add_mac. Caller should
5518ac2a64423f Tony Nguyen            2021-10-07  3958   * be aware that this call will only work if all the entries passed into m_list
5518ac2a64423f Tony Nguyen            2021-10-07  3959   * were added previously. It will not attempt to do a partial remove of entries
5518ac2a64423f Tony Nguyen            2021-10-07  3960   * that were found.
d76a60ba7afb89 Anirudh Venkataramanan 2018-03-20  3961   */
5e24d5984c805c Tony Nguyen            2021-10-07  3962  int ice_remove_mac(struct ice_hw *hw, struct list_head *m_list)
d76a60ba7afb89 Anirudh Venkataramanan 2018-03-20  3963  {
072f0c3db9daf7 Dave Ertman            2018-09-19  3964  	struct ice_fltr_list_entry *list_itr, *tmp;
8b2c858240aca4 Akeem G Abodunrin      2019-07-25  3965  	struct mutex *rule_lock; /* Lock to protect filter rule list */
d76a60ba7afb89 Anirudh Venkataramanan 2018-03-20  3966  
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3967  	if (!m_list)
d54699e27d506f Tony Nguyen            2021-10-07  3968  		return -EINVAL;
d76a60ba7afb89 Anirudh Venkataramanan 2018-03-20  3969  
8b2c858240aca4 Akeem G Abodunrin      2019-07-25  3970  	rule_lock = &hw->switch_info->recp_list[ICE_SW_LKUP_MAC].filt_rule_lock;
072f0c3db9daf7 Dave Ertman            2018-09-19  3971  	list_for_each_entry_safe(list_itr, tmp, m_list, list_entry) {
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3972  		enum ice_sw_lkup_type l_type = list_itr->fltr_info.lkup_type;
8b2c858240aca4 Akeem G Abodunrin      2019-07-25 @3973  		u8 *add = &list_itr->fltr_info.l_data.mac.mac_addr[0];
8b2c858240aca4 Akeem G Abodunrin      2019-07-25  3974  		u16 vsi_handle;
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3975  
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3976  		if (l_type != ICE_SW_LKUP_MAC)
d54699e27d506f Tony Nguyen            2021-10-07  3977  			return -EINVAL;
8b2c858240aca4 Akeem G Abodunrin      2019-07-25  3978  
8b2c858240aca4 Akeem G Abodunrin      2019-07-25  3979  		vsi_handle = list_itr->fltr_info.vsi_handle;
8b2c858240aca4 Akeem G Abodunrin      2019-07-25  3980  		if (!ice_is_vsi_valid(hw, vsi_handle))
d54699e27d506f Tony Nguyen            2021-10-07  3981  			return -EINVAL;
8b2c858240aca4 Akeem G Abodunrin      2019-07-25  3982  
8b2c858240aca4 Akeem G Abodunrin      2019-07-25  3983  		list_itr->fltr_info.fwd_id.hw_vsi_id =
8b2c858240aca4 Akeem G Abodunrin      2019-07-25  3984  					ice_get_hw_vsi_num(hw, vsi_handle);
b3781a141e5820 Anirudh Venkataramanan 2022-07-18  3985  
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3986  		list_itr->status = ice_remove_rule_internal(hw,
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3987  							    ICE_SW_LKUP_MAC,
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3988  							    list_itr);
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3989  		if (list_itr->status)
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3990  			return list_itr->status;
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3991  	}
80d144c9ac82fd Anirudh Venkataramanan 2018-08-09  3992  	return 0;
d76a60ba7afb89 Anirudh Venkataramanan 2018-03-20  3993  }
d76a60ba7afb89 Anirudh Venkataramanan 2018-03-20  3994  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp


More information about the Intel-wired-lan mailing list