Search code examples
linuxsocketstcp

TCP Messages above a certain size (~1450) get "stuck"


I am attempting to send packets of various length through my hardware and I have run into an issue when the packets reach a particular size, ~1450 bytes. Everything works fine when the packet size is less than ~1450 byte.

I have been debugging this issue with my NIC driver and outputting what I get right before I send data out. I can see the TCP handshake, and my packet when < ~1450 bytes is sent.

Once I try to send a packet over ~1450 bytes, I never see the TCP handshake, or the packet in my NIC driver. Therefore I am certain that the packet is lost somewhere in Linux... This looks to be some sort of error with packet fragmentation in Linux but I'm not sure.

Has anyone encountered packet loss when attempting to send packets of a certain threshold, and in my case, ~1450 bytes in Linux?

I am unsure of where to start looking to find out where my packet is being held up or why...

I am using Linux 3.10.39, it can't be changed. I have also increased the MTU size to a greater value in my NIC driver but it seems to have no affect and the packets of ~1450 bytes continue to get stuck.

I am using a basic Perl tcp server/client found here to test communication.


Solution

  • Turning off Generic Segmentation Offload and Generic Receive Offload fixed the issue.

    ethtool -K eth1 gso off
    ethtool -K eth1 gro off