From: Wojciech Drewek <wojciech.drewek@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: pmenzel@molgen.mpg.de, netdev@vger.kernel.org, vladbu@nvidia.com,
kuba@kernel.org, simon.horman@corigine.com,
dan.carpenter@linaro.org
Subject: [Intel-wired-lan] [PATCH iwl-next v6 01/12] ice: Skip adv rules removal upon switchdev release
Date: Wed, 12 Jul 2023 13:03:26 +0200 [thread overview]
Message-ID: <20230712110337.8030-2-wojciech.drewek@intel.com> (raw)
In-Reply-To: <20230712110337.8030-1-wojciech.drewek@intel.com>
Advanced rules for ctrl VSI will be removed anyway when the
VSI will cleaned up, no need to do it explicitly.
Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Wojciech Drewek <wojciech.drewek@intel.com>
---
v5: remove ice_rem_adv_rule_for_vsi since it is unused
---
drivers/net/ethernet/intel/ice/ice_eswitch.c | 1 -
drivers/net/ethernet/intel/ice/ice_switch.c | 53 --------------------
drivers/net/ethernet/intel/ice/ice_switch.h | 1 -
3 files changed, 55 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.c b/drivers/net/ethernet/intel/ice/ice_eswitch.c
index ad0a007b7398..be5b22691f7c 100644
--- a/drivers/net/ethernet/intel/ice/ice_eswitch.c
+++ b/drivers/net/ethernet/intel/ice/ice_eswitch.c
@@ -503,7 +503,6 @@ static void ice_eswitch_disable_switchdev(struct ice_pf *pf)
ice_eswitch_napi_disable(pf);
ice_eswitch_release_env(pf);
- ice_rem_adv_rule_for_vsi(&pf->hw, ctrl_vsi->idx);
ice_eswitch_release_reprs(pf, ctrl_vsi);
ice_vsi_release(ctrl_vsi);
ice_repr_rem_from_all_vfs(pf);
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.c b/drivers/net/ethernet/intel/ice/ice_switch.c
index 8f84c041ebc1..b9b1aab735f6 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.c
+++ b/drivers/net/ethernet/intel/ice/ice_switch.c
@@ -6668,59 +6668,6 @@ ice_rem_adv_rule_by_id(struct ice_hw *hw,
return -ENOENT;
}
-/**
- * ice_rem_adv_rule_for_vsi - removes existing advanced switch rules for a
- * given VSI handle
- * @hw: pointer to the hardware structure
- * @vsi_handle: VSI handle for which we are supposed to remove all the rules.
- *
- * This function is used to remove all the rules for a given VSI and as soon
- * as removing a rule fails, it will return immediately with the error code,
- * else it will return success.
- */
-int ice_rem_adv_rule_for_vsi(struct ice_hw *hw, u16 vsi_handle)
-{
- struct ice_adv_fltr_mgmt_list_entry *list_itr, *tmp_entry;
- struct ice_vsi_list_map_info *map_info;
- struct ice_adv_rule_info rinfo;
- struct list_head *list_head;
- struct ice_switch_info *sw;
- int status;
- u8 rid;
-
- sw = hw->switch_info;
- for (rid = 0; rid < ICE_MAX_NUM_RECIPES; rid++) {
- if (!sw->recp_list[rid].recp_created)
- continue;
- if (!sw->recp_list[rid].adv_rule)
- continue;
-
- list_head = &sw->recp_list[rid].filt_rules;
- list_for_each_entry_safe(list_itr, tmp_entry, list_head,
- list_entry) {
- rinfo = list_itr->rule_info;
-
- if (rinfo.sw_act.fltr_act == ICE_FWD_TO_VSI_LIST) {
- map_info = list_itr->vsi_list_info;
- if (!map_info)
- continue;
-
- if (!test_bit(vsi_handle, map_info->vsi_map))
- continue;
- } else if (rinfo.sw_act.vsi_handle != vsi_handle) {
- continue;
- }
-
- rinfo.sw_act.vsi_handle = vsi_handle;
- status = ice_rem_adv_rule(hw, list_itr->lkups,
- list_itr->lkups_cnt, &rinfo);
- if (status)
- return status;
- }
- }
- return 0;
-}
-
/**
* ice_replay_vsi_adv_rule - Replay advanced rule for requested VSI
* @hw: pointer to the hardware structure
diff --git a/drivers/net/ethernet/intel/ice/ice_switch.h b/drivers/net/ethernet/intel/ice/ice_switch.h
index 8ca9bfcafab4..b75488ede83f 100644
--- a/drivers/net/ethernet/intel/ice/ice_switch.h
+++ b/drivers/net/ethernet/intel/ice/ice_switch.h
@@ -393,7 +393,6 @@ int
ice_set_vlan_vsi_promisc(struct ice_hw *hw, u16 vsi_handle, u8 promisc_mask,
bool rm_vlan_promisc);
-int ice_rem_adv_rule_for_vsi(struct ice_hw *hw, u16 vsi_handle);
int
ice_rem_adv_rule_by_id(struct ice_hw *hw,
struct ice_rule_query_data *remove_entry);
--
2.40.1
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2023-07-12 11:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 11:03 [Intel-wired-lan] [PATCH iwl-next v6 00/12] ice: switchdev bridge offload Wojciech Drewek
2023-07-12 11:03 ` Wojciech Drewek [this message]
2023-07-22 6:43 ` [Intel-wired-lan] [PATCH iwl-next v6 01/12] ice: Skip adv rules removal upon switchdev release Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 02/12] ice: Prohibit rx mode change in switchdev mode Wojciech Drewek
2023-07-22 6:44 ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 03/12] ice: Don't tx before switchdev is fully configured Wojciech Drewek
2023-07-22 6:44 ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 04/12] ice: Disable vlan pruning for uplink VSI Wojciech Drewek
2023-07-22 6:45 ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 05/12] ice: Unset src prune on " Wojciech Drewek
2023-07-22 6:46 ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 06/12] ice: Implement basic eswitch bridge setup Wojciech Drewek
2023-07-22 6:47 ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 07/12] ice: Switchdev FDB events support Wojciech Drewek
2023-07-22 6:48 ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 08/12] ice: Add guard rule when creating FDB in switchdev Wojciech Drewek
2023-07-22 6:48 ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 09/12] ice: Add VLAN FDB support in switchdev mode Wojciech Drewek
2023-07-22 6:49 ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 10/12] ice: implement bridge port vlan Wojciech Drewek
2023-07-22 6:50 ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 11/12] ice: implement static version of ageing Wojciech Drewek
2023-07-22 6:51 ` Buvaneswaran, Sujai
2023-07-12 11:03 ` [Intel-wired-lan] [PATCH iwl-next v6 12/12] ice: add tracepoints for the switchdev bridge Wojciech Drewek
2023-07-22 6:52 ` Buvaneswaran, Sujai
2023-07-12 16:47 ` [Intel-wired-lan] [PATCH iwl-next v6 00/12] ice: switchdev bridge offload Vlad Buslov
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=20230712110337.8030-2-wojciech.drewek@intel.com \
--to=wojciech.drewek@intel.com \
--cc=dan.carpenter@linaro.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pmenzel@molgen.mpg.de \
--cc=simon.horman@corigine.com \
--cc=vladbu@nvidia.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