lwIP - A Lightweight TCP/IP stack - Patches: patch #5914, Move sockopt processing into...
You are not allowed to post comments on this tracker with your current authentication level.
patch #5914: Move sockopt processing into tcpip_thread
Submitter: | Simon Goldschmidt <goldsimon> | ||
Submitted: | Thu 03 May 2007 06:55:51 PM UTC | ||
Category: | None | Priority: | 5 - Normal |
Status: | Done | Privacy: | Public |
Assigned to: | goldsimon | Open/Closed: | Closed |
Planned Release: | None |
Jump to the original submission
Mon 04 Jun 2007 09:05:23 AM UTC, comment #29: |
Frédéric Bernon <fbernon> |
Sat 02 Jun 2007 05:11:34 PM UTC, comment #28:
|
Simon Goldschmidt <goldsimon> |
Sat 02 Jun 2007 12:53:04 PM UTC, comment #27: Sorry, I don't have find time for that. More, I think it will be so simple in the future socket layer (using the global mutex).
|
Frédéric Bernon <fbernon> |
Fri 01 Jun 2007 05:17:13 PM UTC, comment #26: OK, checked in my patch.
|
Simon Goldschmidt <goldsimon> |
Tue 22 May 2007 09:10:05 PM UTC, comment #25: I will propose a patch tomorrow... |
Frédéric Bernon <fbernon> |
Thu 10 May 2007 02:54:46 PM UTC, comment #24:
|
Frédéric Bernon <fbernon> |
Thu 10 May 2007 11:22:07 AM UTC, comment #23: While I think including the function pointer instead of a table index in the message is a good way to reduce footprint, I think we should discuss that in a separate thread.
|
Simon Goldschmidt <goldsimon> |
Mon 07 May 2007 07:09:00 PM UTC, comment #22: re comment #21:
|
Simon Goldschmidt <goldsimon> |
Sun 06 May 2007 08:36:14 PM UTC, comment #21: 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" :
|
Frédéric Bernon <fbernon> |
Sat 05 May 2007 09:21:32 AM UTC, comment #20:
|
Simon Goldschmidt <goldsimon> |
Sat 05 May 2007 09:00:44 AM UTC, comment #19:
|
Simon Goldschmidt <goldsimon> |
Sat 05 May 2007 12:38:32 AM UTC, comment #18: Frédéric Bernon wrote:
|
Jonathan Larmour <jifl> |
Fri 04 May 2007 08:34:56 PM UTC, comment #17: Ok, Simon, talk about that (even if we could open a separate task to this subject) :)
|
Frédéric Bernon <fbernon> |
Fri 04 May 2007 06:50:50 PM UTC, comment #16:
|
Simon Goldschmidt <goldsimon> |
Fri 04 May 2007 06:35:41 PM UTC, comment #15: Ok, it seems that igmp_joingroup & igmp_leavegroup calls are ok (even if I can test it yet), but it should be better to use use a ip_mreq struct for groupaddr parameters :
|
Frédéric Bernon <fbernon> |
Fri 04 May 2007 04:54:06 PM UTC, comment #14: I will look the igmp part, but not before Wednesday (weekend, vacation, holidays, yes!!! Is it possible to you to wait before commit that?).
|
Frédéric Bernon <fbernon> |
Fri 04 May 2007 04:35:44 PM UTC, comment #13: I've put together a new patch and tested it (although not the igmp part: don't know how to test).
|
Simon Goldschmidt <goldsimon> |
Fri 04 May 2007 03:41:56 PM UTC, comment #12:
|
Simon Goldschmidt <goldsimon> |
Fri 04 May 2007 03:31:12 PM UTC, comment #11: You can call directly igmp_joingroup()/igmp_leavegroup() like in do_join_leave_group, but it will be redundant. If you decide to remove it, how netconn users can use IGMP?
|
Frédéric Bernon <fbernon> |
Fri 04 May 2007 03:15:30 PM UTC, comment #10:
|
Simon Goldschmidt <goldsimon> |
Fri 04 May 2007 12:43:03 PM UTC, comment #9: Other thing: like this, I'm afraid you got a deadlocking case with IP_ADD_MEMBERSHIP & IP_DROP_MEMBERSHIP (these options call netconn). If you don't like to add a LWIP_SOCKET & netconn_options, don't forget to update this code...
|
Frédéric Bernon <fbernon> |
Fri 04 May 2007 10:34:55 AM UTC, comment #8:
present for everyone (Jonathan)
|
Frédéric Bernon <fbernon> |
Fri 04 May 2007 10:14:49 AM UTC, comment #7: IMHO tcpip_callback() is better here. If it's integrated directly into api_msg.c, then the code is present for everyone. With tcpip_callback() it's only present for those using setsockopt() (or for compilers that don't yet have sensible linking, the socket API at least).
|
Jonathan Larmour <jifl> |
Fri 04 May 2007 09:49:20 AM UTC, comment #6:
|
Simon Goldschmidt <goldsimon> |
Fri 04 May 2007 09:36:05 AM UTC, comment #5:
No, it's good (even if I think it's "better" to directly open a patch item, and not a task), but I just didn't understood the problem...
sockopt are just functions to access to internal lwIP options (most are at "raw" level), so, if the issue if for thread-safe, I suppose it is also true for netconn, right? And I suppose that a netconn user directly access to pcb fields if he need these optiions?
About "Since netconn API doesn't need sockopts", see last remark. But about having 2 sequential API, I pretty agree with you, but even if we only use socket layer and improve it to get same features like "zerocopy", and so, don't use api_lib functions, the api_msg part will be the same I think... no? But yes, it's another discussion...
I thought that something like netconn_options() should be nice, but, because I only use sockets, it's not a problem, but what think netconn users about that? Is it really good to let them directly access to pcb ?
|
Frédéric Bernon <fbernon> |
Fri 04 May 2007 08:09:28 AM UTC, comment #4: Hm, task #6837 and this patch are the same thing, I just wanted to send the patch here instead of to the task... maybe that was wrong...
|
Simon Goldschmidt <goldsimon> |
Fri 04 May 2007 07:20:38 AM UTC, comment #3: Because all the sockets API use api_lib/api_msg, I don't think it's a so good idea to directly call tcpip_callback. I think it should be better to extend api_lib/api_msg (like for igmp by example)... It will also give possibility to be available to netconn API users...
|
Frédéric Bernon <fbernon> |
Fri 04 May 2007 06:35:12 AM UTC, comment #2:
|
Simon Goldschmidt <goldsimon> |
Thu 03 May 2007 07:24:24 PM UTC, comment #1: Maybe I'm blind but shouldn't something be posting into the mbox?
|
Jonathan Larmour <jifl> |
Thu 03 May 2007 06:55:51 PM UTC, original submission:
To achieve this, I propose simply calling tcpip_callback() and moving the processing of the options in lwip_setsockopt()/lwip_getsockopt() into dedicated functions called by tcpip_callback(). sock->conn->mbox can be used to wait for the callbacks to finish, as done for all netconn functions.
|
Simon Goldschmidt <goldsimon> |
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2007-06-01 | goldsimon | Status | None | Done | |
Open/Closed | Open | Closed | |||
2007-05-04 | goldsimon | Attached File | - | Added sockets.c_sockopt2.patch, #12693 | |
2007-05-03 | goldsimon | Attached File | - | Added sockets.c_sockopt.patch, #12684 |
Powered by Savane 3.13-cf05.
Corresponding source code
I think your patch doesn't build with LWIP_IGMP=1, due to a the "err" variable in line "err = EAFNOSUPPORT;". Do you have try to build it with? I can't, because I'm in a frozen release for my products, and because I think it will be restore like before when we will got the global mutex...