bb-qq / r8152

Synology DSM driver for Realtek RTL8152/RTL8153/RTL8156 based adapters
GNU General Public License v2.0
2k stars 181 forks source link

DS412+ (Atom D2700) #7

Open Siress opened 4 years ago

Siress commented 4 years ago

Description of the problem

I am not adept in the wizardly ways of creating drivers, and would very much like to have a 2.5 or 5Gbps network connection with my NAS.

Description of your products

DS412+ Linux 3.10.105 #24922 SMP Wed Jul 3 16:35:48 CST 2019 x86_64 GNU/Linux synology_cedarview_412+ DSM 6.2.2 Planned: CableCreation PN B07VNFLTLD.

Description of your environment

Planned: Mikrotik RS305-1G-4S+IN switch with an ipolex 10G-SFP-T transceiver. Planned: Mellanox Connectx-2 CAT6

Output of dmesg command

Far too much data for me to parse through for any potential doxing info... If necessary, I can email it directly to you.

Output of lsusb command

|__usb1          1d6b:0002:0310 09  2.00  480MBit/s 0mA 1IF  (ehci_hcd 0000:00:1a.7) hub
|__usb2          1d6b:0002:0310 09  2.00  480MBit/s 0mA 1IF  (ehci_hcd 0000:00:1d.7) hub
  |__2-1         f400:f400:0100 00  2.00  480MBit/s 200mA 1IF  (Synology DiskStation 650043CB10B76D76)
|__usb3          1d6b:0001:0310 09  1.10   12MBit/s 0mA 1IF  (uhci_hcd 0000:00:1a.0) hub
|__usb4          1d6b:0001:0310 09  1.10   12MBit/s 0mA 1IF  (uhci_hcd 0000:00:1d.0) hub
|__usb5          1d6b:0001:0310 09  1.10   12MBit/s 0mA 1IF  (uhci_hcd 0000:00:1d.1) hub
|__usb6          1d6b:0001:0310 09  1.10   12MBit/s 0mA 1IF  (uhci_hcd 0000:00:1d.2) hub
|__usb7          1d6b:0002:0310 09  2.00  480MBit/s 0mA 1IF  (Linux 3.10.105 etxhci_hcd-170202 Etron xHCI Host Controller 0000:04:00.0) hub
  |__7-1         051d:0002:0090 00  2.00   12MBit/s 2mA 1IF  (American Power Conversion Back-UPS RS 1300G FW:863.L5 .D USB FW:L5  4B1410P56556  )
|__usb8          1d6b:0003:0310 09  3.00 5000MBit/s 0mA 1IF  (Linux 3.10.105 etxhci_hcd-170202 Etron xHCI Host Controller 0000:04:00.0) hub
bb-qq commented 4 years ago

Since the controller chip of B07VNFLTLD is RTL8156, the dongle should work with my driver. However please note that NBASE-T(2.5G/5G) needs dedicated transceivers for it. Probably 10G-SFP-T does not support 2.5/5G.

If you prefer SFP+, QSW-308-1C is another choice for this dongle.

Siress commented 4 years ago

Thank you for that information! I will give it a shot and report back.

On Thu, Jan 2, 2020, 22:24 bb-qq notifications@github.com wrote:

Since the controller chip of B07VNFLTLD is RTL8156, the dongle should work with my driver. However please note that NBaseT(2.5G/5G) needs dedicated transceivers for it. Probably 10G-SFP-T does not support 2.5/5G.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bb-qq/r8152/issues/7?email_source=notifications&email_token=AFJ35YH6F4ZDNOXUSQMGA23Q32VYFA5CNFSM4KB6UB22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEIAFQQY#issuecomment-570447939, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJ35YFHETBIGVQ5TST4G53Q32VYFANCNFSM4KB6UB2Q .

Siress commented 4 years ago

Description of the problem

Confused about how to configure the IP. Should it be listed as a DSM Network Interface? r8152-cedarview-2.12.0-1.spk is running, B07VNFLTLD is recognized per lsusb, but I have no idea where/how to access the Web UI for step 3.

Description of your products

DS412+ Linux 3.10.105 #24922 SMP Wed Jul 3 16:35:48 CST 2019 x86_64 GNU/Linux synology_cedarview_412+ DSM 6.2.2 CableCreation PN B07VNFLTLD.

Description of your environment

Planned: Mikrotik RS305-1G-4S+IN switch with an ipolex 10G-SFP-T transceiver. Planned: Mellanox Connectx-2 CAT6

### Output of lsusb command

