Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH S46 8/9] ice: fix aRFS after flow director delete
Date: Fri, 15 May 2020 17:55:05 -0700	[thread overview]
Message-ID: <20200516005506.5113-8-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20200516005506.5113-1-anthony.l.nguyen@intel.com>

From: Henry Tieman <henry.w.tieman@intel.com>

The logic was missing for adding back perfect flows after flow director
filter delete. The code now adds perfect flows into the HW tables after
filter delete.

Signed-off-by: Henry Tieman <henry.w.tieman@intel.com>
---
 .../net/ethernet/intel/ice/ice_ethtool_fdir.c | 27 ++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
index 22cc4167b974..b92017b8ae4a 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool_fdir.c
@@ -1363,6 +1363,31 @@ void ice_vsi_manage_fdir(struct ice_vsi *vsi, bool ena)
 	mutex_unlock(&hw->fdir_fltr_lock);
 }
 
+/**
+ * ice_fdir_do_rem_flow - delete flow and possibly add perfect flow
+ * @pf: PF structure
+ * @flow_type: FDir flow type to release
+ */
+static void
+ice_fdir_do_rem_flow(struct ice_pf *pf, enum ice_fltr_ptype flow_type)
+{
+	struct ice_hw *hw = &pf->hw;
+	bool need_perfect = false;
+
+	if (flow_type == ICE_FLTR_PTYPE_NONF_IPV4_TCP ||
+	    flow_type == ICE_FLTR_PTYPE_NONF_IPV4_UDP ||
+	    flow_type == ICE_FLTR_PTYPE_NONF_IPV6_TCP ||
+	    flow_type == ICE_FLTR_PTYPE_NONF_IPV6_UDP)
+		need_perfect = true;
+
+	if (need_perfect && test_bit(flow_type, hw->fdir_perfect_fltr))
+		return;
+
+	ice_fdir_rem_flow(hw, ICE_BLK_FD, flow_type);
+	if (need_perfect)
+		ice_create_init_fdir_rule(pf, flow_type);
+}
+
 /**
  * ice_fdir_update_list_entry - add or delete a filter from the filter list
  * @pf: PF structure
@@ -1393,7 +1418,7 @@ ice_fdir_update_list_entry(struct ice_pf *pf, struct ice_fdir_fltr *input,
 			/* we just deleted the last filter of flow_type so we
 			 * should also delete the HW filter info.
 			 */
-			ice_fdir_rem_flow(hw, ICE_BLK_FD, old_fltr->flow_type);
+			ice_fdir_do_rem_flow(pf, old_fltr->flow_type);
 		list_del(&old_fltr->fltr_node);
 		devm_kfree(ice_hw_to_dev(hw), old_fltr);
 	}
-- 
2.20.1


  parent reply	other threads:[~2020-05-16  0:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-16  0:54 [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host Tony Nguyen
2020-05-16  0:54 ` [Intel-wired-lan] [PATCH S46 2/9] ice: Always clear QRXFLXP_CNTXT before writing new value Tony Nguyen
2020-05-28 23:18   ` Bowers, AndrewX
2020-05-16  0:55 ` [Intel-wired-lan] [PATCH S46 3/9] ice: Fix inability to set channels when down Tony Nguyen
2020-05-28 23:18   ` Bowers, AndrewX
2020-05-16  0:55 ` [Intel-wired-lan] [PATCH S46 4/9] ice: Allow VF to request reset as soon as it's initialized Tony Nguyen
2020-05-28 23:18   ` Bowers, AndrewX
2020-05-16  0:55 ` [Intel-wired-lan] [PATCH S46 5/9] ice: fix function signature style format Tony Nguyen
2020-05-28 23:19   ` Bowers, AndrewX
2020-05-16  0:55 ` [Intel-wired-lan] [PATCH S46 6/9] ice: fix PCI device serial number to be lowercase values Tony Nguyen
2020-05-28 23:19   ` Bowers, AndrewX
2020-05-16  0:55 ` [Intel-wired-lan] [PATCH S46 7/9] ice: Use coalesce values from q_vector 0 when increasing q_vectors Tony Nguyen
2020-05-28 23:20   ` Bowers, AndrewX
2020-05-16  0:55 ` Tony Nguyen [this message]
2020-05-28 23:20   ` [Intel-wired-lan] [PATCH S46 8/9] ice: fix aRFS after flow director delete Bowers, AndrewX
2020-05-16  0:55 ` [Intel-wired-lan] [PATCH S46 9/9] ice: Ignore EMODE when setting PHY config Tony Nguyen
2020-05-28 23:21   ` Bowers, AndrewX
2020-05-28 23:17 ` [Intel-wired-lan] [PATCH S46 1/9] ice: Reset VF for all port VLAN changes from host Bowers, AndrewX

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=20200516005506.5113-8-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /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