(Using Linux)
Creating TCP
packets using raw sockets
- it turns out that calculating the checksum is the bottleneck for me, in high performance networks. Since the NIC's would support checksum offloading, and ethtool
also says that it is enabled, I hoped that I could use checksum offloading.
But it seems that the checksum is not calculated, when I use raw sockets. Is there a way to enable tcp checksum offloading using raw sockets?
Edit:
Actually the behaviour of my machine/NIC (Thinkpad x201) does not seem to be too logical: when sending packets with normal tcp sockets, all checksums are wrong, on the loopback interface as well as between machines. Funnily the other machine silently delivers the packets though ?
Edit2: Ok now I just looked at the packets on the wrong machine, the offloading works. But when I leave the tcp_checksum
field 0, it does not get filled in, it simply stays 0.