Welcome! Log In Create A New Profile

Advanced

NSA310 + kirkwood 6.5.7 improve net performance

Posted by a3vap 
Re: NSA310 + kirkwood 6.5.7 improve net performance
March 14, 2024 01:54PM
@sudos,

> do you have non-free-firmware added to your
> apt sources and firmware-realtek
> installed?

The packges above are only relevant in Debian/kernel, which has no problem.

We are currently at issue with the RealTek driver in U-Boot. It could be that nobody has regression test this driver since U-Boot changed SW architecture to driver model. Or could be due to my lack of knowledge about this RealTek NIC.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA310 + kirkwood 6.5.7 improve net performance
March 16, 2024 06:27PM
Hi Peter,

Stay tune for another version.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA310 + kirkwood 6.5.7 improve net performance
March 17, 2024 01:45PM
Hi Peter,

Here is the new build.

uboot.2023.04-tld-1.nsa310.kwb_mar_17_2024.tar
sha256:
edd862674a87020f3cbf7ae781414d48fcb98220c3dc0c84e5e5e3051d7da4fe  uboot.2023.04-tld-1.nsa310.kwb_mar_17_2024.tar
136506f4484c93092c6e823cb60c55f4399321bf62aac21b35533db5ffd69c32  uboot.2023.04-tld-1.nsa310.kwb

Run kwboot with it, interrupt the u-boot countdown, and

dm tree 
pci 
dm tree 
ping <the router IP address>

If that did not work

pci enum 
pci 
dm tree 
ping <the router IP address> 
dm tree

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 03/17/2024 01:48PM by bodhi.
Attachments:
open | download - uboot.2023.04-tld-1.nsa310.kwb_mar_17_2024.tar (520 KB)
Re: NSA310 + kirkwood 6.5.7 improve net performance
March 17, 2024 03:26PM
Hi,

I have tried it. I noticed some waiting after printing "Net:", and the first "dm tree" now showed the device (I think this was not the case earlier), but sadly ping did not work.
root@raspberrypi:/home/pi# kwboot -t -B 115200 /dev/ttyAMA0 -b uboot.2023.04-tld-1.nsa310.kwb -p
Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [......................................................................]
 99 % [....................................]
[Type Ctrl-\ + c to quit]


U-Boot 2023.04-tld-1 (Mar 17 2024 - 11:28:14 -0700)
ZyXEL NSA310 1-Bay Power Media Server


SoC:   Kirkwood 88F6281_A1
Model: ZyXEL NSA310
DRAM:  256 MiB
Core:  15 devices, 12 uclasses, devicetree: separate
NAND:  128 MiB
Loading Environment from NAND... OK
Resetting console stdin/stdout/stderr to serial...
In:    serial
Out:   serial
Err:   serial
pcie0.0: Link up
Net: 
Warning: eth_rtl8169 MAC addresses don't match:
Address in ROM is               00:00:00:00:00:30
Address in environment is       52:3b:20:9c:11:51
eth0: eth_rtl8169
Hit any key to stop autoboot:  0
NSA310> dm tree
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [ + ]   simple_bus            |-- mbus@f1000000
 misc          0  [ + ]   pcie_mvebu_base       |   `-- pcie@82000000
 pci           0  [ + ]   pcie_mvebu            |       `-- pcie0.0
 pci           1  [ + ]   pci_bridge_drv        |           `-- pci_0:0.0
 ethernet      0  [ + ]   eth_rtl8169           |               `-- eth_rtl8169
 bootdev       0  [   ]   eth_bootdev           |                   `-- eth_rtl8169.bootdev
 simple_bus    1  [ + ]   simple_bus            |-- ocp@f1000000
 gpio          0  [   ]   gpio_mvebu            |   |-- gpio@10100
 gpio          1  [   ]   gpio_mvebu            |   |-- gpio@10140
 serial        0  [ + ]   ns16550_serial        |   |-- serial@12000
 timer         0  [ + ]   orion_timer           |   |-- timer@20300
 usb           0  [   ]   ehci_mvebu            |   |-- ehci@50000
 rtc           0  [   ]   rtc-mv                |   |-- rtc@10300
 ahci          0  [   ]   sata_mv_ahci          |   `-- sata@80000
 simple_bus    2  [   ]   simple_bus            |-- regulators
 bootstd       0  [   ]   bootstd_drv           `-- bootstd
 bootmeth      0  [   ]   bootmeth_distro           `-- distro
