TCP Segmentation in driver

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

 






I'm trying to do tcp segmentation in my network driver in order to pack
IO buffers sent to the hardware more efficiently and, thus, save IO.
What I do is to set the NETIF_F_TSO flag on my netdevice. Then I get
large packets from the stack.
I fragment the packet according to MSS, i.e. split tcp payload, put
modified tcp and ip headers at the start of each segment and send
the segments out.
However, in the following example I have the problem that the Linux stack
retransmits the first segment:
I send 2000 bytes using a simple tcp client server program. I get the whole
packet in my driver. I create two segments (1440 and 560 bytes + headers)
and send them. On the receiver side the packets look as if they had been
segmented by the stack.
On the sender side, however, Linux retransmits the first 1440 (+headers).
Also, I never get an ACK for the second segment from the receiver.
Is there any data in the Linux tcp/ip stack I have to adjust when I do
tcp segmentation in my driver?
I suppose there is nothing to be done. If I was using real hardware TSO
the hardware could not adjust data in the Linux stack either.

Any ideas?

Regards,
Thomas.

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
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