[dpdk-stable] patch 'net/cxgbe: increase completion wait time for flow operations' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Thu Nov 29 14:20:09 CET 2018


Hi,

FYI, your patch has been queued to stable release 18.08.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/08/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From dd484e1a2ea80d57e0449a90730005b51a6246ec Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
Date: Fri, 9 Nov 2018 13:26:26 +0530
Subject: [PATCH] net/cxgbe: increase completion wait time for flow operations

[ upstream commit f1e9d2afea71d159406d8f9a9078aca9f40d713c ]

Under heavy load, flow related operations can take more time to
complete. Increase max completion wait time to 10 seconds. Also
increase max receive budget to read more replies from firmware
in every cycle.

Fixes: 9eb2c9a48072 ("net/cxgbe: implement flow create operation")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
---
 drivers/net/cxgbe/cxgbe_flow.c | 4 ++--
 drivers/net/cxgbe/cxgbe_flow.h | 5 +++--
 drivers/net/cxgbe/cxgbe_main.c | 8 ++++----
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index 9b3222147..6ec246c7a 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -538,5 +538,5 @@ static int __cxgbe_flow_create(struct rte_eth_dev *dev, struct rte_flow *flow)
 	/* Poll the FW for reply */
 	err = cxgbe_poll_for_completion(&adap->sge.fw_evtq,
-					CXGBE_FLOW_POLL_US,
+					CXGBE_FLOW_POLL_MS,
 					CXGBE_FLOW_POLL_CNT,
 					&ctx.completion);
@@ -623,5 +623,5 @@ static int __cxgbe_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
 	/* Poll the FW for reply */
 	err = cxgbe_poll_for_completion(&adap->sge.fw_evtq,
-					CXGBE_FLOW_POLL_US,
+					CXGBE_FLOW_POLL_MS,
 					CXGBE_FLOW_POLL_CNT,
 					&ctx.completion);
diff --git a/drivers/net/cxgbe/cxgbe_flow.h b/drivers/net/cxgbe/cxgbe_flow.h
index 0f7504745..0c0f16ad5 100644
--- a/drivers/net/cxgbe/cxgbe_flow.h
+++ b/drivers/net/cxgbe/cxgbe_flow.h
@@ -10,6 +10,7 @@
 #include "cxgbe.h"
 
-#define CXGBE_FLOW_POLL_US  10
-#define CXGBE_FLOW_POLL_CNT 10
+/* Max poll time is 100 * 100msec = 10 sec */
+#define CXGBE_FLOW_POLL_MS  100 /* 100 milliseconds */
+#define CXGBE_FLOW_POLL_CNT 100 /* Max number of times to poll */
 
 struct chrte_fparse {
diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
index c9b0758c6..d8705163c 100644
--- a/drivers/net/cxgbe/cxgbe_main.c
+++ b/drivers/net/cxgbe/cxgbe_main.c
@@ -152,5 +152,5 @@ out:
  * cxgbe_poll_for_completion: Poll rxq for completion
  * @q: rxq to poll
- * @us: microseconds to delay
+ * @ms: milliseconds to delay
  * @cnt: number of times to poll
  * @c: completion to check for 'done' status
@@ -159,9 +159,9 @@ out:
  * expires.
  */
-int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int us,
+int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int ms,
 			      unsigned int cnt, struct t4_completion *c)
 {
 	unsigned int i;
-	unsigned int work_done, budget = 4;
+	unsigned int work_done, budget = 32;
 
 	if (!c)
@@ -176,5 +176,5 @@ int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int us,
 		}
 		t4_os_unlock(&c->lock);
-		udelay(us);
+		rte_delay_ms(ms);
 	}
 	return -ETIMEDOUT;
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-29 13:11:35.251797770 +0000
+++ 0008-net-cxgbe-increase-completion-wait-time-for-flow-ope.patch	2018-11-29 13:11:34.000000000 +0000
@@ -1,15 +1,16 @@
-From f1e9d2afea71d159406d8f9a9078aca9f40d713c Mon Sep 17 00:00:00 2001
+From dd484e1a2ea80d57e0449a90730005b51a6246ec Mon Sep 17 00:00:00 2001
 From: Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
 Date: Fri, 9 Nov 2018 13:26:26 +0530
 Subject: [PATCH] net/cxgbe: increase completion wait time for flow operations
 
