From: Alice Michael <alice.michael@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [next PATCH S87 V2 7/7] i40e: restore TCPv4 input set when re-enabling ATR
Date: Mon, 26 Feb 2018 03:33:11 -0500 [thread overview]
Message-ID: <20180226083311.52442-7-alice.michael@intel.com> (raw)
In-Reply-To: <20180226083311.52442-1-alice.michael@intel.com>
From: Jacob Keller <jacob.e.keller@intel.com>
When we re-enable ATR we need to restore the input set for TCPv4
filters, in order for ATR to function correctly. We already do this for
the normal case of re-enabling ATR when disabling ntuple support.
However, when re-enabling ATR after the last tcp4 filter is removed (but
when ntuple support is still active), we did not restore the TCPv4
filter input set.
This can cause problems if the TCPv4 filters from FDir had changed the
input set, as ATR will no longer behave as expected.
When clearing the ATR auto-disable flag, make sure we restore the TCPv4
input set to avoid this.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 08a01e7..8a0d48c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -8167,6 +8167,15 @@ static void i40e_reenable_fdir_sb(struct i40e_pf *pf)
static void i40e_reenable_fdir_atr(struct i40e_pf *pf)
{
if (pf->flags & I40E_FLAG_FD_ATR_AUTO_DISABLED) {
+ /* ATR uses the same filtering logic as SB rules. It only
+ * functions properly if the input set mask is at the default
+ * settings. It is safe to restore the default input set
+ * because there are no active TCPv4 filter rules.
+ */
+ i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_NONF_IPV4_TCP,
+ I40E_L3_SRC_MASK | I40E_L3_DST_MASK |
+ I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
+
pf->flags &= ~I40E_FLAG_FD_ATR_AUTO_DISABLED;
if ((pf->flags & I40E_FLAG_FD_ATR_ENABLED) &&
(I40E_DEBUG_FD & pf->hw.debug_mask))
--
2.9.5
prev parent reply other threads:[~2018-02-26 8:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 8:33 [Intel-wired-lan] [next PATCH S87 V2 1/7] i40e: Fix attach VF to VM issue Alice Michael
2018-02-26 8:33 ` [Intel-wired-lan] [next PATCH S87 V2 2/7] i40e: rename i40e_vlan_rx_register to i40e_setup_vlan_stripping Alice Michael
2018-02-26 17:51 ` Shannon Nelson
2018-02-26 18:15 ` Keller, Jacob E
2018-02-26 8:33 ` [Intel-wired-lan] [next PATCH S87 V2 3/7] i40e: Fix permission check for VF MAC filters Alice Michael
2018-02-26 17:51 ` Shannon Nelson
2018-02-26 8:33 ` [Intel-wired-lan] [next PATCH S87 V2 4/7] i40e: track filter type statistics when deleting invalid filters Alice Michael
2018-02-26 8:33 ` [Intel-wired-lan] [next PATCH S87 V2 5/7] i40e: factor out re-enable functions for ATR and SB Alice Michael
2018-02-26 8:33 ` [Intel-wired-lan] [next PATCH S87 V2 6/7] i40e: fix for wrong partition id calculation on OCP mezz cards Alice Michael
2018-02-26 8:33 ` Alice Michael [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=20180226083311.52442-7-alice.michael@intel.com \
--to=alice.michael@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