lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: [lwip-users] lwIP PPP for single threaded context


From: Wagner Hans-Jörg
Subject: AW: [lwip-users] lwIP PPP for single threaded context
Date: Fri, 2 Mar 2007 08:55:59 +0100

Thanks Clive

I assume its easyer to do it with a single threaded context. Well for the tcpip 
timers and the other things (callback API) I have a webserver example from a 
colleague of mine. But he did it with a CS8900 ethernet interface.

I think the best approach is to build an itermediate firmware with SLIP, which 
is much easyer than PPP. I hope then with this experience and the working IO 
routines, I will be able to solve the problem.

Regards
Hans-Joerg


-----Ursprüngliche Nachricht-----
Von: address@hidden im Auftrag von Clive Wilson
Gesendet: Do 01.03.2007 22:01
An: Mailing list for lwIP users
Betreff: Re: [lwip-users] lwIP PPP for single threaded context
 
At 08:49 01/03/2007, you wrote:
>On Wed, 2007-02-28 at 20:54 +0100, Wagner Hans-Jörg wrote:
>
> > The key question is: What should I do with the callback functions in
> > ppp.c if there is no tcpip thread pending on a mailbox? Why is there
> > the comment in ppp.c:
>
>We're suffering here at the moment from having, apparently, no
>developers who are particularly familiar with PPP in lwIP.  As a result
>there have been lots of questions about it recently without particularly
>satisfactory answers.  I expect this one might be another as I don't
>know a great deal about it and don't have enough time to familiarise
>myself with the PPP code.
>
>Is there anyone out there who feels they do know something about this
>and could help?

Well, I can tell you what I know and hope that can be of some use.

The ppp thread receives data from the serial line and checks the ppp frame 
header, FCS etc. If this is all OK then it is passed over to the tcpip 
thread for all onward processing via the sys_arch mailbox call, 
sys_mbox_post(). Sending of ppp packets is done completely in tcpip thread 
context. While no data is being received/processed by the two threads, the 
tcpip thread nevertheless has to service its timers which expire regularly 
(every 250ms if I recall correctly, and I think there are others too).

There may be a way of making the whole execution single-threaded, but I 
really can't help thinking that it would be easier to figure out how to do 
the job properly with the threads as they are, with your OS (you mention 
you are using OSE).

In my port, my OS uses semaphores to achieve the sys_mbox stuff, with 
shared memory to pass the mailbox message. Can a similar approach not be 
taken with OSE?

I hope this helps and that I haven't misunderstood the problem.

Kind regards,

Clive Wilson



_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

<<winmail.dat>>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]