|usb1 1d6b:0002:0310 09 2.00 480MBit/s 0mA 1IF (ehci_hcd 0000:00:1 a.7) hub |__usb2 1d6b:0002:0310 09 2.00 480MBit/s 0mA 1IF (ehci_hcd 0000:00:1 d.7) hub |2-1 f400:f400:0100 00 2.00 480MBit/s 200mA 1IF (Synology DiskSta tion 650043CB10B76D76) |usb3 1d6b:0001:0310 09 1.10 12MBit/s 0mA 1IF (uhci_hcd 0000:00:1 a.0) hub |__usb4 1d6b:0001:0310 09 1.10 12MBit/s 0mA 1IF (uhci_hcd 0000:00:1 d.0) hub |usb5 1d6b:0001:0310 09 1.10 12MBit/s 0mA 1IF (uhci_hcd 0000:00:1 d.1) hub |usb6 1d6b:0001:0310 09 1.10 12MBit/s 0mA 1IF (uhci_hcd 0000:00:1 d.2) hub |__usb7 1d6b:0002:0310 09 2.00 480MBit/s 0mA 1IF (Linux 3.10.105 etx hci_hcd-170202 Etron xHCI Host Controller 0000:04:00.0) hub |7-1 051d:0002:0090 00 2.00 12MBit/s 2mA 1IF (American Power Con version Back-UPS RS 1300G FW:863.L5 .D USB FW:L5 4B1410P56556 ) |__usb8 1d6b:0003:0310 09 3.00 5000MBit/s 0mA 1IF (Linux 3.10.105 etx hci_hcd-170202 Etron xHCI Host Controller 0000:04:00.0) hub |__8-2 0bda:8156:3000 00 3.20 5000MBit/s 512mA 1IF (Realtek USB 10/1 00/1G/2.5G LAN 000000001)

bb-qq commented 4 years ago

Did you run ifconfig eth2 up and is it succeeded? Please confirm the result of ifconfig -a.

Siress commented 4 years ago

I did run the command, but it did not list eth2 after "ifconfig -a".

On Fri, Jan 17, 2020, 04:41 bb-qq notifications@github.com wrote:

Did you run ifconfig eth2 up and is it succeeded? Please confirm the result of ifconfig -a.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bb-qq/r8152/issues/7?email_source=notifications&email_token=AFJ35YCWD5IXO5PVDUNBJVDQ6F4NLA5CNFSM4KB6UB22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJHDODI#issuecomment-575551245, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJ35YEWLNFPWGII3TCP2QTQ6F4NLANCNFSM4KB6UB2Q .

bb-qq commented 4 years ago

Hmm, it's weird. VID/PID shown in the result of lsusb is certainly supported by the driver.

So could you let me know the result of dmesg? The required part is only about detection of the dongle.

That can be obtained by the following steps:

  1. detach the ethernet dongle
  2. run dmesg
  3. attach the ethernet dongle
  4. run dmesg and check increased part from previous output
Siress commented 4 years ago

[77414.866474] usb 8-2: new SuperSpeed USB device number 3 using etxhci_hcd-170202 [77414.894713] etxhci_hcd-170202 0000:04:00.0: WARN Event TRB for slot 2 ep 2 with no TDs queued? [77414.903531] etxhci_hcd-170202 0000:04:00.0: WARN Event TRB for slot 2 ep 3 with no TDs queued? [77414.912282] etxhci_hcd-170202 0000:04:00.0: WARN Event TRB for slot 2 ep 6 with no TDs queued? [77416.023156] usb 8-2: reset SuperSpeed USB device number 3 using etxhci_hcd-170202 [77416.580569] r8152 8-2:1.0 eth2: v2.12.0 (2019/04/29) [77416.585547] r8152 8-2:1.0 eth2: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.

On Fri, Jan 17, 2020 at 11:04 AM bb-qq notifications@github.com wrote:

Hmm, it's weird. VID/PID shown in the result of lsusb is certainly supported by the driver.

So could you let me know the result of dmesg? The required part is only about detection of the dongle.

That can be obtained by the following steps:

  1. detach the ethernet dongle
  2. run dmesg
  3. attach the ethernet dongle
  4. run dmesg and check increased part from previous output

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bb-qq/r8152/issues/7?email_source=notifications&email_token=AFJ35YEGCMPR3E7RUB7GQ6DQ6HJJ7A5CNFSM4KB6UB22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJIESBY#issuecomment-575686919, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJ35YGLAPDA7P4WZITETLTQ6HJJ7ANCNFSM4KB6UB2Q .

Siress commented 4 years ago

Also, I just ran "ifconfig eth2 up" again and received this message: "SIOCSIFFLAGS: Operation not permitted". I then elevated to root and ran it again. As root, no error message was generated. Logging out as root and repeating the command as admin once again led to the SIOCSIFFLAGS message. I originally ran the command as root, so perhaps this has happened both times. Risky I guess, but I just archived my entire NAS anyway.

On Fri, Jan 17, 2020 at 8:55 PM Seth West siress@gmail.com wrote:

[77414.866474] usb 8-2: new SuperSpeed USB device number 3 using etxhci_hcd-170202 [77414.894713] etxhci_hcd-170202 0000:04:00.0: WARN Event TRB for slot 2 ep 2 with no TDs queued? [77414.903531] etxhci_hcd-170202 0000:04:00.0: WARN Event TRB for slot 2 ep 3 with no TDs queued? [77414.912282] etxhci_hcd-170202 0000:04:00.0: WARN Event TRB for slot 2 ep 6 with no TDs queued? [77416.023156] usb 8-2: reset SuperSpeed USB device number 3 using etxhci_hcd-170202 [77416.580569] r8152 8-2:1.0 eth2: v2.12.0 (2019/04/29) [77416.585547] r8152 8-2:1.0 eth2: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.

