public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Mandeep Sandhu <mandeepsandhu.chd@gmail.com>
To: Simon Kallweit <simon.kallweit@intefo.ch>
Cc: ecos-discuss <ecos-discuss@ecos.sourceware.org>
Subject: Re: [ECOS] ecos + lwip
Date: Wed, 02 Sep 2009 13:19:00 -0000	[thread overview]
Message-ID: <b18c5f790909020619w1719f551l9c6f24a86ccdab06@mail.gmail.com> (raw)
In-Reply-To: <b18c5f790909012315y337f3a6ah349af3ff410e0ac1@mail.gmail.com>

On Wed, Sep 2, 2009 at 11:45 AM, Mandeep
Sandhu<mandeepsandhu.chd@gmail.com> wrote:
>>
>> You need to wait for cyg_lwip_sequential_init() to return before creating
>> user threads.
>
> That should be happening since I'm calling cyg_lwip_sequential_init() before
> even creating my own thread!
>
> <snip>
>
> cyg_lwip_sequential_init();
>
> cyg_lwip_thread_new( "My thread", m_main, (void *)"My thread",
> my_stack, 0x1000, 5 );
> ...
> ...
> <snip>
>
> I'll enable more debugs to see where it's getting stuck.

Hi Simon,

I think I've partially fixed the issue. While going through the default config
I noticed that the TCPIP thread's default priority is set to 8. Which was lower
than my threads prio - 5.

After changing it to 2, it's able to find the interface (et0) with all
the right settings.

Now another problem has cropped up! :) Sorry.

My app's actually a DHCP server. So it receives DHCP packets with 0.0.0.0
as the src IP. However, the stack is dropping them with the following message:

ip_input: iphdr->dest 0xffffffff netif->ip_addr 0x101010b (0xffffff,
0x1010b, 0xff000000)
ip_input: packet accepted on interface et
ip_input: packet source is not valid.

I've enabled the following in my config:

* Support broadcast filter
* Receive support

Is anything else needed?

Just one more thing:

While tracing the path from  cyg_lwip_sequential_init() to see what
all happens, I saw that
we end up calling lwip_init() twice!

Once in cyg_lwip_sequential_init() and then again in tcpip_init().

Why do we do it twice? The only function called between these 2 calls is
cyg_semaphore_init().

I think we can remove one of these. Or am I missing something?

Thanks,
-mandeep

>
>>
>> Simon
>>
>

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

  reply	other threads:[~2009-09-02 13:19 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-26 11:01 Mandeep Sandhu
2009-08-26 11:16 ` Simon Kallweit
2009-08-27 10:49   ` Mandeep Sandhu
2009-08-27 11:17     ` Simon Kallweit
2009-08-27 12:42       ` Mandeep Sandhu
2009-08-27 13:20         ` Mandeep Sandhu
2009-08-27 13:42           ` Simon Kallweit
2009-08-27 13:51             ` Mandeep Sandhu
2009-08-27 14:02               ` Mandeep Sandhu
2009-08-27 14:06                 ` Simon Kallweit
2009-08-27 14:47                   ` Sergei Gavrikov
2009-08-27 15:03                     ` Sergei Gavrikov
2009-09-01 12:04                   ` Mandeep Sandhu
2009-09-01 12:17                     ` Simon Kallweit
2009-09-01 12:32                       ` Mandeep Sandhu
2009-09-01 12:38                         ` Simon Kallweit
2009-09-01 12:49                           ` Mandeep Sandhu
2009-09-01 12:57                             ` Simon Kallweit
2009-09-01 13:25                               ` Mandeep Sandhu
2009-09-01 13:34                                 ` Simon Kallweit
2009-09-01 15:20                                   ` Mandeep Sandhu
2009-09-01 15:32                                     ` Simon Kallweit
2009-09-01 15:46                                       ` Mandeep Sandhu
2009-09-01 15:49                                         ` Simon Kallweit
2009-09-02  6:15                                           ` Mandeep Sandhu
2009-09-02 13:19                                             ` Mandeep Sandhu [this message]
2009-09-02 15:32                                               ` Simon Kallweit
2009-09-03  7:45                                                 ` Mandeep Sandhu
2009-09-03  8:36                                                   ` Simon Kallweit
2009-09-03  8:46                                                     ` Mandeep Sandhu
2009-09-03  8:48                                                       ` Simon Kallweit
2009-09-03  8:55                                                         ` Mandeep Sandhu
2009-09-03  9:04                                                           ` Simon Kallweit
2009-09-03 10:23                                                             ` Mandeep Sandhu
2009-09-03 10:46                                                               ` Sergei Gavrikov
2009-08-27 13:52             ` Sergei Gavrikov
2009-08-27 14:05               ` Simon Kallweit
2009-08-27 14:42             ` Bart Veer
2009-08-27 14:54               ` Sergei Gavrikov
2009-08-27 13:45           ` Sergei Gavrikov
2009-08-27 13:49             ` Mandeep Sandhu
2009-08-27 14:04             ` Simon Kallweit
  -- strict thread matches above, loose matches on Subject: below --
2009-08-27 14:20 agfa prayoga s
     [not found] <144735.17263.qm@web65404.mail.ac4.yahoo.com>
2009-08-27 14:11 ` Simon Kallweit
2009-07-30 13:10 Mandeep Sandhu
2009-07-30 13:51 ` Sergei Gavrikov
2009-07-31  5:44   ` Mandeep Sandhu
2009-07-31 18:56     ` Sergei Gavrikov
2009-08-02 17:24       ` Mandeep Sandhu

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=b18c5f790909020619w1719f551l9c6f24a86ccdab06@mail.gmail.com \
    --to=mandeepsandhu.chd@gmail.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=simon.kallweit@intefo.ch \
    /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).