[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)


                 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



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
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"
- new function tcpip_trypost() calling sys_mbox_trypost() on the tcpip_thread
- 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


File Attachments:

Date: dim 23 jan 2011 00:28:28 CET  Name: tcpip-trypost-staticmessages.patch 
Size: 5 ko   By: slesage



Reply to this item at:


  Message posté via/par Savannah

reply via email to

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