Skip to content

Commit 089915f

Browse files
jacob-kellerJeff Kirsher
authored andcommitted
i40e: restore TCPv4 input set when re-enabling ATR
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 TCPv4 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 <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent bc2a3a6 commit 089915f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8156,6 +8156,15 @@ static void i40e_reenable_fdir_sb(struct i40e_pf *pf)
81568156
static void i40e_reenable_fdir_atr(struct i40e_pf *pf)
81578157
{
81588158
if (pf->flags & I40E_FLAG_FD_ATR_AUTO_DISABLED) {
8159+
/* ATR uses the same filtering logic as SB rules. It only
8160+
* functions properly if the input set mask is at the default
8161+
* settings. It is safe to restore the default input set
8162+
* because there are no active TCPv4 filter rules.
8163+
*/
8164+
i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_NONF_IPV4_TCP,
8165+
I40E_L3_SRC_MASK | I40E_L3_DST_MASK |
8166+
I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
8167+
81598168
pf->flags &= ~I40E_FLAG_FD_ATR_AUTO_DISABLED;
81608169
if ((pf->flags & I40E_FLAG_FD_ATR_ENABLED) &&
81618170
(I40E_DEBUG_FD & pf->hw.debug_mask))

0 commit comments

Comments
 (0)