我不确定这个问题是否符合规则,但仍然。
有一张 10Gb 的卡(品牌不重要,因为结果在另外两个与此不同的卡上重复)并Debian Buster通过光学直接连接到数据源机器。大约 9Gb 的数据流被组织起来,由大约 9000 字节的以太网帧组成,其中除了发送者的 MAC、接收者的 MAC、自定义 EtherType 和数据包计数器之外什么都没有。
实用程序wireshark, tshark,的测量结果tcpdump(尽管它们都通过同一个库工作)表明大约每隔一个包就会被跳过。自写的曲线代码显示大致相同。同时,在Windows 7同一个wireshark(分配了很大的缓冲区)下,它会捕获所有数据包。
使用 TCP 流量上的实用程序检查网络带宽iperf3可得到稳定的 9.8Gb。
# uname -a
Linux debian 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2 (2019-08-28) x86_64 GNU/Linux
# ifconfig enp1s0
enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 12000
inet 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.255.255
inet6 fe80::b2c5:54ff:feff:f37f prefixlen 64 scopeid 0x20<link>
ether b0:c5:54:ff:f3:7f txqueuelen 3000 (Ethernet)
RX packets 1501482032 bytes 13216245041216 (12.0 TiB)
RX errors 0 dropped 1501472982 overruns 0 frame 0
TX packets 75 bytes 7809 (7.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 34 memory 0x90400000-90410000
# ethtool -g enp1s0
Ring parameters for enp1s0:
Pre-set maximums:
RX: 1365
RX Mini: 0
RX Jumbo: 0
TX: 2048
Current hardware settings:
RX: 1365
RX Mini: 0
RX Jumbo: 0
TX: 2048
# ethtool -k enp1s0
Features for enp1s0:
rx-checksumming: on
tx-checksumming: on
tx-checksum-ipv4: on
tx-checksum-ip-generic: off [fixed]
tx-checksum-ipv6: off [fixed]
tx-checksum-fcoe-crc: off [fixed]
tx-checksum-sctp: off [fixed]
scatter-gather: on
tx-scatter-gather: on
tx-scatter-gather-fraglist: on
tcp-segmentation-offload: on
tx-tcp-segmentation: on
tx-tcp-ecn-segmentation: off [fixed]
tx-tcp-mangleid-segmentation: off
tx-tcp6-segmentation: off [fixed]
udp-fragmentation-offload: off
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: on
tx-vlan-offload: on
ntuple-filters: off [fixed]
receive-hashing: on
highdma: on
rx-vlan-filter: on
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-gre-csum-segmentation: off [fixed]
tx-ipxip4-segmentation: off [fixed]
tx-ipxip6-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-udp_tnl-csum-segmentation: off [fixed]
tx-gso-partial: off [fixed]
tx-sctp-segmentation: off [fixed]
tx-esp-segmentation: off [fixed]
tx-udp-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
hw-tc-offload: off [fixed]
esp-hw-offload: off [fixed]
esp-tx-csum-hw-offload: off [fixed]
rx-udp_tunnel-port-offload: off [fixed]
tls-hw-tx-offload: off [fixed]
tls-hw-rx-offload: off [fixed]
rx-gro-hw: off [fixed]
tls-hw-record: off [fixed]
我不太了解网络堆栈,坦率地说,在设置网络时“浮动”,所以我请求社区的帮助,或者至少是一个可以挖掘的向量。特别感兴趣的是这条线RX errors 0 dropped 1501472982 overruns 0 frame 0