On Fri, Jan 17, 2020 at 11:04 AM bb-qq notifications@github.com wrote:

Hmm, it's weird. VID/PID shown in the result of lsusb is certainly supported by the driver.

So could you let me know the result of dmesg? The required part is only about detection of the dongle.

That can be obtained by the following steps:

  1. detach the ethernet dongle
  2. run dmesg
  3. attach the ethernet dongle
  4. run dmesg and check increased part from previous output

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bb-qq/r8152/issues/7?email_source=notifications&email_token=AFJ35YEGCMPR3E7RUB7GQ6DQ6HJJ7A5CNFSM4KB6UB22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJIESBY#issuecomment-575686919, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJ35YGLAPDA7P4WZITETLTQ6HJJ7ANCNFSM4KB6UB2Q .

bb-qq commented 4 years ago

Can you assign an IP address after that?

Siress commented 4 years ago

YES! I don't know what changed, but it now shows up as LAN3 and I can assign the IP manually. Thank you so much for your work and for helping me get this to work for my system. I've connected it to the Mikrotik switch via IPOLEX 10G-SFP-T to CAT6 and DSM reports it as "2500 Mbps full-duplex, MTU 1500". I'm still waiting on an SFP+ NIC for my computer, tho.

This is a huge accomplishment on your part. I hope people recognize the work you've done. Do you have a donation page anywhere?

On Sun, Jan 19, 2020 at 6:34 AM bb-qq notifications@github.com wrote:

Can you assign an IP address after that?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bb-qq/r8152/issues/7?email_source=notifications&email_token=AFJ35YGFAD2YLK6F6TOSFK3Q6Q3CPA5CNFSM4KB6UB22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJKP5SQ#issuecomment-575995594, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFJ35YG64YW6MZLMPYRXC6LQ6Q3CPANCNFSM4KB6UB2Q .

bb-qq commented 4 years ago

It's my pleasure.

Do you have a donation page anywhere?

I have created a donation page for the experiment. Please take a look if you feel like it. https://www.patreon.com/bb_qq

Siress commented 4 years ago

Excellent, thank you. I have one more issue that I resolved myself. This is more of an FYI with a question at the end.

Here's how I left my network yesterday. For brevity, all transceivers (Tx) are IOPLEX 10G-SFP-T models.

I had just connected the system together and configured the IP for LAN3 in DSM, verified that the IP was reporting, and then tried to get iperf3 running. I failed to get iperf3 to do anything except hang in terminal, and then left the system for ~24hours. Upon return, LAN3 had disappeared. The lights on the RTL8156 device were still flashing (white and orange, indicating 2.5GbE connection?). My system did not experience a power failure. It's connected to a UPS and neither system reported an outage. I was able to restore the device to active state by doing the following steps, though I do not know if all steps were required. 1) I stopped and started the RTL driver through Package Center. 2) I ran ifconfig eth2 up as root. Again, the SIOCSIFFLAGS error was thrown when executing the command as admin, and did not appear to have any effect. As root, LAN3 immediately came back to life. Interestingly, perhaps, the network settings for LAN3 were retained.

Could we perhaps have a user-script in Task Scheduler that checks that eth2 is active and, if not, run the command?

