TX network is very slow on ls1028 platform

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

TX network is very slow on ls1028 platform

569 Views
Eddy1
Contributor IV

Hi:

I'm compiling Ubuntu image to use lsdk2012, I exchange iperf3 server and client .but the network(swp0-swp3) is only  800 megabytes . Can you give some suggestions?

root@localhost:~# iperf3 -c 192.168.40.2 -i 2
Connecting to host 192.168.40.2, port 5201
[ 4] local 192.168.40.249 port 53520 connected to 192.168.40.2 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-2.00 sec 198 MBytes 831 Mbits/sec 120 139 KBytes
[ 4] 2.00-4.00 sec 200 MBytes 839 Mbits/sec 81 175 KBytes
[ 4] 4.00-6.00 sec 201 MBytes 842 Mbits/sec 64 153 KBytes
[ 4] 6.00-8.00 sec 196 MBytes 822 Mbits/sec 68 143 KBytes
[ 4] 8.00-10.00 sec 201 MBytes 844 Mbits/sec 96 129 KBytes

0 Kudos
2 Replies

552 Views
yipingwang
NXP TechSupport
NXP TechSupport

You need to use the following command to specify the number of thread with "-p" option.

# iperf3 -c 192.168.40.2 -P 10 -t 30

0 Kudos

543 Views
Eddy1
Contributor IV

Hi:

Thank you for your reply, but occasionally there will be more than 800 megabytes

[ 4] 13.00-14.00 sec 7.46 MBytes 62.6 Mbits/sec 103 11.3 KBytes
[ 6] 13.00-14.00 sec 16.3 MBytes 137 Mbits/sec 209 17.0 KBytes
[ 8] 13.00-14.00 sec 8.08 MBytes 67.8 Mbits/sec 98 5.66 KBytes
[ 10] 13.00-14.00 sec 17.0 MBytes 142 Mbits/sec 172 79.2 KBytes
[ 12] 13.00-14.00 sec 6.96 MBytes 58.4 Mbits/sec 86 11.3 KBytes
[ 14] 13.00-14.00 sec 9.69 MBytes 81.3 Mbits/sec 113 14.1 KBytes
[ 16] 13.00-14.00 sec 7.89 MBytes 66.2 Mbits/sec 79 24.0 KBytes
[ 18] 13.00-14.00 sec 6.65 MBytes 55.8 Mbits/sec 98 2.83 KBytes
[ 20] 13.00-14.00 sec 8.51 MBytes 71.4 Mbits/sec 154 22.6 KBytes
[ 22] 13.00-14.00 sec 9.20 MBytes 77.1 Mbits/sec 150 9.90 KBytes
[SUM] 13.00-14.00 sec 97.7 MBytes 819 Mbits/sec 1262

I will briefly explain my testing process. Before, I directly used the LSDK official kernel(5.4.47) and tested with iperf3,the rate is only more than 300 megabytes. Then I modified the kernel DSA driver, as shown below:

diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index 867b9fac4..9b4e5dd93 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -349,10 +349,18 @@ static void felix_phylink_mac_link_up(struct dsa_switch *ds, int port,
                         ANA_PORT_PORT_CFG, port);
 
        /* Core: Enable port for frame transfer */
+       /*
        ocelot_write_rix(ocelot, QSYS_SWITCH_PORT_MODE_INGRESS_DROP_MODE |
                         QSYS_SWITCH_PORT_MODE_SCH_NEXT_CFG(1) |
                         QSYS_SWITCH_PORT_MODE_PORT_ENA,
-                        QSYS_SWITCH_PORT_MODE, port);
+                        QSYS_SWITCH_PORT_MODE, port);*/
+         ocelot_write_rix(ocelot,
+                          QSYS_SWITCH_PORT_MODE_SCH_NEXT_CFG(1) |
+                          QSYS_SWITCH_PORT_MODE_PORT_ENA,
+                               QSYS_SWITCH_PORT_MODE, port);
+       ocelot_port_writel(ocelot_port,
+                               DEV_CLOCK_CFG_LINK_SPEED(OCELOT_SPEED_1000),
+                               DEV_CLOCK_CFG);
 }

 

After modification, the rate can reach 820-920 megabytes.

0 Kudos