我正在使用 CentOS 7 来测试一些网络性能。
The interface setting is normal like that :
saberin@localhost ~]$ ifconfig
enp0s25: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.40.196.150 netmask 255.255.255.0 broadcast 10.40.196.255
ether 00:21:cc:70:ec:c9 txqueuelen 1000 (Ethernet)
RX packets 65474511 bytes 67755018554 (63.1 GiB)
RX errors 0 dropped 7864 overruns 0 frame 0
TX packets 49148000 bytes 63929988549 (59.5 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xf3900000-f3920000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
loop txqueuelen 0 (Local Loopback)
RX packets 7436 bytes 2079869 (1.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 7436 bytes 2079869 (1.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
然而,当我检查捕获的流量时,我发现:
No. Time Source Destination Pro Length Info
...
15369 7.068528 10.40.196.150 -> 10.40.198.104 TCP 14548 51745 > commplex-link [ACK] Seq=48889881 Ack=1 Win=29312 Len=14480 TSval=1208291043 TSecr=1298215864
15370 7.068650 10.40.196.150 -> 10.40.198.104 TCP 14548 51745 > commplex-link [ACK] Seq=48904361 Ack=1 Win=29312 Len=14480 TSval=1208291043 TSecr=1298215864
15371 7.068772 10.40.196.150 -> 10.40.198.104 TCP 14548 51745 > commplex-link [ACK] Seq=48918841 Ack=1 Win=29312 Len=14480 TSval=1208291043 TSecr=1298215864
15372 7.068892 10.40.196.150 -> 10.40.198.104 TCP 14548 51745 > commplex-link [ACK] Seq=48933321 Ack=1 Win=29312 Len=14480 TSval=1208291043 TSecr=1298215864
...
帧的长度为14548字节!比接口的MTU大得多。
有人可以给我一些提示吗?
答案1
得到答案了。我使用的 NIC 具有“tso”功能,它将聚合接收到的帧。要启用/禁用它:
ethtool -K enp0s25 tso off/on
就我而言,只需禁用它。