buglwIP - A Lightweight TCP/IP stack - Bugs: bug #15926, netconn API bugs

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #15926: netconn API bugs

Submitter:  Christiaan Simons <christiaans>
Submitted:  Tue 28 Feb 2006 09:53:55 AM UTC
   
 
Category:  sockets/netconn Severity:  1 - Wish
Item Group:  Faulty Behaviour Status:  None
Privacy:  Public Assigned to:  christiaans
Open/Closed:  Closed Planned Release:  None
lwIP version:  None

Tue 10 Oct 2006 08:06:29 AM UTC, comment #4: 

Bad netconn TCP performance is also improved by a fix in the Nagle algorithm in api_msg.c. The mailbox thing may still be an issue, but I've got no ambition in changing it right now.

Christiaan Simons <christiaans>
Group Member
Tue 01 Aug 2006 03:02:31 PM UTC, comment #3: 

On a rainy holiday moment, i think i tackled it
in api_msg.c, in do_close(),
case NETCONN_TCP, add after if {}

else if (msg->conn->pcb.tcp->state == CLOSE_WAIT) {
  err = tcp_output(msg->conn->pcb.tcp);
}

I'll commit this when I'm back.
This doesn't fix the mailbox cludge though.

Bye, Christiaan.

Christiaan Simons <christiaans>
Group Member
Mon 03 Jul 2006 05:54:51 PM UTC, comment #2: 

andreas, can you post the whole api_lib.c in here?

thanks.

matrix35 <matrix35>
Wed 19 Apr 2006 09:34:31 PM UTC, comment #1: 

i did a hack for the first two things in the list..

i just take a semaphore in netconn_close() and wait till sent_tcp() is called with tcp->unacked == NULL or err_tcp() is called, which releases the semaphore

in the socket layer i added a call to netconn_close() before calling netconn_delete()

sorry i dont know much about the diff stuff and how to make a nice looking and behaving patch. maybe someone can help me to know about this. i know the diff command but i dont know how to do it the right way.

i also removed the "if(state == LISTEN)" normaly the tcp layer should know in which state it has to what when close is called, or am i wrong!?



Kind regard

Andreas

Anonymous
Tue 28 Feb 2006 09:53:55 AM UTC, original submission:  

There are some problems with the netconn (sequential) API.

  • Using netconn_close()/_delete() immediatly after a netconn_write() trashes pending write data. There seems to be no functionality to ensure enqueued data is output before/while closing.


  • netconn_close() on TCP connections only closes when in the TCP    LISTEN state. Karl Jeacle repoted this a long time ago (Tue, 16 Dec 2003) but nothing was done about this.


  • Performace penalty by overused mailboxes. The tcpip_thread can do much more work that is currently in the netconn_* layer.


Are these problems design flaws or do I miss something?

Christiaan Simons <christiaans>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2006-10-10 christiaans Open/ClosedOpen Closed
2006-08-01 christiaans Assigned toNone christiaans

Back to the top

Powered by Savane 3.13-02a9.
Corresponding source code