public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Jonathan Larmour <jifl@jifvik.org>
To: Grant Edwards <grant.b.edwards@gmail.com>
Cc: eCos discussion <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS]  Re: connect ethernet cable at run-time
Date: Sun, 27 Sep 2009 22:06:00 -0000	[thread overview]
Message-ID: <4ABFE1DD.8060604@jifvik.org> (raw)
In-Reply-To: <h9il0s$pv3$2@ger.gmane.org>

Grant Edwards wrote:
> On 2009-09-25, Jonathan Larmour <jifl@jifvik.org> wrote:
>>But yes that does confirm that an unplugged cable at startup
>>means no IP address unless the user calls
>>init_all_network_interfaces again.
>>
>>In this respect, the DHCP code wants improvement.
> 
> 
> I can't think of any use-cases for our products where the DHCP
> client should ever give up.  Telling customers they have to
> guarantee the power-up sequence of various portions of their
> plant to make our DHCP client happy isn't really an option. ;)
> 
> Am I missing something?  Are there situations where giving up
> on acquiring an address is the right thing to do?

On reflection, I think the choice may well have been intentional - simply 
a case of saying "let the user decide" (where user==eCos user). It may not 
be relevant to retry - maybe something else should be done instead.

The init_all_network_interfaces() call is meant to be idempotent, so I 
think all you're meant to do is pretty much what Laurie is doing and call 
it periodically, if that's what you need.

I don't believe you even need to check the interface status (unless you 
want to). After all the high level interface status (the interface is 
'up', 'running', has an IP address, a DHCP lease etc.) doesn't reflect the 
low level status (PHY knows there's a link) so it's not like you can ever 
guarantee any connectivity. Which you can't anyway as the remote host or 
an intermediate hop after the local eth switch may be down anyway.

Even then, init_all_network_interfaces() is meant to be a convenience 
function, and nothing stops someone bringing up the interfaces themselves 
(using the existing init_all_network_interfaces() as a template if need be).

Jifl
-- 
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  parent reply	other threads:[~2009-09-27 22:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 10:34 [ECOS] " Lars Dahlin
2009-09-24 11:45 ` Edgar Grimberg
2009-09-24 14:42 ` [ECOS] " Grant Edwards
2009-09-24 16:26   ` Jonathan Larmour
2009-09-24 16:32     ` Grant Edwards
2009-09-25  0:11       ` Jonathan Larmour
2009-09-25  1:23         ` Laurie Gellatly
2009-09-25  3:20           ` Grant Edwards
2009-09-25  3:36             ` Laurie Gellatly
2009-09-25 13:16           ` Jonathan Larmour
2009-09-25 14:54             ` Grant Edwards
2009-09-26  8:12               ` [ECOS] Re: connect Ethernet " Laurie Gellatly
     [not found]               ` <26548.8079087392$1253952764@news.gmane.org>
2009-09-26 15:11                 ` Grant Edwards
2009-09-27 22:06               ` Jonathan Larmour [this message]
2009-09-25  3:12         ` [ECOS] Re: connect ethernet " Grant Edwards

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=4ABFE1DD.8060604@jifvik.org \
    --to=jifl@jifvik.org \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=grant.b.edwards@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 read-only IMAP folder(s) and NNTP newsgroup(s).