From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id F3F151B4AA for ; Thu, 29 Nov 2018 14:21:50 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6307B76227; Thu, 29 Nov 2018 13:21:50 +0000 (UTC) Received: from ktraynor.remote.csb (ovpn-117-230.ams2.redhat.com [10.36.117.230]) by smtp.corp.redhat.com (Postfix) with ESMTP id 307E81001F50; Thu, 29 Nov 2018 13:21:48 +0000 (UTC) From: Kevin Traynor To: Rahul Lakkireddy Cc: dpdk stable Date: Thu, 29 Nov 2018 13:20:09 +0000 Message-Id: <20181129132128.7609-9-ktraynor@redhat.com> In-Reply-To: <20181129132128.7609-1-ktraynor@redhat.com> References: <20181129132128.7609-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 29 Nov 2018 13:21:50 +0000 (UTC) Subject: [dpdk-stable] patch 'net/cxgbe: increase completion wait time for flow operations' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Nov 2018 13:21:51 -0000 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 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 --- 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 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@dpdk.org Signed-off-by: Rahul Lakkireddy --- @@ -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);