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
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to