Re: Why "tp->write_seq = 1"?

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

 



David S. Miller wrote:

On Sat, 12 Mar 2005 20:32:23 +0100
Xuân Baldauf  <xuan--2005.03.12--linux-net--vger.kernel.org@xxxxxxxxxxx> wrote:



In some (but not all) functions dealing with the "write_seq" field of a "struct tcp_sock", if this field ever was to be set as 0, it is actually set as 1.

Examples are:


...


But this kind of changing numbers changes the result of the calculation of "how much data is still unsent", as in



Absolutely not true. All the cases you quoted are when we are setting up a new TCP connection (when doing a "BSD TIME_WAIT" recycling of a TCP_TIME_WAIT socket into a fresh established one) or destroying an old connection (in tcp_disconnect()).



Okay,

skewing write_seq==0 to write_seq==1 might be harmless, but I'm still wondering, why this kind of skewing is done at all. Maybe you have a hint? :-)

Xuân.

P.S.: I'm also wondering wether it is possible to call ioctl SIOCOUTQ after linux notified the application that a TCP connection broke (because the other side went offline unexpectedly).

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux