From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31344 invoked by alias); 8 Dec 2008 16:30:50 -0000 Received: (qmail 31319 invoked by uid 22791); 8 Dec 2008 16:30:44 -0000 X-Spam-Check-By: sourceware.org Received: from mail04.solnet.ch (HELO mail04.solnet.ch) (212.101.4.138) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Dec 2008 16:30:01 +0000 Received: from mail04.solnet.ch ([127.0.0.1]) by localhost (mail04.solnet.ch [127.0.0.1]) (SolNet-Check, port 10024) with LMTP id m7LML05eLoFd for ; Mon, 8 Dec 2008 16:29:58 +0000 (UTC) Received: from beta.intefo.ch (static-212-101-18-64.adsl.solnet.ch [212.101.18.64]) by mail04.solnet.ch (Postfix) with ESMTP id 0954D8653E for ; Mon, 8 Dec 2008 16:29:58 +0000 (UTC) Received: from beta.intefo.ch ([127.0.0.1]) by localhost (beta.intefo.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jKT2ZhH8kjPV for ; Mon, 8 Dec 2008 17:29:57 +0100 (CET) Received: from [192.168.1.20] (simon.intefo.ch [192.168.1.20]) by beta.intefo.ch (Postfix) with ESMTP id 7C5FD7700EA for ; Mon, 8 Dec 2008 17:29:57 +0100 (CET) Message-ID: <493D4B8D.9070309@intefo.ch> Date: Mon, 08 Dec 2008 18:00:00 -0000 From: Simon Kallweit User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: eCos Disuss References: <493D2264.2050204@intefo.ch> In-Reply-To: <493D2264.2050204@intefo.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] lwIP 1.3 port X-SW-Source: 2008-12/txt/msg00065.txt.bz2 > > Single-threaded operation: > > In this mode, a single thread is used for all handling of the stack. > In the current port, the user needs to initialize lwIP "by hand", > setup timeouts etc. I would like to write some glue code to simplify > usage of lwIP in this mode. The glue code should implement an > initialization routine as well as the basic operation of the lwip > thread (similar to what the tcpip thread in the threaded version > provides). Basic timeouts of the protocols should automatically be > handled when enabled in the configuration, and ethernet drivers should > be polled. I would also like to integrate SLIP and PPP support. As > these have to run in a separate thread (for serial communication), we > need a simple queue to pass received packets to the main thread. After some more thought, the single thread implementation does not seem to be that easy. The main reason is that I need SLIP and PPP, not necessarily ethernet. The current lwIP implementation of PPP and SLIP depend on multiple threads though. SLIP does blocking reads on the serial device and PPP requires the sys_timeouts from lwIP for timeout handling. I guess they can be adapted for single threaded operation, but not without touching the lwIP code obviously. The SLIP code would have to be changed to non-blocking operation. This is rather simple. Porting PPP to single thread usage is rather a bit tricky though, but I still manageable. My current plan is to do the SLIP changes first, see how it works and then continue with PPP. Is there anyone interested in testing or helping out? 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