lwip-users
[Top][All Lists]
Advanced

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

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


From: Clive Wilson
Subject: Re: [lwip-users] lwIP PPP for single threaded context
Date: Thu, 01 Mar 2007 21:01:20 +0000

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





reply via email to

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