netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Tiago Maluta <tiago.maluta@gmail.com>
Cc: linux-net@vger.kernel.org, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org
Subject: Re: [RFC][PATCH] Allow change timing values to wait slow devices bring up  before try register an interface to IP-Config
Date: Tue, 9 Feb 2010 21:51:20 -0800	[thread overview]
Message-ID: <20100209215120.ac46ff7c.akpm@linux-foundation.org> (raw)
In-Reply-To: <600adaf51002091947ta095cc5g7174684f57488e94@mail.gmail.com>


On Wed, 10 Feb 2010 03:47:59 +0000 Tiago Maluta <tiago.maluta@gmail.com> wrote:
>
> 

Please cc netdev@vger.kernel.org on net patches - linux-net@vger is not
used for development.

> diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
> index dd9a09c..12fbe4a 100644
> --- a/drivers/net/Kconfig
> +++ b/drivers/net/Kconfig
> @@ -38,6 +38,24 @@ config IFB
>  	  'ifb1' etc.
>  	  Look at the iproute2 documentation directory for usage etc
> 
> +config NETDEVICES_DELAY_PRE_OPEN
> +	int "Define the delay before opening net devices (ms)"
> +	depends on NETDEVICES
> +	default 500
> +	help
> +	    Some devices may not work properly due to a delay from hardware bring
> +	    the interface up. This value add a delay, in miilliseconds, before

typo.

> +	    kernel search and register the interface. Default value is 500ms.
> +
> +config NETDEVICES_DELAY_POST_OPEN
> +	int "Define the delay after opening net devices (s)"
> +	depends on NETDEVICES
> +	default 1
> +	help
> +	    Some devices may not work properly due to a delay from hardware bring
> +	    the interface up. This value add a delay, in seconds, after
> +	    kernel search and register the interface. Default value is 1s.
> +
>  config DUMMY
>  	tristate "Dummy net driver support"
>  	---help---
> diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
> index 10a6a60..2530126 100644
> --- a/net/ipv4/ipconfig.c
> +++ b/net/ipv4/ipconfig.c
> @@ -86,8 +86,8 @@
>  #endif
> 
>  /* Define the friendly delay before and after opening net devices */
> -#define CONF_PRE_OPEN		500	/* Before opening: 1/2 second */
> -#define CONF_POST_OPEN		1	/* After opening: 1 second */
> +#define CONF_PRE_OPEN		CONFIG_NETDEVICES_DELAY_PRE_OPEN	/* Before
> opening. Default is 1/2 second */
> +#define CONF_POST_OPEN		CONFIG_NETDEVICES_DELAY_POST_OPEN	/* After
> opening. Default is 1 second */

Your email client wordwrapped this.

Using delays was dumb of us, but I guess the problem is difficult.

It would be much better to configure this delay at runtime rather than
at compile time.  Perhaps with new kernel boot parameters, perhaps by
extending the ip= argument.

       reply	other threads:[~2010-02-10  5:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <600adaf51002091947ta095cc5g7174684f57488e94@mail.gmail.com>
2010-02-10  5:51 ` Andrew Morton [this message]
2010-02-10  7:04   ` [RFC][PATCH] Allow change timing values to wait slow devices bring up before try register an interface to IP-Config David Miller
     [not found] <600adaf51002091944t25a36090s5cb002098c201fc6@mail.gmail.com>
2010-02-10  7:01 ` David Miller

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=20100209215120.ac46ff7c.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-net@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tiago.maluta@gmail.com \
    /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).