zhhyu7 opened a new pull request, #17895:
URL: https://github.com/apache/nuttx/pull/17895

   ## Summary
   reuse the netpool module to optimize the code implementation.
   
   ## Impact
   net route in memory mode.
   
   ## Testing
   sim:matter with enable CONFIG_NET_ROUTE
   NuttX test log:
   ```
   NuttShell (NSH) NuttX-12.12.0
   MOTD: username=admin password=Administrator
   nsh> 
   nsh> ifconfig
   eth0 Link encap:Ethernet HWaddr 42:e1:c4:3f:48:dd at RUNNING mtu 1500
        inet addr:10.0.1.2 DRaddr:10.0.1.1 Mask:255.255.255.0
        inet6 addr: 3380::40e1:c4ff:fe3f:48dd/64
        inet6 DRaddr: fe80::a096:6ff:fe65:382a
   
   lo   Link encap:Local Loopback at RUNNING mtu 1518
        inet addr:127.0.0.1 DRaddr:127.0.0.1 Mask:255.0.0.0
        inet6 addr: ::1/128
        inet6 DRaddr: ::1
   
   nsh> route ipv4
   SEQ   TARGET          NETMASK         ROUTER          
      1. 0.0.0.0         0.0.0.0         10.0.1.1        
   nsh> ping -c 3 8.8.8.8
   PING 8.8.8.8 56 bytes of data
   56 bytes from 8.8.8.8: icmp_seq=0 time=40.0 ms
   56 bytes from 8.8.8.8: icmp_seq=1 time=40.0 ms
   56 bytes from 8.8.8.8: icmp_seq=2 time=40.0 ms
   3 packets transmitted, 3 received, 0% packet loss, time 3030 ms
   rtt min/avg/max/mdev = 40.000/40.000/40.000/0.000 ms
   nsh> delroute 0.0.0.0 0.0.0.0
   nsh> ping -c 3 8.8.8.8
   PING 8.8.8.8 56 bytes of data
   56 bytes from 8.8.8.8: icmp_seq=0 time=40.0 ms
   56 bytes from 8.8.8.8: icmp_seq=1 time=40.0 ms
   56 bytes from 8.8.8.8: icmp_seq=2 time=40.0 ms
   3 packets transmitted, 3 received, 0% packet loss, time 3030 ms
   rtt min/avg/max/mdev = 40.000/40.000/40.000/0.000 ms
   nsh> route ipv4
   nsh> addroute 0.0.0.0 0.0.0.0 127.0.0.1
   nsh> route ipv4
   SEQ   TARGET          NETMASK         ROUTER          
      1. 0.0.0.0         0.0.0.0         127.0.0.1       
   nsh> ping -c 3 8.8.8.8
   PING 8.8.8.8 56 bytes of data
   No response from 8.8.8.8: icmp_seq=0 time=1000 ms
   No response from 8.8.8.8: icmp_seq=1 time=1000 ms
   No response from 8.8.8.8: icmp_seq=2 time=1000 ms
   3 packets transmitted, 0 received, 100% packet loss, time 3030 ms
   nsh> addroute 0.0.0.0 0.0.0.0 10.0.1.1
   nsh> route ipv4
   SEQ   TARGET          NETMASK         ROUTER          
      1. 0.0.0.0         0.0.0.0         127.0.0.1       
      2. 0.0.0.0         0.0.0.0         10.0.1.1        
   nsh> ping -c 3 8.8.8.8
   PING 8.8.8.8 56 bytes of data
   No response from 8.8.8.8: icmp_seq=0 time=1000 ms
   No response from 8.8.8.8: icmp_seq=1 time=1000 ms
   No response from 8.8.8.8: icmp_seq=2 time=1000 ms
   3 packets transmitted, 0 received, 100% packet loss, time 3030 ms
   nsh> delroute 0.0.0.0 0.0.0.0
   nsh> route ipv4
   SEQ   TARGET          NETMASK         ROUTER          
      1. 0.0.0.0         0.0.0.0         10.0.1.1        
   nsh> ping -c 3 8.8.8.8
   PING 8.8.8.8 56 bytes of data
   56 bytes from 8.8.8.8: icmp_seq=0 time=40.0 ms
   56 bytes from 8.8.8.8: icmp_seq=1 time=40.0 ms
   56 bytes from 8.8.8.8: icmp_seq=2 time=40.0 ms
   3 packets transmitted, 3 received, 0% packet loss, time 3030 ms
   rtt min/avg/max/mdev = 40.000/40.000/40.000/0.000 ms
   nsh> 
   nsh> poweroff
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to