RTL8125 2.5GbE 控制器仅使用 1Gb/s,我怎样才能使用完整的 2.5Gb/s?20.04 LTS

RTL8125 2.5GbE 控制器仅使用 1Gb/s,我怎样才能使用完整的 2.5Gb/s?20.04 LTS

我正在使用带有 RTL8125 2.5GbE 控制器的 PCIe 扩展卡。我r8125-9.007.01已从这里成功,但是当我运行时# lshw -class network我看到capacity: 1Gbit/s

  *-network
       description: Ethernet interface
       product: RTL8125 2.5GbE Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:28:00.0
       logical name: enp40s0
       version: 04
       serial: e0:e1:a9:57:80:94
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list rom ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8125 driverversion=9.007.01-NAPI latency=0 link=no multicast=yes port=twisted pair
       resources: irq:38 ioport:d000(size=256) memory:fcb10000-fcb1ffff memory:fcb20000-fcb23fff memory:fcb00000-fcb0ffff

到目前为止我已经尝试了以下命令但它们并没有改变任何东西:

  • # ethtool -s enp40s0 autoneg on advertise 0x80000000002f
  • # ethtool -s enp40s0 speed 2500 duplex full autoneg on

该以太网端口连接到 Windows PC(也具有 2.5GbE 适配器),控制面板上正确显示 2.5Gb/s。

我尝试通过 samba 复制一个大文件,但速度只有 1Gb/s。任何帮助都非常感谢!使用宣传速度的 NIC 应该不会这么难。

编辑: 经过进一步挖掘,sudo ethtool enp40s0我得到了:

sudo ethtool enp40s0
Settings for enp40s0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                2500baseT/Full
        Supported pause frame use: Symmetric Receive-only
        Supports auto-negotiation: Yes
        Supported FEC modes: Not reported
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                2500baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Advertised FEC modes: Not reported
        Link partner advertised link modes:  10baseT/Half 10baseT/Full
                                             100baseT/Half 100baseT/Full
                                             1000baseT/Full
                                             2500baseT/Full
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Link partner advertised FEC modes: Not reported
        Speed: 2500Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: pumbg
        Wake-on: d
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes

我觉得这看起来不错,但对于 2.5Gb/s 的连接来说,文件传输速度仍然很慢。您能想到其他测试速度的方法吗?

编辑2: iperf测试截图 看起来性能在一个方向上仅限制在 1Gb/s!只有当 Ubuntu 是接收方时,我才会获得较慢的速度。如果 Ubuntu 是发送方,我就会获得完整的 2.5Gb/s。此时不可能是电缆的问题。

答案1

尝试insmod ./src/r8125.ko speed=SPEED_MODE duplex=DUPLEX_MODE autoneg=NWAY_OPTION在构建驱动程序的目录中运行。

相关内容