mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] net: Bring up all interfaces before going interactive
Date: Fri, 16 Sep 2022 15:16:06 +0200	[thread overview]
Message-ID: <20220916131606.GZ6477@pengutronix.de> (raw)
In-Reply-To: <20220916124942.3751131-1-s.hauer@pengutronix.de>

On Fri, Sep 16, 2022 at 02:49:42PM +0200, Sascha Hauer wrote:
> So far we only bring up network interfaces when we actually need them.
> This means we could be idling in the shell for long and once the user
> decides to do networking he has to wait for the link to be established.
> We can do better: Before going interactive bring up all known network
> interfaces which makes the links established when the user needs them.
> 
> To implement this we have to rework carrier checking a bit, because
> otherwise barebox would wait for the links to be established before
> dropping to the shell.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  common/startup.c |  3 +++
>  include/net.h    |  3 +++
>  net/eth.c        | 34 +++++++++++++++++++++-------------
>  3 files changed, 27 insertions(+), 13 deletions(-)
> 
> diff --git a/common/startup.c b/common/startup.c
> index f53b73f81a..f63a0ae7d5 100644
> --- a/common/startup.c
> +++ b/common/startup.c
> @@ -37,6 +37,7 @@
>  #include <linux/ctype.h>
>  #include <watchdog.h>
>  #include <glob.h>
> +#include <net.h>
>  #include <bselftest.h>
>  
>  extern initcall_t __barebox_initcalls_start[], __barebox_early_initcalls_end[],
> @@ -208,6 +209,8 @@ enum autoboot_state do_autoboot_countdown(void)
>  				&outkey);
>  	command_slice_acquire();
>  
> +	eth_open_all();
> +

We could make the user experience even a bit better by doing this call
before waiting for the autoboot timeout which then speeds up netboot a
bit.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



  reply	other threads:[~2022-09-16 13:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-16 12:49 Sascha Hauer
2022-09-16 13:16 ` Sascha Hauer [this message]
2022-09-19 17:20   ` Trent Piepho
2022-09-20  7:41     ` Sascha Hauer
2022-09-20  9:47       ` Trent Piepho
2022-09-22  9:41         ` Sascha Hauer
2022-09-20  8:22 ` Marco Felsch

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=20220916131606.GZ6477@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.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