lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] snd_queuelen does not count the number of segments...


From: Tom Hennen
Subject: [lwip-users] snd_queuelen does not count the number of segments...
Date: Mon, 27 Nov 2006 15:57:17 -0500

Instead it counts the number of pbufs.  Why?
 
Looking at tcp_enqueue it looks as though snd_queuelen (via 'queuelen') is counting the number of pbufs in the queue rather than the number of segments.  Specifically on lines 231 and 244 of tcp_out.c '2' is added to queuelen even though only 1 segment is added.
 
This is further supported by the use of pbuf_clen on line 762 of tcp_in.c where the number of pbufs in the segment chain is used to decrement the queue length.
 
Is there any reason for this?
 
Why not just count the number of segments and only increment and decrement by '1' for each segment?  Wouldn't the actual number of segments make more sense?
 
Thanks,
 
Tom Hennen

reply via email to

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