[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #7449] allow tcpip callback from interrupt with stat
From: |
Stephane Lesage |
Subject: |
[lwip-devel] [patch #7449] allow tcpip callback from interrupt with static memory message |
Date: |
Sat, 22 Jan 2011 23:28:29 +0000 |
User-agent: |
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDR; InfoPath.2; .NET4.0C) |
URL:
<http://savannah.nongnu.org/patch/?7449>
Summary: allow tcpip callback from interrupt with static
memory message
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: slesage
Submitted on: dim 23 jan 2011 00:28:28 CET
Category: None
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
When we implement a DMA driver, we need 2 things:
1. free the pbuf after transmit done interrupt
2. pass a received pbuf from interrupt to tcpip_thread
Additionnaly on PHY interrupt, we need
3. call a Defered Callback, and the tcpip_thread is ready for this
Today we can use:
1. tcpip_input
2a. pbuf_free_callback or
2b. pbuf_free with LWIP_ALLOW_MEM_FREE_FROM_OTHER_CONTEXT
3. tcpip_callback (non blocking)
Dynamic allocation and setup of messages is not optimal, or impossible if the
user needs to keep interrupts very short.
Furthermore, we need one message per pbuf...
The proposed patch adds a much simpler solution:
- static messages -> the callback will process the whole "packet completed"
queue
- new function tcpip_trypost() calling sys_mbox_trypost() on the tcpip_thread
mbox
- new message type for callbacks that the tcpip_thread will not release to
the pool (exactly like TCPIP_MSG_API and TCPIP_MSG_NETIFAPI)
For clarification, the pach renames message types to TCPIP_POOLMSG_xxx or
TCPIP_STATMSG_xxx
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: dim 23 jan 2011 00:28:28 CET Name: tcpip-trypost-staticmessages.patch
Size: 5 ko By: slesage
<http://savannah.nongnu.org/patch/download.php?file_id=22497>
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?7449>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [patch #7449] allow tcpip callback from interrupt with static memory message,
Stephane Lesage <=