EDIT: Some output. ~$ dmesg | grep eth [ 55.008523] usbcore: registered new interface driver ethub [ 55.404604] ethub 7-0:1.0: USB hub found [ 55.408661] ethub 7-0:1.0: 2 ports detected [ 55.429304] ethub 8-0:1.0: USB hub found [ 55.433311] ethub 8-0:1.0: 2 ports detected [ 78.771575] e1000e 0000:01:00.0 eth0: registered PHC clock [ 78.777098] e1000e 0000:01:00.0 eth0: (PCI Express:2.5GT/s:Width x1) [ 78.785147] e1000e 0000:01:00.0 eth0: Intel(R) PRO/1000 Network Connection [ 78.792225] e1000e 0000:01:00.0 eth0: MAC: 3, PHY: 8, PBA No: FFFFFF-0FF [ 78.935278] e1000e 0000:02:00.0 eth1: registered PHC clock [ 78.941138] e1000e 0000:02:00.0 eth1: (PCI Express:2.5GT/s:Width x1) [ 78.949190] e1000e 0000:02:00.0 eth1: Intel(R) PRO/1000 Network Connection [ 78.956237] e1000e 0000:02:00.0 eth1: MAC: 3, PHY: 8, PBA No: FFFFFF-0FF [ 85.979441] device eth0 entered promiscuous mode [ 85.989423] device ovs_eth0 entered promiscuous mode [ 85.994999] device eth1 entered promiscuous mode [ 86.003539] device ovs_eth1 entered promiscuous mode [ 88.590272] device eth0 left promiscuous mode [ 88.595662] device ovs_eth0 left promiscuous mode [ 88.637808] device ovs_eth0 entered promiscuous mode [ 88.927360] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 88.948788] device eth0 entered promiscuous mode [ 89.372818] device eth1 left promiscuous mode [ 89.377450] device ovs_eth1 left promiscuous mode [ 89.410140] device ovs_eth1 entered promiscuous mode [ 89.681032] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready [ 89.700763] device eth1 entered promiscuous mode [ 92.320387] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None [ 92.329179] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready [ 122.566659] r8152 8-2:1.0 eth2: v2.12.0 (2019/04/29) [ 122.571725] r8152 8-2:1.0 eth2: This product is covered by one or more of the following patents: [77416.580569] r8152 8-2:1.0 eth2: v2.12.0 (2019/04/29) [77416.585547] r8152 8-2:1.0 eth2: This product is covered by one or more of the following patents: [77594.585293] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready [77594.704144] IPv6: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready [77594.712865] r8152 8-2:1.0 eth2: carrier on [223822.609512] r8152 8-2:1.0 eth2: carrier off [223831.560293] r8152 8-2:1.0 eth2: carrier on [272197.656612] NETDEV WATCHDOG: eth2 (r8152): transmit queue 0 timed out [272197.663217] Modules linked in: ip6table_mangle xt_mark sch_sfq sch_htb cls_u 32 cls_fw iptable_mangle bridge stp aufs macvlan veth xt_conntrack xt_addrtype i pt_MASQUERADE xt_REDIRECT xt_nat iptable_nat nf_nat_ipv4 nf_nat r8152(OF) cifs u df isofs loop nfsd exportfs rpcsec_gss_krb5 tcm_loop(O) iscsi_target_mod(O) targ et_core_ep(O) target_core_multi_file(O) target_core_file(O) target_core_iblock(O ) target_core_mod(O) syno_extent_pool(PO) rodsp_ep(O) syno_hddmon(P) hid_generic usbhid hid usblp usb_storage nf_conntrack_ipv6 ip6table_filter ip6_tables xt_re cent xt_iprange xt_limit xt_state xt_tcpudp xt_multiport xt_LOG nf_conntrack_ipv 4 nf_defrag_ipv4 iptable_filter ip_tables x_tables openvswitch(O) gre nfdefrag ipv6 nf_conntrack cedarview_synobios(PO) exfat(O) btrfs synoacl_vfs(PO) zlib_def late hfsplus [272197.936614] r8152 8-2:1.0 eth2: Tx timeout [272197.945694] r8152 8-2:1.0 eth2: Tx status -2 [272197.950175] r8152 8-2:1.0 eth2: Tx status -2 [272197.954613] r8152 8-2:1.0 eth2: Tx status -2 [272197.959083] r8152 8-2:1.0 eth2: Tx status -2 [421297.669317] r8152 8-2:1.0 eth2: carrier off [421585.271378] r8152 8-2:1.0 eth2: carrier on [421596.538163] r8152 8-2:1.0 eth2: carrier off [516028.443765] r8152 8-2:1.0 eth2: carrier on [520212.742069] r8152 8-2:1.0 eth2: Stop submitting intr, status -108 [520405.309182] r8152 8-2:1.0 eth2: v2.12.0 (2019/04/29) [520405.314356] r8152 8-2:1.0 eth2: This product is covered by one or more of th e following patents: [595679.429738] r8152 8-2:1.0 eth2: v2.12.0 (2019/04/29) [595679.434859] r8152 8-2:1.0 eth2: This product is covered by one or more of th e following patents: [595796.928026] IPv6: ADDRCONF(NETDEV_UP): eth2: link is not ready [595797.027286] IPv6: ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready [595797.035408] r8152 8-2:1.0 eth2: carrier on

bb-qq commented 4 years ago

You may want to try the standard Gigabit Ethernet connection first. If it works, there seems to be a problem with the NBASE-T environment or thermal issue.

If it doesn't work, try removing other USB devices.

If that doesn't work too, reloading the driver may be the last solution: grep down /sys/class/net/eth2/operstate && synoservice pkgctl-r8152 --restart should invoke restarting the driver when the link state is down.

Also, thank you for your donation!

Siress commented 4 years ago

After my last post, I started using the RTL as the only gateway. I changed it's IP to my default IP for the NAS and unplugged LAN1. The connection has been reliable for the past couple of days. It sustained itself even through a scheduled sleep cycle.

Thank you for the script!

I don't believe the rest of this has anything to do with your work. I'm really just sharing it because it confirms your suspicion, and explains why I haven't verified that the setup hit the intended performance goal.

I finally had time to get iperf3 working and it's confirming your suspicion about the Tx. After you brought up your concern with 10GBase-T transceivers operating as 2.5/5 GBase-T speeds, I was sure to purchase a model of Tx that supposedly supports 2.5/5/10 GBase-T. Considering I'm not even hitting 100 Mbps speeds when it's connected to anything other than a matching Tx, I think it's fairly conclusive that it's "support" means that there is a connection...but only just barely.

