[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread
From: |
Frédéric Bernon |
Subject: |
[lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread |
Date: |
Sun, 06 May 2007 20:36:14 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3 |
Follow-up Comment #21, patch #5914 (project lwip):
About the problem to reduce footprint (due to the dispatch table), juste an
idea, easy to do, without breaking all the code: and if we replace the "type"
field in "api_msg", by directly the same type of function that the current
dispatch table? (in the pseudo code here, I have rename the "api_msg_decode"
by "api_msg_function", just because I think is clearer). Isn't it something
simple to do? Because, I always think we can describe "tcpip_apimsg" like a
"synchrone call to tcpip_thread" and "tcpip_callback" like a "asynchrone call
to tcpip_thread" :
typedef void (* api_msg_function)(struct api_msg_msg *msg);
struct api_msg {
api_msg_function function;
struct api_msg_msg msg;
};
err_t
netconn_send(struct netconn *conn, struct netbuf *buf)
{
struct api_msg msg;
//...
msg.function = do_send;
msg.msg.conn = conn;
msg.msg.msg.b = buf;
api_msg_post(&msg);
return conn->err;
}
static void
tcpip_thread(void *arg)
{
//...
case TCPIP_MSG_API:
//...
msg->msg.function(msg->msg.apimsg);
break;
//...
}
About comment #18:
> With standard BSD API, impossible to get zero-copy for transmit either.
Agree for TCP, but for UDP ? I'm not sure...
> select(). Look how much code is needed to handle the imposed API
requirements. Enough said.
I'm agree, I don't like this, and I think it should be an option...
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?5914>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, (continued)
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Frédéric Bernon, 2007/05/04
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Simon Goldschmidt, 2007/05/04
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Simon Goldschmidt, 2007/05/04
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Frédéric Bernon, 2007/05/04
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Frédéric Bernon, 2007/05/04
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Simon Goldschmidt, 2007/05/04
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Frédéric Bernon, 2007/05/04
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Jonathan Larmour, 2007/05/04
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Simon Goldschmidt, 2007/05/05
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Simon Goldschmidt, 2007/05/05
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread,
Frédéric Bernon <=
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Simon Goldschmidt, 2007/05/07
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Simon Goldschmidt, 2007/05/10
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Frédéric Bernon, 2007/05/10
- [lwip-devel] [patch #5914] Move sockopt processing into tcpip_thread, Frédéric Bernon, 2007/05/22