NSA310> pci
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.00.00   0x11ab     0x6281     Bridge device           0x04
01.00.00   0x10ec     0x8168     Network controller      0x00
NSA310> dm tree
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [ + ]   simple_bus            |-- mbus@f1000000
 misc          0  [ + ]   pcie_mvebu_base       |   `-- pcie@82000000
 pci           0  [ + ]   pcie_mvebu            |       `-- pcie0.0
 pci           1  [ + ]   pci_bridge_drv        |           `-- pci_0:0.0
 ethernet      0  [ + ]   eth_rtl8169           |               `-- eth_rtl8169
 bootdev       0  [   ]   eth_bootdev           |                   `-- eth_rtl8169.bootdev
 simple_bus    1  [ + ]   simple_bus            |-- ocp@f1000000
 gpio          0  [   ]   gpio_mvebu            |   |-- gpio@10100
 gpio          1  [   ]   gpio_mvebu            |   |-- gpio@10140
 serial        0  [ + ]   ns16550_serial        |   |-- serial@12000
 timer         0  [ + ]   orion_timer           |   |-- timer@20300
 usb           0  [   ]   ehci_mvebu            |   |-- ehci@50000
 rtc           0  [   ]   rtc-mv                |   |-- rtc@10300
 ahci          0  [   ]   sata_mv_ahci          |   `-- sata@80000
 simple_bus    2  [   ]   simple_bus            |-- regulators
 bootstd       0  [   ]   bootstd_drv           `-- bootstd
 bootmeth      0  [   ]   bootmeth_distro           `-- distro
NSA310> ping 192.168.1.1
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
Using eth_rtl8169 device
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address

ARP Retry count exceeded; starting again
ping failed; host 192.168.1.1 is not alive
NSA310> pci enum
NSA310> pci
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.00.00   0x11ab     0x6281     Bridge device           0x04
01.00.00   0x10ec     0x8168     Network controller      0x00
NSA310> dm tree
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [ + ]   simple_bus            |-- mbus@f1000000
 misc          0  [ + ]   pcie_mvebu_base       |   `-- pcie@82000000
 pci           0  [ + ]   pcie_mvebu            |       `-- pcie0.0
 pci           1  [ + ]   pci_bridge_drv        |           `-- pci_0:0.0
 ethernet      0  [ + ]   eth_rtl8169           |               `-- eth_rtl8169
 bootdev       0  [   ]   eth_bootdev           |                   `-- eth_rtl8169.bootdev
 simple_bus    1  [ + ]   simple_bus            |-- ocp@f1000000
 gpio          0  [   ]   gpio_mvebu            |   |-- gpio@10100
 gpio          1  [   ]   gpio_mvebu            |   |-- gpio@10140
 serial        0  [ + ]   ns16550_serial        |   |-- serial@12000
 timer         0  [ + ]   orion_timer           |   |-- timer@20300
 usb           0  [   ]   ehci_mvebu            |   |-- ehci@50000
 rtc           0  [   ]   rtc-mv                |   |-- rtc@10300
 ahci          0  [   ]   sata_mv_ahci          |   `-- sata@80000
 simple_bus    2  [   ]   simple_bus            |-- regulators
 bootstd       0  [   ]   bootstd_drv           `-- bootstd
 bootmeth      0  [   ]   bootmeth_distro           `-- distro
NSA310> ping 192.168.1.1
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
Using eth_rtl8169 device
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address
pci_hose_bus_to_phys: invalid physical address

ARP Retry count exceeded; starting again
ping failed; host 192.168.1.1 is not alive
NSA310> dm tree
 Class     Index  Probed  Driver                Name