Here's the summary. When I say "no Tx", that means I'm using the built-in RJ45 console port: PC to Mikrotik (10GbE, same Tx on both ends), then Mikrotik to... ...Router (GbE, no Tx), Router to LAN1 (GbE): Saturated, ~950 Mbps ...Router (GbE, no Tx), Router to RTL (presumably GbE): Saturated, ~915 Mbps ...RTL (presumably 2.5 GbE, includes Tx): Choked, ~87.5 Mbps ...LAN1 (GbE, includes Tx): Choked ~32.5 Mbps ...LAN1 (GbE, no Tx): ~945 Mbps

Further testing the Tx, I connected the PC (Tx) to the RTL directly. Windows reported 10 Gbe...so that's not to be trusted... and iperf resulted in 73 to 400 Mbps (avg. of 264).

Guess I'll look for a 2.5GBase-T Tx and hope for the best. It's proving a difficult search, so I'd appreciate any recommendations if you have them.

bb-qq commented 4 years ago

Hmm, it is a difficult situation...

What is your MTU value? Because of USB based ethernet drivers consume more CPU and the USB protocol has a large amount of overhead, enabling Jumbo-frame is required to achieve wire-speed in some cases.

Further testing the Tx, I connected the PC (Tx) to the RTL directly. Windows reported 10 Gbe...so that's not to be trusted... and iperf resulted in 73 to 400 Mbps (avg. of 264).

Can you fix link-speed to 1G form the Device Manager on the PC side?

Siress commented 4 years ago

I connected the PC (Tx) to RTL again for these values: DSM for LAN3 (RTL): 2500 Mbps, Full duplex, MTU 1500 Win10 for Mellanox: 10 Gbps, Jumbo Packet size of 1514

I haven't found a way to change the link-speed of the Mellanox card.

I varied the jumbo packet size with the same settings on each side:

I then varied the Mellanox Rx/Tx Buffers (256 to 4096 range per). Starting point: Rx/Tx buffer 4096/2048

Then to mix things up...

Returned all to 1500 MTU, buffers to default 4096/2048 => 131 Mbps (35 - 241); 2nd run => 269 Mbps (52 - 380).

Siress commented 4 years ago

I found a specification sheet for the Tx I've been using. Despite what I had previously read, it is not compatible with 2.5 / 5 GBase-T. I've ordered a FS(.com) 10G-T-SFP-PLUS that explicitly states compatibility with 1/2.5/5/10 GBase-T in the specification sheet.

bb-qq commented 4 years ago

Do you have another PC? Confirming PC to PC communication should help to isolate the problem.

Also, I noticed that Connectx-2 does not support NBASE-T because the device was released before publishing IEEE 802.3bz. We can only use 1Gigabit link under direct connection.

cherryfeelx commented 4 years ago

Can you assign an IP address after that?

yeah~ after "ifconfig eth3 up", goto your dsm webpage and go control panel -> network panel. Then you can see new Lan number what you added. And right click on Lan3 and go IPV4. Then check the get auto dhcp address.

Siress commented 4 years ago

I received the new Tx (10G-T-SFP-PLUS) today. I installed it into the Mikrotik, then connected it to the RTL (Syno) and ran iperf. No dice. ~88 Mbps to the Mellanox/desktop.

Do you have another PC? Confirming PC to PC communication should help to isolate the problem.

I have a laptop with GbE and USB 3.0 ports, but nothing I can plug the Mellanox card into. I connected the laptops GbE port into the RTL (Syno) and received GbE performance as confirmed by NIC status and iperf3 to my desktop. I then moved the RTL to a USB 3 port on my laptop and attached it to the new Tx in the Mikrotik. Iperf3 from my desktop... 69 Mbps. Sigh.

Also, I noticed that Connectx-2 does not support NBASE-T because the device was released before publishing IEEE 802.3bz. We can only use 1Gigabit link under direct connection.

That is a good catch. I haven't established a connection with the CRS305 interface yet, but I hope to find a way to run speed tests directly to/from it when I have time.

bb-qq commented 4 years ago

I have a laptop with GbE and USB 3.0 ports, but nothing I can plug the Mellanox card into. I connected the laptops GbE port into the RTL (Syno) and received GbE performance as confirmed by NIC status and iperf3 to my desktop. I then moved the RTL to a USB 3 port on my laptop and attached it to the new Tx in the Mikrotik. Iperf3 from my desktop... 69 Mbps. Sigh.

This result seems to indicate that CRS305 has an issue with 2.5G/5G, but this user reported it works. It's strange...

By the way, are you using the latest firmware? If not, it might be worth to update.

Siress commented 4 years ago

Well, I've now acquired the S+RJ10 transceiver and given it a whirl. It's at least negotiating and saturating 1GbE speeds now, so that's an improvement. I've also upgraded the firmware on the MikroTik CRS305. Per MikroTik, the CRS305 with S+RJ10 should auto-negotiate 1/2.5/5/10 GBase-T. The cable works at 10G speeds - verified. Not sure what's going on now... If I turn auto-negotiate off on the CRS305 then I lose the options for 2.5/5 G when using the WinBox gui. Not sure if I can get it run via command line but I'll try that next time I'm digging into it.

