netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: YOSHIFUJI Hideaki <hideaki.yoshifuji@miraclelinux.com>
To: Mugunthan V N <mugunthanvnm@ti.com>, netdev@vger.kernel.org
Cc: hideaki.yoshifuji@miraclelinux.com,
	"David S . Miller" <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	James Morris <jmorris@namei.org>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	Patrick McHardy <kaber@trash.net>
Subject: Re: [RFC PATCH] net: ipv4: increase dhcp inter device timeout
Date: Fri, 07 Aug 2015 16:15:46 +0900	[thread overview]
Message-ID: <55C45B22.1090909@miraclelinux.com> (raw)
In-Reply-To: <1438928970-23908-1-git-send-email-mugunthanvnm@ti.com>

Hi,

Mugunthan V N wrote:
> When a system has multiple ethernet devices and during DHCP
> request (for using NFS), the system waits only for HZ/2 which is
> 500mS before switching to another interface for DHCP.
> 
> There are some routers (Ex: Trendnet routers) which responds to
> DHCP request at about 560mS. When the system has only one
> ethernet interface there is no issue as the timeout is 2S and the
> dev xid doesn't change and only retries.
> 
> But when the system has multiple Ethernet like DRA74x with CPSW
> in dual EMAC mode, the DHCP response is dropped as the dev xid
> changes while shifting to the next device. So changing inter
> device timeout to HZ (which is 1S).
> 
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> ---
>  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 8e7328c..bdb8cb5 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/2)	/* Inter-device timeout: 1/2 second */
> +#define CONF_INTER_TIMEOUT	(HZ)	/* Inter-device timeout: 1/2 second */

You should update comment as well at least.

--yoshfuji

>  #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 */
> 

-- 
Hideaki Yoshifuji <hideaki.yoshifuji@miraclelinux.com>
Technical Division, MIRACLE LINUX CORPORATION

  reply	other threads:[~2015-08-07  7:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07  6:29 [RFC PATCH] net: ipv4: increase dhcp inter device timeout Mugunthan V N
2015-08-07  7:15 ` YOSHIFUJI Hideaki [this message]
2015-08-10  5:00   ` Mugunthan V N

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55C45B22.1090909@miraclelinux.com \
    --to=hideaki.yoshifuji@miraclelinux.com \
    --cc=davem@davemloft.net \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=mugunthanvnm@ti.com \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).