From patchwork Thu Apr 25 13:23:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patryk Mungai X-Patchwork-Id: 10916995 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0E85B1515 for ; Thu, 25 Apr 2019 13:23:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0F6D28CE7 for ; Thu, 25 Apr 2019 13:23:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF22628CE1; Thu, 25 Apr 2019 13:23:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 862C528C67 for ; Thu, 25 Apr 2019 13:23:55 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 068981E56; Thu, 25 Apr 2019 13:23:55 +0000 (UTC) X-Original-To: cip-dev@lists.cip-project.org Delivered-To: cip-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 1A7681DE4 for ; Thu, 25 Apr 2019 13:23:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id 72B1874A for ; Thu, 25 Apr 2019 13:23:21 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.60,393,1549897200"; d="scan'208";a="14322923" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 25 Apr 2019 22:23:20 +0900 Received: from patryk-linuxbox.ree.adwin.renesas.com (unknown [10.226.36.113]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id 3162F404DC46; Thu, 25 Apr 2019 22:23:19 +0900 (JST) From: Patryk Mungai To: cip-dev@lists.cip-project.org Date: Thu, 25 Apr 2019 14:23:11 +0100 Message-Id: <1556198591-5414-2-git-send-email-patryk.mungai-ndungu.kx@renesas.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556198591-5414-1-git-send-email-patryk.mungai-ndungu.kx@renesas.com> References: <1556198591-5414-1-git-send-email-patryk.mungai-ndungu.kx@renesas.com> Subject: [cip-dev] [PATCH 4.4.y] Increase DHCP inter-device timeout X-BeenThere: cip-dev@lists.cip-project.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: cip-dev-bounces@lists.cip-project.org Errors-To: cip-dev-bounces@lists.cip-project.org X-Virus-Scanned: ClamAV using ClamSMTP If multiple networking devices are enabled, the current implementation of the DHCP client is to request a DHCP address on one device, listen for responses on that device for one second, and if no response is received in that time, repeat on the next device. This means if a DHCP server takes over a second to reply, the client will not be able to process the reply. This commit increases the inter-device timeout to 2 seconds, to give the DHCP server more time to reply. Signed-off-by: Patryk Mungai --- net/ipv4/ipconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 60f564d..fbe966d 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c @@ -94,7 +94,7 @@ /* Define the timeout for waiting for a DHCP/BOOTP/RARP reply */ #define CONF_OPEN_RETRIES 2 /* (Re)open devices twice */ #define CONF_SEND_RETRIES 6 /* Send six requests per open */ -#define CONF_INTER_TIMEOUT (HZ) /* Inter-device timeout: 1 second */ +#define CONF_INTER_TIMEOUT (HZ*2) /* Inter-device timeout: 2 seconds */ #define CONF_BASE_TIMEOUT (HZ*2) /* Initial timeout: 2 seconds */ #define CONF_TIMEOUT_RANDOM (HZ) /* Maximum amount of randomization */ #define CONF_TIMEOUT_MULT *7/4 /* Rate of timeout growth */