BTW - it seems there's some recurrence of the driver package not responding after the attached RTL device has been left disconnected for a time. The method to restart the driver from before still works fine (restart driver, issue the 'ifconfig eth2 up" command as root).

mervincm commented 4 years ago

I can confirm using S+RJ10 Mikrotik transceiver I get 2.5g auto-negotiated. please notethat unless you have the latest version of this transceiver you can not use jumbo frames at all, its a known bug.

Siress commented 4 years ago

Thank you for that information. I will turn them off when I return to debugging.

bb-qq commented 4 years ago

Did it go well?

Also please make sure using the front port because some users reported instability issues when they use rear ports.

Siress commented 4 years ago

Hey! Thanks for checking in. I have not yet returned to this project - even with the quarantine...!

Your comment about the front USB port is not feasible. That is a USB 2.0 port. As such, it is limited to a theoretical maximum of 480 Mbps; a far cry from the target 2500 Mbps.

bb-qq commented 4 years ago

I concluded Synology devices have a signal quality issue on rear USB ports from the fact while the front USB port is soldered on the main PCB, the rear USB port is not. (DS918+ tear down) It might be work if we connect the device to the header pins on the main PCB directly, but it is not realistic...

I will update the document to mention this.

NuKeMtje commented 3 years ago

Context

Model(platform): DS412+ (Cedarview) with 2048 MB RAM upgrade DSM version: 6.2.4-25556 Driver version: 2.15.0-1 Ethernet device: ASUSTOR AS-U2.5G2 (so with 'newer' RLT8156B) Working status: Works BUT

Advice: Don't spend your money on this if you have a older DS412+ model or don't get your hopes up

lsusb output

 lsusb
|__usb1          1d6b:0002:0310 09  2.00  480MBit/s 0mA 1IF  (ehci_hcd 0000:00:1a.7) hub
|__usb2          1d6b:0002:0310 09  2.00  480MBit/s 0mA 1IF  (ehci_hcd 0000:00:1d.7) hub
  |__2-1         f400:f400:0100 00  2.00  480MBit/s 98mA 1IF  (Synology Diskstation xxx)
|__usb3          1d6b:0001:0310 09  1.10   12MBit/s 0mA 1IF  (uhci_hcd 0000:00:1a.0) hub
|__usb4          1d6b:0001:0310 09  1.10   12MBit/s 0mA 1IF  (uhci_hcd 0000:00:1d.0) hub
|__usb5          1d6b:0001:0310 09  1.10   12MBit/s 0mA 1IF  (uhci_hcd 0000:00:1d.1) hub
|__usb6          1d6b:0001:0310 09  1.10   12MBit/s 0mA 1IF  (uhci_hcd 0000:00:1d.2) hub
|__usb7          1d6b:0002:0310 09  2.00  480MBit/s 0mA 1IF  (xhci_hcd 0000:04:00.0) hub
|__usb8          1d6b:0003:0310 09  3.00 5000MBit/s 0mA 1IF  (xhci_hcd 0000:04:00.0) hub
  |__8-1         0bda:8156:3100 00  3.20 5000MBit/s 256mA 1IF  (Realtek USB 10/100/1G/2.5G LAN 001000001)

iperf3 tests

Connected to a Mikrotik S+RJ10 v1 in a Miktrotik CRS309. Verified the module works at 2.5Gbit/s on a windows PC getting +2Gbit/s iperf speed results. I also want to note the previous version of de drivers (2.14.0-3) was working a little bit faster (not more than 100Mbit/s or so) All tests ran from a TrueNAS system which handles 10Gbit/s fine.

 iperf3 -c 192.168.10.181
Connecting to host 192.168.10.181, port 5201
[  5] local 192.168.10.23 port 55300 connected to 192.168.10.181 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  75.1 MBytes   630 Mbits/sec    5   58.4 KBytes
[  5]   1.00-2.00   sec  66.9 MBytes   561 Mbits/sec    5   68.4 KBytes
[  5]   2.00-3.00   sec  70.3 MBytes   590 Mbits/sec    7   52.7 KBytes
[  5]   3.00-4.00   sec  74.5 MBytes   625 Mbits/sec    6   68.3 KBytes
[  5]   4.00-5.00   sec  69.7 MBytes   585 Mbits/sec    8   59.8 KBytes
[  5]   5.00-6.00   sec  75.0 MBytes   629 Mbits/sec    9   71.2 KBytes
[  5]   6.00-7.00   sec  74.4 MBytes   624 Mbits/sec    7   54.1 KBytes
[  5]   7.00-8.00   sec  70.3 MBytes   590 Mbits/sec    6   61.2 KBytes
[  5]   8.00-9.00   sec  75.7 MBytes   635 Mbits/sec    6   46.9 KBytes
[  5]   9.00-10.00  sec  71.2 MBytes   597 Mbits/sec    5   61.2 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   723 MBytes   607 Mbits/sec   64             sender
[  5]   0.00-10.15  sec   723 MBytes   598 Mbits/sec                  receiver

 iperf3 -c 192.168.10.181 -P2