-----------------------------------------------------------
 root          0  [ + ]   root_driver           root_driver
 simple_bus    0  [ + ]   simple_bus            |-- mbus@f1000000
 misc          0  [ + ]   pcie_mvebu_base       |   `-- pcie@82000000
 pci           0  [ + ]   pcie_mvebu            |       `-- pcie0.0
 pci           1  [ + ]   pci_bridge_drv        |           `-- pci_0:0.0
 ethernet      0  [ + ]   eth_rtl8169           |               `-- eth_rtl8169
 bootdev       0  [   ]   eth_bootdev           |                   `-- eth_rtl8169.bootdev
 simple_bus    1  [ + ]   simple_bus            |-- ocp@f1000000
 gpio          0  [   ]   gpio_mvebu            |   |-- gpio@10100
 gpio          1  [   ]   gpio_mvebu            |   |-- gpio@10140
 serial        0  [ + ]   ns16550_serial        |   |-- serial@12000
 timer         0  [ + ]   orion_timer           |   |-- timer@20300
 usb           0  [   ]   ehci_mvebu            |   |-- ehci@50000
 rtc           0  [   ]   rtc-mv                |   |-- rtc@10300
 ahci          0  [   ]   sata_mv_ahci          |   `-- sata@80000
 simple_bus    2  [   ]   simple_bus            |-- regulators
 bootstd       0  [   ]   bootstd_drv           `-- bootstd
 bootmeth      0  [   ]   bootmeth_distro           `-- distro
NSA310>

Some random thoughts and questions:
1) Is the "pci_hose_bus_to_phys: invalid physical address" concerning? I found it around https://github.com/u-boot/u-boot/blob/master/drivers/pci/pci_common.c when seemingly translating some address to some other address :), and as far as I understood it, if the message is displayed, the physicaladdress is not calculated, and returns 0. Is this physicaladdress some PCI address or the MAC?

2) Also, I have noticed that in uboot there is a reset command. When I try that, I see that one interface is recognized as egiga0, but not with rtl drivers. This may be completely irrelevant, but the commands you mention do not work, also ping doesn't, but there is no "invalid physical address" message.
NSA310> reset
resetting ...

U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:54:15 -0700)
ZyXEL NSA310 1-Bay Power Media Server


SoC:   Kirkwood 88F6281_A1
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  128 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
PHY reset timed out
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot:  0
NSA310> dm tree
Unknown command 'dm' - try 'help'
NSA310> ping 192.168.1.1
Using egiga0 device

ARP Retry count exceeded; starting again
ping failed; host 192.168.1.1 is not alive
NSA310>

3) The NAS, when booting from rootfs on HDD, gets the 192.168.1.158. When kwbooting, I don't see it in the DHCP client list. Of course, if the eth driver is not loaded, there is no DHCP. Is there something like "ip a" while kwbooting to confirm the local IP?
Re: NSA310 + kirkwood 6.5.7 improve net performance
March 17, 2024 03:50PM
Thaks for testing!

NSA310> pci
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.00.00   0x11ab     0x6281     Bridge device           0x04
01.00.00   0x10ec     0x8168     Network controller      0x00

That's what I want to see.

> Some random thoughts and questions:
> 1) Is the "pci_hose_bus_to_phys: invalid physical
> address" concerning? I found it around
> https://github.com/u-boot/u-boot/blob/master/drivers/pci/pci_common.c
> when seemingly translating some address to some
> other address :), and as far as I understood it,
> if the message is displayed, the physicaladdress
> is not calculated, and returns 0. Is this
> physicaladdress some PCI address or the MAC?

It's the PHY address of the PCI device.

> 2) Also, I have noticed that in uboot there is a
> reset command. When I try that, I see that one
> interface is recognized as egiga0, but not with
> rtl drivers. This may be completely irrelevant,
> but the commands you mention do not work, also
> ping doesn't, but there is no "invalid physical
> address" message.

> MV88E1318 PHY initialized on egiga0

That was a wrong detection in 2017.07 u-boot, which was a left over from NSA325/310s/320 code. The MV88E1318 is a Marvell network chip. This box does not have that chip, but the driver was running in the 2017.07 u-boot.

> 3) The NAS, when booting from rootfs on HDD, gets
> the 192.168.1.158.

That's because the Linux kernel driver for RTL8169 is working so you have network connection through the RealTek NIC.

> When kwbooting, I don't see it
> in the DHCP client list. Of course, if the eth
> driver is not loaded, there is no DHCP.

Everything looks normal in the dm tree when you kwboot it. The driver was loaded, the device was created.

The error indicates that the PHY address was wrong (for non-existent). And I have not found why that problem occurred in the u-boot driver (I thought I did :).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: