[dpdk-stable] patch 'net/ice/base: remove unused code in switch rule' has been queued to stable release 19.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 19 15:03:10 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/21/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From af84a4f27830d3355ca2ab25414a398f337e9610 Mon Sep 17 00:00:00 2001
From: Qi Zhang <qi.z.zhang at intel.com>
Date: Tue, 7 Apr 2020 08:25:23 +0800
Subject: [PATCH] net/ice/base: remove unused code in switch rule

[ upstream commit 3e1374f201910220bc60e1160994104d1bfc3125 ]

Update a switch rule' action from "to VSI" to "to VSI List"
should only happen when the same rule has been programmed with
a different fwd destination. This is already handled by below
code block:

m_entry = ice_find_adv_rule_entry(...)
if (m_entry) {
	...
	ice_adv_add_update_vsi_list(...)
}

The following ice_update_pkt_fwd_rule is unnecessary and should be
removed due to:
1) If a switch rule's action is still to VSI, which means, it is
   the first time be issued,  we don't need to update it "to VSI
   List."
2) Actually the implementation does not match the comment, it still
   update the rule with "to VSI" action.

Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")

Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye at intel.com>
---
 drivers/net/ice/base/ice_switch.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
index 9c8f20eb0a..944d98522b 100644
--- a/drivers/net/ice/base/ice_switch.c
+++ b/drivers/net/ice/base/ice_switch.c
@@ -6241,24 +6241,8 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
 	sw->recp_list[rid].adv_rule = true;
 	rule_head = &sw->recp_list[rid].filt_rules;
 
-	if (rinfo->sw_act.fltr_act == ICE_FWD_TO_VSI) {
-		struct ice_fltr_info tmp_fltr;
-
-		ice_memset(&tmp_fltr, 0, sizeof(tmp_fltr), ICE_NONDMA_MEM);
-		tmp_fltr.fltr_rule_id =
-			LE16_TO_CPU(s_rule->pdata.lkup_tx_rx.index);
-		tmp_fltr.fltr_act = ICE_FWD_TO_VSI;
-		tmp_fltr.fwd_id.hw_vsi_id =
-			ice_get_hw_vsi_num(hw, vsi_handle);
-		tmp_fltr.vsi_handle = vsi_handle;
-		/* Update the previous switch rule of "forward to VSI" to
-		 * "fwd to VSI list"
-		 */
-		status = ice_update_pkt_fwd_rule(hw, &tmp_fltr);
-		if (status)
-			goto err_ice_add_adv_rule;
+	if (rinfo->sw_act.fltr_act == ICE_FWD_TO_VSI)
 		adv_fltr->vsi_count = 1;
-	}
 
 	/* Add rule entry to book keeping list */
 	LIST_ADD(&adv_fltr->list_entry, rule_head);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-05-19 14:04:46.750947550 +0100
+++ 0055-net-ice-base-remove-unused-code-in-switch-rule.patch	2020-05-19 14:04:44.200648083 +0100
@@ -1,8 +1,10 @@
-From 3e1374f201910220bc60e1160994104d1bfc3125 Mon Sep 17 00:00:00 2001
+From af84a4f27830d3355ca2ab25414a398f337e9610 Mon Sep 17 00:00:00 2001
 From: Qi Zhang <qi.z.zhang at intel.com>
 Date: Tue, 7 Apr 2020 08:25:23 +0800
 Subject: [PATCH] net/ice/base: remove unused code in switch rule
 
+[ upstream commit 3e1374f201910220bc60e1160994104d1bfc3125 ]
+
 Update a switch rule' action from "to VSI" to "to VSI List"
 should only happen when the same rule has been programmed with
 a different fwd destination. This is already handled by below
@@ -23,7 +25,6 @@
    update the rule with "to VSI" action.
 
 Fixes: fed0c5ca5f19 ("net/ice/base: support programming a new switch recipe")
-Cc: stable at dpdk.org
 
 Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
 Acked-by: Xiaolong Ye <xiaolong.ye at intel.com>
@@ -32,10 +33,10 @@
  1 file changed, 1 insertion(+), 17 deletions(-)
 
 diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c
-index b5aa5abd9f..07f8efd651 100644
+index 9c8f20eb0a..944d98522b 100644
 --- a/drivers/net/ice/base/ice_switch.c
 +++ b/drivers/net/ice/base/ice_switch.c
-@@ -6695,24 +6695,8 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
+@@ -6241,24 +6241,8 @@ ice_add_adv_rule(struct ice_hw *hw, struct ice_adv_lkup_elem *lkups,
  	sw->recp_list[rid].adv_rule = true;
  	rule_head = &sw->recp_list[rid].filt_rules;
  


More information about the stable mailing list