From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com [209.85.218.51]) by dpdk.org (Postfix) with ESMTP id A40F31B533 for ; Fri, 29 Jun 2018 03:55:56 +0200 (CEST) Received: by mail-oi0-f51.google.com with SMTP id s198-v6so3174770oih.11 for ; Thu, 28 Jun 2018 18:55:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=yk6ajylhCv2817isDp+jSmjdtU2ydbjBdyBIiIlc2qs=; b=L/Mnb74PBtl8hc2gWIzw57gMOiF0Fd0BdZHeY99QY8VhrJGN/1Ci/YYt4VWWAn1aKg KT/bTVVN2RLIk7U984GhXESJGbLoxSn3OdqnEC0hxKHapz6KMjfkKM8TRKLWudA8DkXg e3RxWWzalvDkN10Aeb1BuAK3vZfuk4PZqSBXnMwHKAWTcne10oLV7L7nszVToJmXRC9z PXRV2XPLSpSNGwrUZW9q5XELWa4F3Qs8o2jwsVbKpfHychMp3xumRh01Si7nfIwIshtQ I4++WlL0TCTutwcRFLorK5No4ivLk+3Bn95Brs5zeuHcp58VaxninI1Jzp4wvcXW5TsP 14Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=yk6ajylhCv2817isDp+jSmjdtU2ydbjBdyBIiIlc2qs=; b=hzux9rcTlaQJQOcwMwevVC0qUmQOr5s9ZESaZaDXDjtnosSG6YV7HzAw86b1Zg5FX3 eGgtVjCn496g+HlhsJkyrhvtnyF7s3WLQF/Yun7L54yFOeI0xC6mC6wcbtAxwzgp+mNO DaVowgwXCPqI9MnXYZndtTdFkxEuRIWezLue8xKyML62LpQsJSqPXWv1Iee5O3H4dBDn EUpot1xDple85IOM4cfwNeUN4tIo/xH8GTy8vMpWocWSlS4PDN34VsY1NVrRy7ajNJqO ezMLJsTIEnRPGvj+3ow9kBEXTbo8IUPXOcVbC4MkAifgUW6Nd0ZhU9rcvreZGZ0c8A64 +vPQ== X-Gm-Message-State: APt69E3ewVClqejpVDfEd0NZr0crGmre5sqjWlvI4QFfsr9xQPvH/ajt Yk7dYIo+7bKwflL8A4qITAxrqA== X-Google-Smtp-Source: AAOMgpfDrJd7NGXa6lverjOk3p/mk5WAPEsUWgsXRbUVirjxowlMTAYjZus6kZtKItstkHX+GCiUxw== X-Received: by 2002:aca:e142:: with SMTP id y63-v6mr7546022oig.128.1530237355886; Thu, 28 Jun 2018 18:55:55 -0700 (PDT) Received: from linux.adax.com (172-11-198-60.lightspeed.sntcca.sbcglobal.net. [172.11.198.60]) by smtp.gmail.com with ESMTPSA id n3-v6sm3941288otk.38.2018.06.28.18.55.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jun 2018 18:55:55 -0700 (PDT) Sender: Dan Gora From: Dan Gora To: ferruh.yigit@intel.com Cc: dev@dpdk.org, Dan Gora Date: Thu, 28 Jun 2018 18:55:04 -0700 Message-Id: <20180629015508.26599-7-dg@adax.com> X-Mailer: git-send-email 2.18.0.rc1.1.g6f333ff2f In-Reply-To: <20180629015508.26599-1-dg@adax.com> References: <20180628224513.18391-1-dg@adax.com> <20180629015508.26599-1-dg@adax.com> Subject: [dpdk-dev] [PATCH v2 06/10] kni: increase length of timeout for KNI responses X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jun 2018 01:55:57 -0000 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