diff options
author | Akeem G Abodunrin <akeem.g.abodunrin@intel.com> | 2014-10-16 23:14:41 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-11-03 04:15:41 -0500 |
commit | 1790ed0c65c114b6d262963bb054526697728815 (patch) | |
tree | 358ba254aab5c9600fd5b615009f1cb6bd5662bf /drivers/net/ethernet/intel/i40e/i40e_main.c | |
parent | 55b42b5ca2dcf143465968697fe6c6503b05fca1 (diff) |
i40e: Add condition to enter fdir flush and reinit
When FD_SB/ATR are not enabled, do not allow flow director flush
and reinit.
Change-ID: Iafe261c1862992981615815551abd1ed9fada0a8
Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
Signed-off-by: Patrick Lu <patrick.lu@intel.com>
Tested-by: <jamesx.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_main.c')
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index 834c9ffc6267..0eccd8222727 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
@@ -5211,6 +5211,9 @@ static void i40e_fdir_flush_and_replay(struct i40e_pf *pf) | |||
5211 | int flush_wait_retry = 50; | 5211 | int flush_wait_retry = 50; |
5212 | int reg; | 5212 | int reg; |
5213 | 5213 | ||
5214 | if (!(pf->flags & (I40E_FLAG_FD_SB_ENABLED | I40E_FLAG_FD_ATR_ENABLED))) | ||
5215 | return; | ||
5216 | |||
5214 | if (time_after(jiffies, pf->fd_flush_timestamp + | 5217 | if (time_after(jiffies, pf->fd_flush_timestamp + |
5215 | (I40E_MIN_FD_FLUSH_INTERVAL * HZ))) { | 5218 | (I40E_MIN_FD_FLUSH_INTERVAL * HZ))) { |
5216 | set_bit(__I40E_FD_FLUSH_REQUESTED, &pf->state); | 5219 | set_bit(__I40E_FD_FLUSH_REQUESTED, &pf->state); |
@@ -5272,6 +5275,9 @@ static void i40e_fdir_reinit_subtask(struct i40e_pf *pf) | |||
5272 | if (test_bit(__I40E_DOWN, &pf->state)) | 5275 | if (test_bit(__I40E_DOWN, &pf->state)) |
5273 | return; | 5276 | return; |
5274 | 5277 | ||
5278 | if (!(pf->flags & (I40E_FLAG_FD_SB_ENABLED | I40E_FLAG_FD_ATR_ENABLED))) | ||
5279 | return; | ||
5280 | |||
5275 | if ((pf->fd_add_err >= I40E_MAX_FD_PROGRAM_ERROR) && | 5281 | if ((pf->fd_add_err >= I40E_MAX_FD_PROGRAM_ERROR) && |
5276 | (i40e_get_current_atr_cnt(pf) >= pf->fd_atr_cnt) && | 5282 | (i40e_get_current_atr_cnt(pf) >= pf->fd_atr_cnt) && |
5277 | (i40e_get_current_atr_cnt(pf) > pf->fdir_pf_filter_count)) | 5283 | (i40e_get_current_atr_cnt(pf) > pf->fdir_pf_filter_count)) |