From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Gora Subject: [PATCH 06/10] kni: increase length of timeout for KNI responses Date: Thu, 28 Jun 2018 15:53:13 -0700 Message-ID: <20180628225313.20959-1-dg@adax.com> Cc: dev@dpdk.org, Dan Gora To: Ferruh Yigit Return-path: Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by dpdk.org (Postfix) with ESMTP id 4EC021B14C for ; Fri, 29 Jun 2018 00:53:21 +0200 (CEST) Received: by mail-oi0-f45.google.com with SMTP id 18-v6so6756475oiq.6 for ; Thu, 28 Jun 2018 15:53:21 -0700 (PDT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Increase the timeout to receive a response for KNI events handled through kni_net_process_request to 10 seconds. Certain actions, such as calling rte_eth_dev_start() can take more than 3 seconds to return, in addition to any additional time needed for the DPDK application to call rte_kni_handle_request(). Signed-off-by: Dan Gora --- kernel/linux/kni/kni_net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/linux/kni/kni_net.c b/kernel/linux/kni/kni_net.c index 7fcfa106c..0850be434 100644 --- a/kernel/linux/kni/kni_net.c +++ b/kernel/linux/kni/kni_net.c @@ -25,7 +25,7 @@ #define WD_TIMEOUT 5 /*jiffies */ -#define KNI_WAIT_RESPONSE_TIMEOUT 300 /* 3 seconds */ +#define KNI_WAIT_RESPONSE_TIMEOUT 10 /* 10 seconds */ /* typedef for rx function */ typedef void (*kni_net_rx_t)(struct kni_dev *kni); @@ -101,7 +101,8 @@ kni_net_process_request(struct kni_dev *kni, struct rte_kni_request *req) } ret_val = wait_event_interruptible_timeout(kni->wq, - kni_fifo_count(kni->resp_q), 3 * HZ); + kni_fifo_count(kni->resp_q), + KNI_WAIT_RESPONSE_TIMEOUT * HZ); if (signal_pending(current) || ret_val <= 0) { ret = -ETIME; goto fail; -- 2.18.0.rc1.1.g6f333ff2f