lwip-users
[Top][All Lists]
Advanced

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

RE : [lwip-users] Sys_timeouts


From: Frédéric BERNON
Subject: RE : [lwip-users] Sys_timeouts
Date: Thu, 24 May 2007 08:50:07 +0200

Hi Mumtaz,

It's interesting for me. Can you tell me if your measures are on a NXP 
platform? Pnx1500, pnx1700? Other thing?

You talk about "Mbps full duplex communication". What kind of protocols do you 
use? Something on TCP, UDP (some RTP/UDP?)
  
====================================
Frédéric BERNON 
HYMATOM SA 
Chef de projet informatique 
Microsoft Certified Professional 
Tél. : +33 (0)4-67-87-61-10 
Fax. : +33 (0)4-67-70-85-44 
Email : address@hidden 
Web Site : http://www.hymatom.fr 
====================================
P Avant d'imprimer, penser à l'environnement
 


-----Message d'origine-----
De : address@hidden [mailto:address@hidden De la part de Mumtaz Ahmad
Envoyé : jeudi 24 mai 2007 06:37
À : Mailing list for lwIP users
Objet : Re: [lwip-users] Sys_timeouts


Hi
lwIP provides two Application Program's Interfaces (APIs) the sequential API 
(BSD style) and the raw TCP/IP interface. If you are trying to use the 
sequential API then you need to implement the OS abstraction layer which is 
more or less sys_arch.c However one can implement his own Sequential API using 
raw TCP/IP interface .Using raw TCP/IP interface is very simple 
http://www.sics.se/~adam/lwip/doc/rawapi.txt

Though it takes time to make your own Sequential API layer but it gives you 
choice to make a robust interface depending on your needs and requirements. I 
dont know but its my feeling that current sequential interface is a bit slow ,i 
may be wrong . By implementing my own layer i have achieved more than 40Mbps 
full duplex communication with windows and linux servers on a 100 Mbps Lan . I 
dont know whats the best figures with sequential API. Using just the lwip core 
and implementing my own infrastructure around it is helping me to play around 
with the stack quite comfortably.

Best Regards
Mumtaz Ahmad



----- Original Message ----- 
From: "Bilahari Akkiraju" <address@hidden>
To: <address@hidden>
Sent: Thursday, May 24, 2007 6:57 AM
Subject: [lwip-users] Sys_timeouts


>
> Hello all, thank you for answers to my queries. I still don't get the
complete idea of sys_timeouts. The documentation says it's a linked list of 
structures per thread that is used by lwip timeout scheduler. Where and with 
what should I populate this linked list.
>
>      One more thing I don't understand is why is sys_arch_mbox_fetch 
> there
but not sys_arch_mbox_post ?.
>
> I am  running on a bare platform and I have my own working OS services 
> (
scheduler, semaphores, message queues) and I feel that I should have my own 
sys.c, ie my own API layer so that I need not worry about timeouts. Is sys.c 
the api layer you were talking about when you said "if you have your own API 
layer, you can ignore timeouts". ?
>
> Thanks
> Bilahari
>
> -----Original Message-----
> From: address@hidden
[mailto:address@hidden On Behalf Of address@hidden
> Sent: Wednesday, May 23, 2007 2:33 AM
> To: address@hidden
> Subject: lwip-users Digest, Vol 45, Issue 26
>
> Send lwip-users mailing list submissions to address@hidden
>
> To subscribe or unsubscribe via the World Wide Web, visit 
> http://lists.nongnu.org/mailman/listinfo/lwip-users
> or, via email, send a message with subject or body 'help' to 
> address@hidden
>
> You can reach the person managing the list at 
> address@hidden
>
> When replying, please edit your Subject line so it is more specific 
> than
"Re: Contents of lwip-users digest..."
>
>
> Today's Topics:
>
>    1. RE: Example port for a beginner (Goldschmidt Simon)
>    2. RE: Antw: RE: [lwip-users] pbuf_header fails in etharp_output
>       (Kieran Mansley)
>    3. RE: Example port for a beginner (Goldschmidt Simon)
>    4. RE : [lwip-users] Example port for a beginner (Fr?d?ric BERNON)
>    5. RE: RE : [lwip-users] Example port for a beginner
>       (Goldschmidt Simon)
>    6. RE: RE : [lwip-users] Example port for a beginner (Kieran Mansley)
>    7. RE : tcp ack problem (Fr?d?ric BERNON)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 23 May 2007 09:48:55 +0200
> From: "Goldschmidt Simon" <address@hidden>
> Subject: RE: [lwip-users] Example port for a beginner
> To: "Mailing list for lwIP users" <address@hidden>
> Message-ID: 
> <address@hidden>
> Content-Type: text/plain; charset="us-ascii"
>
> > 2. Can I port lwip stack without implementing sys_arch.c at all. I
> mean without impelementing semaphore and mailbox funcs.
>
> For that you have to set NO_SYS to 1 in lwipopts.h but you can only 
> use
the callback API then (no sockets, no netconn API). You also don't need the 
sys_arch.h and sys_arch.c file (if you take other ports as an example).
>
> > 3 . Should I change or add some stuff in sys.c like in sys_arch.c.
>
> You should not need to change sys.c! sys_arch.c is dependent on your 
> OS.
>
>
> Simon
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 23 May 2007 09:04:39 +0100
> From: Kieran Mansley <address@hidden>
> Subject: RE: Antw: RE: [lwip-users] pbuf_header fails in etharp_output
> To: Mailing list for lwIP users <address@hidden>
> Message-ID: <address@hidden>
> Content-Type: text/plain
>
> On Wed, 2007-05-23 at 08:19 +0200, Matthias Weisser wrote:
> > >>>> that there is room at the front for the necessary headers.  I 
> > >>>> suppose if your ethernet driver was being very efficient and 
> > >>>> had stripped off the ethernet header before creating the pbuf, 
> > >>>> this might not be the case.  Can you show how you're
> > >>>
> > >>> Yes, that's what I am doing.
> > >>>
> > >> In that case it's technically the fault of lwIP and we should 
> > >> perhaps change our ICMP to not do this (or at least check the 
> > >> pbuf to see if it's OK before it does).  If you'd rather not work 
> > >> around it, please file a bug so that it will eventually get 
> > >> fixed.
> > >
> > > Yes, please file a bug report!
> >
> > About what? That ip_input fails if the IP header is not 4 byte 
> > aligned? Or that etharp_output fails if there is no room at the 
> > beginning of a p_buf to store the ethernet header?
>
> That ICMP assumes the pbuf you give it has space for a ethernet header 
> at
the front.
>
> Kieran
>
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 23 May 2007 10:46:45 +0200
> From: "Goldschmidt Simon" <address@hidden>
> Subject: RE: [lwip-users] Example port for a beginner
> To: "Mailing list for lwIP users" <address@hidden>
> Message-ID: 
> <address@hidden>
> Content-Type: text/plain; charset="us-ascii"
>
> > 4    Yes sys_timeouts  is pretty confusing but if you implement your
> own api layer then you can ignore it all together
>
> That's not exactly true: if NO_SYS=0, you
> a) have to supply a function in sys_arch.c (if NO_SYS=0) that returns 
> a
pointer to a list of timeouts that is unique for the current thread
> B) have to make sure the value returned by sys_arch_mbox_wait() (and
> sys_arch_sem_wait()) is correct (the number of miliseconds waited for 
> a
message)!
>
> If you want to know more about timeouts: it is a linked list including
function pointers and values of miliseconds to wait before calling the 
function. When waiting for a message in an mbox, the time waited is substracted 
from the first timeout, and if that time is 0, the timeout function is called 
and the first item is popped off the list.
> This mechanism only works if NO_SYS=0 since otherwise, you don't have
mboxes. But if you have mboxes, you kind of get the timeout functionality for 
free.
> The downside of this approach is that the timing is pretty inaccurate. 
> If you have many messages in the mbox and you will not have to wait on 
> any
message, sys_arch_mbox_wait() will always return 0 since it didn't have to wait 
for the message. That way timeouts will not be called.
> Another bad example are some ports that always return 1 when waiting 
> for a
message and 0 if a message was available right away. That of course leads to 
totally inaccurate timeouts.
>
>
> Simon
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 23 May 2007 10:56:05 +0200
> From: Fr?d?ric BERNON <address@hidden>
> Subject: RE : [lwip-users] Example port for a beginner
> To: "Mailing list for lwIP users" <address@hidden>
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset="iso-8859-1"
>
> >That's not exactly true...
> I suppose that Mumtaz talk to a "full" api layer, even without 
> api_msg.c &
tcpip.c, so, I think in this case, it''s right
>
> >If you want to know more about timeouts:
> It's a good explain, I think it will be good to copy/paste it in
sys_arch.txt and sys.c...
>
> ====================================
> Frédéric BERNON
> HYMATOM SA
> Chef de projet informatique
> Microsoft Certified Professional
> Tél. : +33 (0)4-67-87-61-10
> Fax. : +33 (0)4-67-70-85-44
> Email : address@hidden
> Web Site : http://www.hymatom.fr ====================================
> P Avant d'imprimer, penser à l'environnement
>
>
>
> -----Message d'origine-----
> De : address@hidden
[mailto:address@hidden De la part
de Goldschmidt Simon Envoyé : mercredi 23 mai 2007 10:47 À : Mailing list
for lwIP users Objet : RE: [lwip-users] Example port for a beginner
>
>
> > 4    Yes sys_timeouts  is pretty confusing but if you implement your
> own api layer then you can ignore it all together
>
> That's not exactly true: if NO_SYS=0, you
> a) have to supply a function in sys_arch.c (if NO_SYS=0) that returns a
pointer to a list of timeouts that is unique for the current thread
> B) have to make sure the value returned by sys_arch_mbox_wait() (and
> sys_arch_sem_wait()) is correct (the number of miliseconds waited for a
message)!
>
> If you want to know more about timeouts: it is a linked list including
function pointers and values of miliseconds to wait before calling the
function. When waiting for a message in an mbox, the time waited is
substracted from the first timeout, and if that time is 0, the timeout
function is called and the first item is popped off the list. This mechanism
only works if NO_SYS=0 since otherwise, you don't have mboxes. But if you
have mboxes, you kind of get the timeout functionality for free. The
downside of this approach is that the timing is pretty inaccurate. If you
have many messages in the mbox and you will not have to wait on any message,
sys_arch_mbox_wait() will always return 0 since it didn't have to wait for
the message. That way timeouts will not be called. Another bad example are
some ports that always return 1 when waiting for a message and 0 if a
message was available right away. That of course leads to totally inaccurate
timeouts.
>
>
> Simon
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden http://lists.nongnu.org/mailman/listinfo/lwip-users
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: =?iso-8859-1?Q?Fr=E9d=E9ric_BERNON=2Evcf?=
> Type: text/x-vcard
> Size: 589 bytes
> Desc: =?iso-8859-1?Q?Fr=E9d=E9ric_BERNON=2Evcf?=
> Url :
http://lists.gnu.org/pipermail/lwip-users/attachments/20070523/0dd0299d/iso-8859-1QFrE9dE9ric_BERNON2Evcf.vcf
>
> ------------------------------
>
> Message: 5
> Date: Wed, 23 May 2007 11:12:58 +0200
> From: "Goldschmidt Simon" <address@hidden>
> Subject: RE: RE : [lwip-users] Example port for a beginner
> To: "Mailing list for lwIP users" <address@hidden>
> Message-ID:
> <address@hidden>
> Content-Type: text/plain; charset="us-ascii"
>
>
> > >That's not exactly true...
> > I suppose that Mumtaz talk to a "full" api layer, even without
> > api_msg.c & tcpip.c, so, I think in this case, it''s right
>
> That's what I meant with "if NO_SYS=0". But you're right, maybe for a
beginner, that's not as clear as I wanted it to be...
>
> >
> > >If you want to know more about timeouts:
> > It's a good explain, I think it will be good to copy/paste it in
> > sys_arch.txt and sys.c...
>
> In that way, we finally get some documentation done ;-)
>
>
>
>
> ------------------------------
>
> Message: 6
> Date: Wed, 23 May 2007 10:27:09 +0100
> From: Kieran Mansley <address@hidden>
> Subject: RE: RE : [lwip-users] Example port for a beginner
> To: Mailing list for lwIP users <address@hidden>
> Message-ID: <address@hidden>
> Content-Type: text/plain
>
> On Wed, 2007-05-23 at 11:12 +0200, Goldschmidt Simon wrote:
> > > >If you want to know more about timeouts:
> > > It's a good explain, I think it will be good to copy/paste it in
> > > sys_arch.txt and sys.c...
> >
> > In that way, we finally get some documentation done ;-)
>
> Yes please - there have been a number of good explanations recently
(particularly from Simon) that I've thought would make good beginnings of
documentation.  I suggest that for now we create something in CVS (if
there's no relevant place already) so that you can easily copy and past
these things in when writing such stuff to the mailing list.  This will be
much easier than trying to find them later when writing docs!
>
> Kieran
>
>
>
>
>
> ------------------------------
>
> Message: 7
> Date: Wed, 23 May 2007 11:32:27 +0200
> From: Fr?d?ric BERNON <address@hidden>
> Subject: [lwip-users] RE : tcp ack problem
> To: "cui_hengbin98" <address@hidden>, "Mailing list for lwIP
> users" <address@hidden>
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Skipped content of type multipart/related-------------- next
part -------------- A non-text attachment was scrubbed...
> Name: =?iso-8859-1?Q?Fr=E9d=E9ric_BERNON=2Evcf?=
> Type: text/x-vcard
> Size: 589 bytes
> Desc: =?iso-8859-1?Q?Fr=E9d=E9ric_BERNON=2Evcf?=
> Url :
http://lists.gnu.org/pipermail/lwip-users/attachments/20070523/c82c0e43/iso-8859-1QFrE9dE9ric_BERNON2Evcf.vcf
>
> ------------------------------
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
> End of lwip-users Digest, Vol 45, Issue 26
> ******************************************
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users



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

Attachment: Frédéric BERNON.vcf
Description: Frédéric BERNON.vcf


reply via email to

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