+[ upstream commit f1e9d2afea71d159406d8f9a9078aca9f40d713c ]
+
 Under heavy load, flow related operations can take more time to
 complete. Increase max completion wait time to 10 seconds. Also
 increase max receive budget to read more replies from firmware
 in every cycle.
 
 Fixes: 9eb2c9a48072 ("net/cxgbe: implement flow create operation")
-Cc: stable at dpdk.org
 
 Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
 ---
@@ -19,17 +20,17 @@
  3 files changed, 9 insertions(+), 8 deletions(-)
 
 diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
-index a8f076e6c..4deaff8f2 100644
+index 9b3222147..6ec246c7a 100644
 --- a/drivers/net/cxgbe/cxgbe_flow.c
 +++ b/drivers/net/cxgbe/cxgbe_flow.c
-@@ -798,5 +798,5 @@ static int __cxgbe_flow_create(struct rte_eth_dev *dev, struct rte_flow *flow)
+@@ -538,5 +538,5 @@ static int __cxgbe_flow_create(struct rte_eth_dev *dev, struct rte_flow *flow)
  	/* Poll the FW for reply */
  	err = cxgbe_poll_for_completion(&adap->sge.fw_evtq,
 -					CXGBE_FLOW_POLL_US,
 +					CXGBE_FLOW_POLL_MS,
  					CXGBE_FLOW_POLL_CNT,
  					&ctx.completion);
-@@ -884,5 +884,5 @@ static int __cxgbe_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
+@@ -623,5 +623,5 @@ static int __cxgbe_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *flow)
  	/* Poll the FW for reply */
  	err = cxgbe_poll_for_completion(&adap->sge.fw_evtq,
 -					CXGBE_FLOW_POLL_US,
@@ -37,10 +38,10 @@
  					CXGBE_FLOW_POLL_CNT,
  					&ctx.completion);
 diff --git a/drivers/net/cxgbe/cxgbe_flow.h b/drivers/net/cxgbe/cxgbe_flow.h
-index 718bf3d05..ec8e47aeb 100644
+index 0f7504745..0c0f16ad5 100644
 --- a/drivers/net/cxgbe/cxgbe_flow.h
 +++ b/drivers/net/cxgbe/cxgbe_flow.h
-@@ -11,6 +11,7 @@
+@@ -10,6 +10,7 @@
  #include "cxgbe.h"
  
 -#define CXGBE_FLOW_POLL_US  10
@@ -51,17 +52,17 @@
  
  struct chrte_fparse {
 diff --git a/drivers/net/cxgbe/cxgbe_main.c b/drivers/net/cxgbe/cxgbe_main.c
-index 409c9f821..ec080e5d3 100644
+index c9b0758c6..d8705163c 100644
 --- a/drivers/net/cxgbe/cxgbe_main.c
 +++ b/drivers/net/cxgbe/cxgbe_main.c
-@@ -158,5 +158,5 @@ out:
+@@ -152,5 +152,5 @@ out:
   * cxgbe_poll_for_completion: Poll rxq for completion
   * @q: rxq to poll
 - * @us: microseconds to delay
 + * @ms: milliseconds to delay
   * @cnt: number of times to poll
   * @c: completion to check for 'done' status
-@@ -165,9 +165,9 @@ out:
+@@ -159,9 +159,9 @@ out:
   * expires.
   */
 -int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int us,
@@ -73,7 +74,7 @@
 +	unsigned int work_done, budget = 32;
  
  	if (!c)
-@@ -182,5 +182,5 @@ int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int us,
+@@ -176,5 +176,5 @@ int cxgbe_poll_for_completion(struct sge_rspq *q, unsigned int us,
  		}
  		t4_os_unlock(&c->lock);
 -		udelay(us);


More information about the stable mailing list