Connecting to host 192.168.10.181, port 5201
[  5] local 192.168.10.23 port 64470 connected to 192.168.10.181 port 5201
[  7] local 192.168.10.23 port 40467 connected to 192.168.10.181 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  64.8 MBytes   544 Mbits/sec    8   37.0 KBytes
[  7]   0.00-1.00   sec  13.3 MBytes   111 Mbits/sec   19   17.1 KBytes
[SUM]   0.00-1.00   sec  78.1 MBytes   655 Mbits/sec   27
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   1.00-2.00   sec  62.4 MBytes   523 Mbits/sec   13   57.0 KBytes
[  7]   1.00-2.00   sec  18.1 MBytes   152 Mbits/sec   30   15.7 KBytes
[SUM]   1.00-2.00   sec  80.4 MBytes   675 Mbits/sec   43
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   2.00-3.00   sec  64.8 MBytes   543 Mbits/sec    9   45.6 KBytes
[  7]   2.00-3.00   sec  13.7 MBytes   115 Mbits/sec   33   14.2 KBytes
[SUM]   2.00-3.00   sec  78.5 MBytes   659 Mbits/sec   42
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   3.00-4.00   sec  61.1 MBytes   513 Mbits/sec   17   32.8 KBytes
[  7]   3.00-4.00   sec  24.6 MBytes   207 Mbits/sec   47   28.5 KBytes
[SUM]   3.00-4.00   sec  85.8 MBytes   719 Mbits/sec   64
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   4.00-5.00   sec  67.3 MBytes   565 Mbits/sec    9   55.6 KBytes
[  7]   4.00-5.00   sec  15.1 MBytes   126 Mbits/sec   37   12.8 KBytes
[SUM]   4.00-5.00   sec  82.4 MBytes   691 Mbits/sec   46
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   5.00-6.00   sec  47.8 MBytes   401 Mbits/sec   14   41.3 KBytes
[  7]   5.00-6.00   sec  24.7 MBytes   207 Mbits/sec   30   18.5 KBytes
[SUM]   5.00-6.00   sec  72.5 MBytes   608 Mbits/sec   44
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   6.00-7.00   sec  60.5 MBytes   508 Mbits/sec   10   48.4 KBytes
[  7]   6.00-7.00   sec  10.2 MBytes  85.4 Mbits/sec   29   17.1 KBytes
[SUM]   6.00-7.00   sec  70.7 MBytes   593 Mbits/sec   39
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   7.00-8.00   sec  70.2 MBytes   589 Mbits/sec    9   58.4 KBytes
[  7]   7.00-8.00   sec  9.31 MBytes  78.1 Mbits/sec   27   17.1 KBytes
[SUM]   7.00-8.00   sec  79.5 MBytes   667 Mbits/sec   36
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   8.00-9.00   sec  70.3 MBytes   589 Mbits/sec    8   61.2 KBytes
[  7]   8.00-9.00   sec  7.53 MBytes  63.1 Mbits/sec   26   12.8 KBytes
[SUM]   8.00-9.00   sec  77.8 MBytes   653 Mbits/sec   34
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   9.00-10.00  sec  60.2 MBytes   505 Mbits/sec    9   41.3 KBytes
[  7]   9.00-10.00  sec  9.82 MBytes  82.4 Mbits/sec   26   12.8 KBytes
[SUM]   9.00-10.00  sec  70.0 MBytes   588 Mbits/sec   35
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   629 MBytes   528 Mbits/sec  106             sender
[  5]   0.00-10.14  sec   629 MBytes   521 Mbits/sec                  receiver
[  7]   0.00-10.00  sec   146 MBytes   123 Mbits/sec  304             sender
[  7]   0.00-10.14  sec   146 MBytes   121 Mbits/sec                  receiver
[SUM]   0.00-10.00  sec   776 MBytes   651 Mbits/sec  410             sender
[SUM]   0.00-10.14  sec   776 MBytes   642 Mbits/sec                  receiver

iperf3 -c 192.168.10.181 -R
Connecting to host 192.168.10.181, port 5201
Reverse mode, remote host 192.168.10.181 is sending
[  5] local 192.168.10.23 port 42532 connected to 192.168.10.181 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  84.0 MBytes   704 Mbits/sec
[  5]   1.00-2.00   sec  85.8 MBytes   719 Mbits/sec
[  5]   2.00-3.00   sec  85.5 MBytes   718 Mbits/sec
[  5]   3.00-4.00   sec  84.6 MBytes   710 Mbits/sec
[  5]   4.00-5.00   sec  84.1 MBytes   705 Mbits/sec
[  5]   5.00-6.00   sec  84.4 MBytes   708 Mbits/sec
[  5]   6.00-7.00   sec  85.7 MBytes   719 Mbits/sec
[  5]   7.00-8.00   sec  85.3 MBytes   716 Mbits/sec
[  5]   8.00-9.00   sec  82.1 MBytes   689 Mbits/sec
[  5]   9.00-10.00  sec  85.2 MBytes   715 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.14  sec   848 MBytes   702 Mbits/sec    0             sender
[  5]   0.00-10.00  sec   847 MBytes   710 Mbits/sec                  receiver

