Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arch/zynq-mpsoc improve the ethernet driver #15769

Merged
merged 2 commits into from
Feb 7, 2025
Merged

Conversation

zouboan
Copy link
Contributor

@zouboan zouboan commented Feb 5, 2025

Summary

This PR improve the ethernet drivers to makes the net of zynq-mpsoc fully operational and enhances the convenience of using ZCU111, The main changes are as follows:

  1. Changes the phyadd to 0xC to speed up the training of phyadd.
  2. Set RX DMA buffer size configureable.
  3. Create netnsh configs as ethernet boot from QSPI FLASH.
  4. Fix some typo in zynq-mpsoc: add support for ethernet #15720 which is nonsynchronous with local code.

Impact

Impact on user: YES, this PR makes the net of zynq-mpsoc fully operational .
Impact on build: YES, this PR changes Makefile of ZCU11, but was fully tested.
Impact on hardware: YES. This impacts the zynq-mpsoc, but tested and passed on ZCU111 board.
Impact on documentation: NO, the documentation of zynq-mpsoc ethernet drivers has not created yet.
Impact on security: YES, this PR improved security of zynq-mpsoc ethernet drivers.
Impact on compatibility:YES, this PR makes zynq-mpsoc and zcu111 borad compatible with iperf app.

Testing

Build Host(s): Linux Ubuntu 22.04, x86_64, Linaro GCC 7.3-2018.04-rc3.
Target(s): Zynq UltraScale+ MPSoC ZCU111 board.
Testing logs:

netnsh:

1 tools/configure.sh zcu111:netnsh
2 make
3 flash to the QSPI flash of ZCU111 and boot:
4 iperf -s
5 iperf -c 192.168.0.15 -p 5001 on host PC

nsh>                                                                       
nsh> iperf -s                                                                   
     IP: 192.168.0.15                                                           
                                                                                
 mode=tcp-server sip=192.168.0.15:5001,dip=0.0.0.0:5001, interval=3, time=0     
accept: 192.168.0.101:54190                                                     
nxtask_activate: iperf_traffic pid=6,TCB=0x247c28                               
pthread_detach: Returning 0                                                     
                                                                                
           Interval         Transfer         Bandwidth                          
                                                                                
   0.00-   3.01 sec    1706280 Bytes    4.54 Mbits/sec                          
   3.01-   6.02 sec    1704834 Bytes    4.53 Mbits/sec                          
   6.02-   9.03 sec    1706280 Bytes    4.53 Mbits/sec                          
closed by the peer: 192.168.0.101:54190                                         
iperf exit                                                                      
nx_pthread_exit: exit_value=0                                                   
pthread_completejoin: pid=5 exit_value=0                                        
nxtask_exit: iperf_traffic pid=5,TCB=0x2459e0                                   
pthread_join: Returning 0, exit_value 0                                         
pthread_mutex_timedlock: mutex=0x1b7308                                         
pthread_mutex_timedlock: Returning 0                                            
pthread_mutex_unlock: mutex=0x1b7308                                            
pthread_mutex_unlock: Returning 0                                               
pthread_completejoin: pid=6 exit_value=0xffffffffffffffff                       
nxtask_exit: iperf pid=4,TCB=0x23edc0                                           
nsh>

6 iperf -s on host PC
7 iperf -c 192.168.0.101 -p 5001 on nsh

nsh>                                                                            
nsh> iperf -c 192.168.0.101 -p 5001                                             
task_spawn: name=iperf entry=0x136d10 file_actions=0x1e9d88 attr=0x1e9d90 argv=0
spawn_execattrs: Setting policy=2 priority=100 for pid=7                        
nxtask_activate: iperf pid=7,TCB=0x1ecdc0                                       
     IP: 192.168.0.15                                                           
                                                                                
 mode=tcp-client sip=192.168.0.15:5001,dip=192.168.0.101:5001, interval=3nxtask0
pthread_mutex_timedlock: mutex=0x164d70                                         
pthread_mutex_timedlock: Returning 0                                            
pthread_mutex_unlock: mutex=0x164d70                                            
pthread_mutex_unlock: Returning 0                                               
nxtask_activate: iperf_traffic pid=9,TCB=0x1f6068                               
pthread_detach: Returning 0                                                     
, time=30                                                                       
                                                                                
           Interval         Transfer         Bandwidth                          
                                                                                
   0.00-   3.34 sec    2113536 Bytes    5.07 Mbits/sec                          
   3.34-   6.66 sec    2113536 Bytes    5.08 Mbits/sec                          
   6.66-  10.02 sec    2129920 Bytes    5.08 Mbits/sec                          
  10.02-  13.45 sec    2162688 Bytes    5.05 Mbits/sec                          
  13.45-  16.84 sec    2162688 Bytes    5.09 Mbits/sec                          
  16.84-  20.20 sec    2129920 Bytes    5.08 Mbits/sec                          
  20.20-  23.55 sec    2129920 Bytes    5.08 Mbits/sec                          
  23.55-  27.00 sec    2179072 Bytes    5.06 Mbits/sec                          
  27.00-  30.32 sec    2097152 Bytes    5.05 Mbits/sec                          
   0.00-  30.32 sec nx_pthread_exit: exit_value=0                               
pthread_completejoin: pid=9 exit_value=0                                        
nxtask_exit: iperf_report pid=9,TCB=0x1f6068                                    
  19955712 Bytes    5.27 Mbits/sec                                              
iperf exit                                                                      
nx_pthread_exit: exit_value=0                                                   
pthread_completejoin: pid=8 exit_value=0                                        
nxtask_exit: iperf_traffic pid=8,TCB=0x1f3ed0                                   
pthread_join: Returning 0, exit_value 0                                         
pthread_mutex_timedlock: mutex=0x164d70                                         
pthread_mutex_timedlock: Returning 0                                            
pthread_mutex_unlock: mutex=0x164d70                                            
pthread_mutex_unlock: Returning 0                                               
nxtask_exit: iperf pid=7,TCB=0x1ecdc0                                           
nsh>  

telnet:

zouboan@mini:~$ telnet 192.168.0.15
Trying 192.168.0.15...
Connected to 192.168.0.15.
Escape character is '^]'.

NuttShell (NSH) NuttX-10.2.0
nsh> 
nsh> 
nsh> 

1. Changes the phyadd to 0xC to speed up the training of phyadd.
2. Set RX DMA buffer size configureable.
3. Create netnsh configs as ethernet boot from QSPI FLASH.
4. Fix some typo in apache#15720 which is nonsynchronous with local code.
@github-actions github-actions bot added Arch: arm64 Issues related to ARM64 (64-bit) architecture Board: arm64 Size: M The size of the change in this PR is medium labels Feb 5, 2025
Copy link
Contributor

@acassis acassis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit add documentation Description for ZYNQ-MPSOC's NET driver key
features and ethernet config of ZCU111.
@github-actions github-actions bot added the Area: Documentation Improvements or additions to documentation label Feb 6, 2025
@zouboan
Copy link
Contributor Author

zouboan commented Feb 6, 2025 via email

@anchao anchao merged commit 6dbb2ed into apache:master Feb 7, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch: arm64 Issues related to ARM64 (64-bit) architecture Area: Documentation Improvements or additions to documentation Board: arm64 Size: M The size of the change in this PR is medium
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants