diff mbox

[next,S62,4/6] i40e: Check for new arq elements before leaving the adminq subtask loop

Message ID 1489177325-13156-5-git-send-email-bimmy.pujari@intel.com
State Accepted
Delegated to: Jeff Kirsher
Headers show

Commit Message

Pujari, Bimmy March 10, 2017, 8:22 p.m. UTC
From: "Christopher Bednarz" <christopher.n.bednarz@intel.com>

Fix a case where we miss an arq element if a new one is added before we
enable interrupts and exit the arq subtask loop. This occurs frequently
with Rdma running on Windows VF and causes long delays that prevent SMB
from establishing connections.

Signed-off-by: Christopher N Bednarz <christopher.n.bednarz@intel.com>
Change-ID: I3e1c8b2b960c12857d9b8275bea2c1563674392e
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Bowers, AndrewX March 21, 2017, 11:27 p.m. UTC | #1
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Friday, March 10, 2017 12:22 PM
> To: intel-wired-lan@lists.osuosl.org
> Cc: Bednarz, Christopher N <christopher.n.bednarz@intel.com>
> Subject: [Intel-wired-lan] [next PATCH S62 4/6] i40e: Check for new arq
> elements before leaving the adminq subtask loop
> 
> From: "Christopher Bednarz" <christopher.n.bednarz@intel.com>
> 
> Fix a case where we miss an arq element if a new one is added before we
> enable interrupts and exit the arq subtask loop. This occurs frequently with
> Rdma running on Windows VF and causes long delays that prevent SMB from
> establishing connections.
> 
> Signed-off-by: Christopher N Bednarz <christopher.n.bednarz@intel.com>
> Change-ID: I3e1c8b2b960c12857d9b8275bea2c1563674392e
> ---
>  drivers/net/ethernet/intel/i40e/i40e_main.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)


Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
diff mbox

Patch

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 804f41a..bab9337 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6524,9 +6524,11 @@  static void i40e_clean_adminq_subtask(struct i40e_pf *pf)
 				 opcode);
 			break;
 		}
-	} while (pending && (i++ < pf->adminq_work_limit));
+	} while (i++ < pf->adminq_work_limit);
+
+	if (i < pf->adminq_work_limit)
+		clear_bit(__I40E_ADMINQ_EVENT_PENDING, &pf->state);
 
-	clear_bit(__I40E_ADMINQ_EVENT_PENDING, &pf->state);
 	/* re-enable Admin queue interrupt cause */
 	val = rd32(hw, I40E_PFINT_ICR0_ENA);
 	val |=  I40E_PFINT_ICR0_ENA_ADMINQ_MASK;