Realtek 8156B 2.5G for Pi 4 and OpenWrt 21.02.2

I have a usb3 2.5gbit Realtek 8125, it's capable of delivering the speed advertised, w/o any hiccups.

Not using openwrt on the machines (x86s) where I made the tests though, but it could be arranged.

I would imagine that cdc-ncm cuts some corners in terms of functionality and that you would need to use the chipset driver instead. iperf3 most likely uses too much resources on one core to accurately test NIC performance at those speeds on such "slow" hardware.

So, looks like the speed issue is the CPU and crappy scaling (apparently way too sluggish) because when I disable the scaling. I can get good speeds. 2.5Gbps using rsync over an nfs share to a windows machine.So I am happy now. I dont care if I disable scaling because this thing is cooled well, and does great.

root@ghost:~/testfile# sensors
mt7915_phy1-pci-0400
Adapter: PCI adapter
temp1:        +70.0°C  (high = +120.0°C, crit = +110.0°C)

k10temp-pci-00c3
Adapter: PCI adapter
temp1:        +49.0°C  (high = +70.0°C)
                       (crit = +105.0°C, hyst = +104.0°C)

acpitz-acpi-0
Adapter: ACPI interface
temp1:        +49.0°C  (crit = +115.0°C)

mt7915_phy0-pci-0400
Adapter: PCI adapter
temp1:        +70.0°C  (high = +120.0°C, crit = +110.0°C)

fam15h_power-pci-00c4
Adapter: PCI adapter
power1:        1.80 W  (interval =   0.01 s, crit =   6.00 W)

Yeah I have no doubt the cdc-ncm cuts some corners, would be nice to be able to see any info ethtool.

Hello

I still have problem by spd480, any ideas ??

T:  Bus=05 Lev=02 Prnt=02 Port=02 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  3
P:  Vendor=0bda ProdID=8156 Rev=31.04
S:  Manufacturer=Realtek
S:  Product=USB 10/100/1G/2.5G LAN
S:  SerialNumber=4013000001
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=200mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=00 Driver=r8152
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   2 Ivl=128ms
C:  #Ifs= 2 Cfg#= 2 Atr=a0 MxPwr=200mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0d Prot=00 Driver=
E:  Ad=83(I) Atr=03(Int.) MxPS=  16 Ivl=128ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=01 Driver=
I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
C:  #Ifs= 2 Cfg#= 3 Atr=a0 MxPwr=200mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=00 Driver=
E:  Ad=83(I) Atr=03(Int.) MxPS=  16 Ivl=128ms
I:  If#= 1 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=00 Driver=
I:  If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

Using the wrong USB port?

No no, i checked all

Y\This card working ok in Windows

This same port i put other 1 Gbit card and spd=5000

Only i OpenWRT ( Windows also ) i use cable USB C to USB 3.0

I have card USB C

Try turning the USB-C connector 180°. In my experience, these A-to-C adapters are often not symmtrical. They only have USB 3 signals on one side of the USB-C connector

2 Likes

Very thank

oh my good, 180 and working ok :slight_smile:
I think yet have to small power in usb 3,0 - i try download and in moment i have restart USB :confused:

But 2500 working ok :slight_smile:

```
root@OpenWrt:~# ethtool -s eth2 autoneg on advertise 0x80000000002f
root@OpenWrt:~# ethtool eth2
Settings for eth2:
        Supported ports: [ MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
                                2500baseT/Full
        Supported pause frame use: No
        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: Symmetric Receive-only
        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: MII
        PHYAD: 32
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00007fff (32767)
                               drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol
        Link detected: yes

Wow, that wouldn't have crossed my mind :o

Edit

works ok :slight_smile: - not enabled switch to other side :slight_smile:

Hello, i have new problem

If uses driver 8152, and start download i have in 1-2 sec error and broken session

if i use driver cdc_ncm working ok, but not possible 2500 GBits for this, any ideas ?

[  480.649669] r8152 6-2.1:1.0 eth1: carrier on
[  486.288784] pppoe-wan: renamed from ppp0
[  570.382771] xhci_hcd 0000:00:10.0: WARN: TRB error for slot 3 ep 3 on endpoint
[  570.390069] xhci_hcd 0000:00:10.0: WARN waiting for error on ep to be cleared
[  570.390074] r8152 6-2.1:1.0 eth1: Tx status -84
[  570.401863] r8152 6-2.1:1.0 eth1: failed tx_urb -22
[  570.407040] xhci_hcd 0000:00:10.0: WARN waiting for error on ep to be cleared
[  570.414252] r8152 6-2.1:1.0 eth1: failed tx_urb -22
[  570.419297] xhci_hcd 0000:00:10.0: WARN waiting for error on ep to be cleared

and more more....

If i use cdc_ncm but working ok but only link ( 1 GBits )

[   12.420539] cdc_ncm 6-2.1:2.0 eth1: 1000 mbit/s downlink 1000 mbit/s uplink
[   12.484919] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   12.493555] IPv6: ADDRCONF(NETDEV_CHANGE): eth1.35: link becomes ready
[   13.457485] pppoe-wan: renamed from ppp0