Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: Jedrzej Jagielski <jedrzej.jagielski@intel.com>,
	<intel-wired-lan@lists.osuosl.org>
Cc: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Subject: Re: [Intel-wired-lan] [PATCH net-next v1] ice: Remove ucast_shared
Date: Tue, 26 Jul 2022 14:44:03 -0700	[thread overview]
Message-ID: <f87cf7d6-550b-11aa-6823-dea85ddbfb7c@intel.com> (raw)
In-Reply-To: <20220726085007.989536-1-jedrzej.jagielski@intel.com>



On 7/26/2022 1:50 AM, Jedrzej Jagielski wrote:
> From: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
> 
> Remove ucast_shared as it was always true. Remove the code depending on
> ucast_shared from ice_add_mac and ice_remove_mac.
> Remove ice_find_ucast_rule_entry function as it was only
> used when ucast_shared was set to false.
> 
> Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
> Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
> ---
>   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   |   2 -
>   3 files changed, 5 insertions(+), 163 deletions(-)
> 
> diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
> index 47046c0bc93e..da212fbbd9d9 100644
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -4748,8 +4748,6 @@ ice_probe(struct pci_dev *pdev, const struct pci_device_id __always_unused *ent)
>   		ice_set_safe_mode_caps(hw);
>   	}
>   
> -	hw->ucast_shared = true;
> -
>   	err = ice_init_pf(pf);
>   	if (err) {
>   		dev_err(dev, "ice_init_pf failed: %d\n", err);
> diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
> index 66d1e17896a6..b7e9b270b6a7 100644
> --- a/drivers/net/ethernet/intel/ice/ice_switch.c
> +++ b/drivers/net/ethernet/intel/ice/ice_switch.c
> @@ -3295,31 +3295,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 ucast_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;

../drivers/net/ethernet/intel/ice/ice_switch.c: In function ‘ice_add_mac’:
../drivers/net/ethernet/intel/ice/ice_switch.c:3302:26: warning: 
variable ‘sw’ set but not used [-Wunused-but-set-variable]
   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;
>   
>   	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;

_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

      reply	other threads:[~2022-07-26 21:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26  8:50 [Intel-wired-lan] [PATCH net-next v1] ice: Remove ucast_shared Jedrzej Jagielski
2022-07-26 21:44 ` Tony Nguyen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f87cf7d6-550b-11aa-6823-dea85ddbfb7c@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jedrzej.jagielski@intel.com \
    --cc=sylwesterx.dziedziuch@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox