From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30501 invoked by alias); 22 Jul 2009 10:34:46 -0000 Received: (qmail 24674 invoked by uid 22791); 22 Jul 2009 10:31:51 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00,SARE_FREE_WEBM_RuMail,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from kuber.nabble.com (HELO kuber.nabble.com) (216.139.236.158) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Jul 2009 10:31:39 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1MTZ6m-0002fQ-UN for ecos-devel@ecos.sourceware.org; Wed, 22 Jul 2009 03:31:36 -0700 Message-ID: <24603788.post@talk.nabble.com> Date: Wed, 22 Jul 2009 10:34:00 -0000 From: MaxiD To: ecos-devel@ecos.sourceware.org Subject: Re: lwIP port status In-Reply-To: <4A1173B6.5000805@intefo.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: <4A1173B6.5000805@intefo.ch> X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2009-07/txt/msg00009.txt.bz2 Simon Kallweit wrote: > > Hi > > It's time for a little status update on the lwIP 1.3.x port. Let me give > you a little list of what has been done lately: > > * CDL should include every configuration option offered by lwIP now, was > reviewed by John Dallaway and got restructured and cleaned up afterwards. > * Implemented 'Sequential' mode. > * Updated to the latest lwIP sources from CVS again. > * Reviewed test cases. > * Cleanup, cleanup, cleanup. > > What's left to do is lots of testing and writing documentation etc. I > think it would be great to finish the port when lwIP hits the 1.3.1 > release which should not be too far from now. If time permits, I may > also work a bit on PPP. > > For now I would like to shortly discuss my 'Sequential' implementation. > In 'Sequential' mode, lwIP is configured with NO_SYS == 0 and allows for > multiple threads to use the stack (netcomm, sockets). The main thread > (tcpip) is basically used to synchronize all threads accessing the stack > by sequentially processing incoming messages on a message queue. When a > packet arrives on an interface, a message pointing to the packet is sent > to the message queue. This is what is done with the SLIP interface for > example. SLIP is running in it's own thread, reading from the serial > device (blocked). When a packet is received, it is passed to the tcpip > thread by posting a message to the message queue. This way the packet is > processed in sync with the tcpip thread. For ethernet devices I choose > another path. The old port implemented a separate ethernet delivery > thread which would wait on a semaphore for packets to arrive. It would > wake up when a packet arrives and read it from the interface and send a > message to the tcpip thread. In my port I got rid of the delivery thread > and implemented sending/receiving as follows: > > When a packet is sent, lwIP assumes that after the call to output the > packet, the packet is no longer access by the driver and can be > released. This means that the packet should be sent before the call > returns -> blocking, or packets would have to be copied and put in a > queue, which I think does not make much sense. I therefore implemented > sending to be blocking. > > Receiving packets could be done in parallel to the tcpip thread, but > packets still have to be processed in sync to the tcpip thread. I choose > a really simple route. When a packet arrives, a callback is registered > with the tcpip thread, which is called back as soon as ongoing > processing in the tcpip thread is finished. The callback then reads all > the pending packets from the ethernet devices and directly processes them. > > What do people think of this approach? Is it feasible or completely > broken? :) > > Anybody cares to do some testing of the new lwIP port? > > Simon > > Hello Simon, I get errors with mboxes with older versions so I would test your port. Would you please send me the link to your port?? Thanks & best regards Max -- View this message in context: http://www.nabble.com/lwIP-port-status-tp23598717p24603788.html Sent from the Sourceware - ecos-devel mailing list archive at Nabble.com.