iperf3 -c 192.168.10.181 -R -P2
Connecting to host 192.168.10.181, port 5201
Reverse mode, remote host 192.168.10.181 is sending
[  5] local 192.168.10.23 port 20907 connected to 192.168.10.181 port 5201
[  7] local 192.168.10.23 port 33859 connected to 192.168.10.181 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec  43.0 MBytes   361 Mbits/sec
[  7]   0.00-1.00   sec  43.4 MBytes   364 Mbits/sec
[SUM]   0.00-1.00   sec  86.4 MBytes   725 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   1.00-2.00   sec  42.4 MBytes   356 Mbits/sec
[  7]   1.00-2.00   sec  42.5 MBytes   356 Mbits/sec
[SUM]   1.00-2.00   sec  84.9 MBytes   712 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   2.00-3.00   sec  42.1 MBytes   353 Mbits/sec
[  7]   2.00-3.00   sec  42.1 MBytes   353 Mbits/sec
[SUM]   2.00-3.00   sec  84.2 MBytes   706 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   3.00-4.00   sec  41.4 MBytes   347 Mbits/sec
[  7]   3.00-4.00   sec  41.3 MBytes   347 Mbits/sec
[SUM]   3.00-4.00   sec  82.7 MBytes   694 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   4.00-5.00   sec  43.0 MBytes   361 Mbits/sec
[  7]   4.00-5.00   sec  43.0 MBytes   361 Mbits/sec
[SUM]   4.00-5.00   sec  86.0 MBytes   721 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   5.00-6.00   sec  42.9 MBytes   360 Mbits/sec
[  7]   5.00-6.00   sec  43.0 MBytes   361 Mbits/sec
[SUM]   5.00-6.00   sec  85.9 MBytes   721 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   6.00-7.00   sec  42.6 MBytes   357 Mbits/sec
[  7]   6.00-7.00   sec  42.5 MBytes   356 Mbits/sec
[SUM]   6.00-7.00   sec  85.1 MBytes   714 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   7.00-8.00   sec  42.4 MBytes   356 Mbits/sec
[  7]   7.00-8.00   sec  42.5 MBytes   356 Mbits/sec
[SUM]   7.00-8.00   sec  84.9 MBytes   712 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   8.00-9.00   sec  42.7 MBytes   358 Mbits/sec
[  7]   8.00-9.00   sec  42.8 MBytes   359 Mbits/sec
[SUM]   8.00-9.00   sec  85.4 MBytes   716 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[  5]   9.00-10.00  sec  44.8 MBytes   376 Mbits/sec
[  7]   9.00-10.00  sec  39.9 MBytes   335 Mbits/sec
[SUM]   9.00-10.00  sec  84.7 MBytes   710 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.15  sec   428 MBytes   354 Mbits/sec    0             sender
[  5]   0.00-10.00  sec   427 MBytes   358 Mbits/sec                  receiver
[  7]   0.00-10.15  sec   424 MBytes   350 Mbits/sec    0             sender
[  7]   0.00-10.00  sec   423 MBytes   355 Mbits/sec                  receiver
[SUM]   0.00-10.15  sec   852 MBytes   704 Mbits/sec    0             sender
[SUM]   0.00-10.00  sec   850 MBytes   713 Mbits/sec                  receiver

Nothing to write home about. Total CPU goes up 20-30% during tests. During SMB transfer CPU goes to 90% at a speed of 60MB/s

Siress commented 1 year ago

Poked at this again. It's remarkable that this little NAS is still kicking after 11 years of continuous operation.

Revisiting #7

Constants:

Design of Experiments:

Learnings / Tips

  1. Use telnet into the Synology device. SSH gets dropped when changing MTU, telnet does not.
  2. Only change MTU in the non-Syno device and let Syno autonegotiate MTU size. Even though the 'network status' reports MTU size 1500, editing the LAN reveals MTU in greyed out box as 2000. However, it consistently has the best performance if you just let it autonegotiate.

Results It is possible to obtain 1/2 of the desired 2.5GbE speed with iperf3, but there are issues preventing this from being useful at this time.

Issues

  1. There's some sort of memory issue. I frequently had eth2 drop with a "SIOCSIFFLANGS: Cannot allocate memory" error. After adding a 2nd 2GB RAM stick (many years ago) and now having proper backups, I finally decided to make the community-recommended changes to optimize how the system uses the 4GB of RAM. This has not resulted in keeping the eth driver up.
  2. The connection sometimes starts off with ~600 Mbps and lots of dropped packets. I believe this is largely due to the memory issue (Learning 3) and was resolved by optimizing memory usage. Also, running the iper3 test multiple times often resolved the issue. It's possible this is a minor issue that resolves itself after a few minutes.