Network Setup
It’s assumed that the WHLE boards are connected in the following setup:
...
The whle_ls1026_0
, whle_ls1026_1
are endpoints while whle_ls1046_0
, whle_ls1046_1
are gateways.
System setup
All hosts have the same system setup.
System
For the tests the Conclusive Ubuntu image was used, version ubuntu-jammy-whle-ls1046a-2024-05-15-6ccb862.img
, available at https://gitlab.conclusive.pl/devices/ubuntu-build/-/packages/109.
Kernel
Make sure /etc/default/u-boot
contains kernel arguments bportals=s0 qportals=s0 iommu.passthrough=1
...
Code Block |
---|
label l1 menu label Ubuntu 22.04 LTS 6.1.56-whle-ls1-sdk-ga9c58120e2b7 linux /boot/vmlinuz-6.1.56-whle-ls1-sdk-ga9c58120e2b7 initrd /boot/initrd.img-6.1.56-whle-ls1-sdk-ga9c58120e2b7 fdtdir /usr/lib/linux-image-6.1.56-whle-ls1-sdk-ga9c58120e2b7/ append root=UUID=4e117e32-2acc-400d-8d97-915b6c99c41e console=ttyS0,115200 earlycon=uart8250,mmio,0x21c0500 rootwait rw bportals=s0 qportals=s0 iommu.passthrough=1 |
Reboot the board.
Software
Code Block |
---|
# apt-get install -q0 fmc iperf3 bridge-utils |
FMC setup
Before any network setup run the fmc tool to set up packet queuing rules.
...
This configuration forms a single, core-affined queue for all traffic. In this way the performance X of a single core in the role of a router or a bridge can be isolated and measured. The performance of the whole processor depends on how evenly the traffic is distributed among the cores, which, if done properly, can easily get close to 4X in case of LS1046 or 2X in case of LS1026. How to evenly distribute the traffic with the queuing rules ultimately depends on the nature of traffic the board is supposed to forward and it’s outside of scope of this tutorial. On technical details of defining the policies please refer to https://www.nxp.com/docs/en/application-note/AN4760.pdf.
Router
Network setup
Enable routing in kernel
whle_ls1046_*:
Code Block |
---|
# echo 1 > /proc/sys/net/ipv4/ip_forward |
Set up the network (eth0
is assumed to be the control interface, omitted from the setup)
whle_ls1026_0
Code Block |
---|
# ip address flush eth1 # ip address flush eth2 # ip address flush eth3 # ip address flush eth4 # ip address flush eth5 # ip addr add 192.168.10.1/24 dev eth4 # ip addr add 192.168.11.1/24 dev eth4 # ip link set dev eth4 up # ip link set dev eth5 up # ip route add 192.168.20.0/24 via 192.168.10.2 # ip route add 192.168.30.0/24 via 192.168.10.2 # ip route add 192.168.31.0/24 via 192.168.11.2 |
whle_ls1046_0
Code Block |
---|
# ip address flush eth1 # ip address flush eth2 # ip address flush eth3 # ip address flush eth4 # ip address flush eth5 # ip addr add 192.168.10.2/24 dev eth5 # ip addr add 192.168.11.2/24 dev eth5 # ip addr add 192.168.20.1/24 dev eth4 # ip link set dev eth4 up # ip link set dev eth5 up # ip route add 192.168.30.0/24 via 192.168.20.2 # ip route add 192.168.31.0/24 via 192.168.20.2 |
whle_ls1046_1
Code Block |
---|
# ip address flush eth1 # ip address flush eth2 # ip address flush eth3 # ip address flush eth4 # ip address flush eth5 # ip addr add 192.168.20.2/24 dev eth5 # ip addr add 192.168.30.1/24 dev eth4 # ip addr add 192.168.31.1/24 dev eth4 # ip link set dev eth4 up # ip link set dev eth5 up # ip route add 192.168.10.0/24 via 192.168.20.1 # ip route add 192.168.11.0/24 via 192.168.20.1 |
whle_ls1026_1
Code Block |
---|
# ip address flush eth1 # ip address flush eth2 # ip address flush eth3 # ip address flush eth4 # ip address flush eth5 # ip addr add 192.168.30.2/24 dev eth5 # ip addr add 192.168.31.2/24 dev eth5 # ip link set dev eth4 up # ip link set dev eth5 up # ip route add 192.168.10.0/24 via 192.168.30.1 # ip route add 192.168.11.0/24 via 192.168.31.1 # ip route add 192.168.20.0/24 via 192.168.30.1 |
Testing
whle_ls1026_0
Code Block |
---|
# iperf3 -s |
whle_ls1026_1
Code Block |
---|
# iperf3 -c 192.168.10.1 |
...
The network speed close to 4 Gb/s is achieved on a single core in the router role, which allows LS1026 to achieve around 7 Gb/s and LS1046 to easily surpass 9 Gb/s even with sub-optimal queuing, both using standard kernel DPAA drivers.
L2 Bridge
Network setup
whle_ls1046_*
Code Block |
---|
# ip address flush eth4 # ip address flush eth5 # ip link set dev eth4 down # ip link set dev eth5 down # brctl addbr br0 # brctl addif br0 eth4 # brctl addif br0 eth5 # ip link set dev br0 up # ip link set dev eth4 up # ip link set dev eth5 up |
whle_ls1026_0
Code Block |
---|
# ip address flush eth4 # ip address add 192.168.10.1/24 dev eth4 # ip link set dev eth4 up |
whle_ls1026_1
Code Block |
---|
# ip address flush eth5 # ip address add 192.168.10.2/24 dev eth5 # ip link set dev eth5 up |
Testing
whle_ls1026_0
Code Block |
---|
# iperf3 -s |
whle_ls1026_1
Code Block |
---|
# iperf3 -c 192.168.10.1 |
...