我正在编写一个 linux 网络驱动程序。快完成了。当我在两台电脑之间 ping 时,一切都很完美。然后我尝试使用一些 TCP/UDP 协议,接收者从不回复。我用wireshark查看那里发生了什么,我发现所有的TCP数据包都有不正确的校验和。据说错误的校验和是由TCP校验和卸载引起的。我试图用 ethtool 将其关闭。当我使用sudo ethtool -K uwn0 tx off
时,它会回复我
Cannot get device rx-checksumming settings: Operation not supported
Cannot get device tx-checksumming settings: Operation not supported
Cannot get device scatter-gather settings: Operation not supported
Cannot get device tcp-segmentation-offload settings: Operation not supported
Cannot get device udp-fragmentation-offload settings: Operation not supported
Cannot get device generic-segmentation-offload settings: Operation not supported
Cannot get device generic-receive-offload settings: Operation not supported
Cannot get device flags: Operation not supported
有没有办法让我的驱动程序支持 tcp checksum offload?或者只是在软件中计算校验和?谢谢