[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [lwip-devel] [task #6683] Document lwIPs thread safety requirements
From: |
Pettinato, Jim |
Subject: |
RE: [lwip-devel] [task #6683] Document lwIPs thread safety requirements |
Date: |
Mon, 16 Apr 2007 12:01:14 -0400 |
Simon,
Yes, this can really work... and the NO_SYS with SYS_LIGHTWEIGHT_PROT is not
limited to the DMA/pbuf_ref scenario you describe. I think most users of your
scenario #2 are using the protection scheme for allocating pbufs from the pool
upon receiving an incoming packet interrupt... (you're right though, the
ethernet driver ISR can only set a flag to inform a task-level routine there
are packet(s) to process/pass to netif_input). It is very efficient though for
the ISR reciever and the stack to share a buffer pool.
AFAIK, this is how the stack was designed to work originally (I'm sure Adam can
expound on his original architecture if he still peeks in here at all)...
Multitasking OS support was added later on in the development.
Speaking of uIP and lwIP's origins, I was waxing nostalgic and poking through
some of the original uIP project code and rediscovered the uIP support for DNS
client functionality (resolv.c;.h). Don't suppose anyone knows why this didn't
get ported to lwIP? (Or if it has, where I can find it? ;))
Jim
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Simon Goldschmidt
Sent: Monday, April 16, 2007 11:33 AM
To: Kieran Mansley; Jonathan Larmour; Simon Goldschmidt; Frédéric Bernon;
address@hidden
Subject: [lwip-devel] [task #6683] Document lwIPs thread safety requirements
Follow-up Comment #9, task #6683 (project lwip):
Forgot to say in the last comment:
I think it should be well documented that lwIP is designed to work when
receiving packets from interrupt context but that the OS layer must support
this!
re my own comment #6:
>First, there are 3 different scenarios:
regarding scenario 2):
>Raw-API only (NO_SYS=1), network interfaces work with interrupts
Can this really work? netif->input may not be called from interrupt context,
since this might re.enter functions which are not re-entrant (tcp!). So the
only thing we can do would be freeing pbufs after sending (e.g. with a
DMA-ethernetif that calls pbuf_ref() before sending).
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/task/?6683>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/
_______________________________________________
lwip-devel mailing list
address@hidden http://lists.nongnu.org/mailman/listinfo/lwip-devel
- [lwip-devel] [task #6683] Document lwIPs thread safety requirements, Simon Goldschmidt, 2007/04/12
- [lwip-devel] [task #6683] Document lwIPs thread safety requirements, Frédéric Bernon, 2007/04/12
- [lwip-devel] [task #6683] Document lwIPs thread safety requirements, Simon Goldschmidt, 2007/04/12
- [lwip-devel] [task #6683] Document lwIPs thread safety requirements, Simon Goldschmidt, 2007/04/16
- [lwip-devel] [task #6683] Document lwIPs thread safety requirements, Jonathan Larmour, 2007/04/16
- [lwip-devel] [task #6683] Document lwIPs thread safety requirements, Simon Goldschmidt, 2007/04/16
- [lwip-devel] [task #6683] Document lwIPs thread safety requirements, Simon Goldschmidt, 2007/04/16
- RE: [lwip-devel] [task #6683] Document lwIPs thread safety requirements,
Pettinato, Jim <=
- [lwip-devel] [task #6683] Document lwIPs thread safety requirements, Jonathan Larmour, 2007/04/16
- [lwip-devel] [task #6683] Document lwIPs thread safety requirements, Jonathan Larmour, 2007/04/16
- [lwip-devel] [task #6683] Document lwIPs thread safety requirements, Simon Goldschmidt, 2007/04/16
- [lwip-devel] [task #6683] Document lwIPs thread safety requirements, Simon Goldschmidt, 2007/04/19
- [lwip-devel] [task #6683] Document lwIPs thread safety requirements, Jonathan Larmour, 2007/04/19
- [lwip-devel] [task #6683] Document lwIPs thread safety requirements, Simon Goldschmidt, 2007/04/19