LwIP FreeRTOS throughput for S32G399

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

LwIP FreeRTOS throughput for S32G399

1,677 Views
rizwan_at_disruptdotcom
Contributor III

Hello,

I am concerned regarding iPerf results I got with 1G gmac speed, using the available Lwip freertos example.

RTD: S32 Real-Time Drivers Version 4.0.2 HF03

Example lwip_FreeRTOS_S32G399A_M7

Board: https://www.nxp.com/design/design-center/development-boards-and-designs/GOLDBOX-3

Default example iperf result: 

iperf -c 192.168.0.200 -p 5001 -P 1 -i 1 -t 20

------------------------------------------------------------

Client connecting to 192.168.0.200, TCP port 5001

TCP window size: 2.50 MByte (default)

------------------------------------------------------------

[  1] local 192.168.0.10 port 38578 connected with 192.168.0.200 port 5001

[ ID] Interval       Transfer     Bandwidth

[  1] 0.0000-1.0000 sec  20.6 MBytes   173 Mbits/sec

[  1] 1.0000-2.0000 sec  13.9 MBytes   116 Mbits/sec

[  1] 2.0000-3.0000 sec  15.2 MBytes   128 Mbits/sec

[  1] 3.0000-4.0000 sec  15.1 MBytes   127 Mbits/sec

[  1] 4.0000-5.0000 sec  14.0 MBytes   117 Mbits/sec

[  1] 5.0000-6.0000 sec  15.1 MBytes   127 Mbits/sec

[  1] 6.0000-7.0000 sec  13.9 MBytes   116 Mbits/sec

[  1] 7.0000-8.0000 sec  15.1 MBytes   127 Mbits/sec

[  1] 8.0000-9.0000 sec  13.9 MBytes   116 Mbits/sec

[  1] 9.0000-10.0000 sec  14.0 MBytes   117 Mbits/sec

[  1] 10.0000-11.0000 sec  15.1 MBytes   127 Mbits/sec

[  1] 11.0000-12.0000 sec  13.9 MBytes   116 Mbits/sec

[  1] 12.0000-13.0000 sec  15.1 MBytes   127 Mbits/sec

[  1] 13.0000-14.0000 sec  13.9 MBytes   116 Mbits/sec

[  1] 14.0000-15.0000 sec  15.2 MBytes   128 Mbits/sec

[  1] 15.0000-16.0000 sec  13.9 MBytes   116 Mbits/sec

[  1] 16.0000-17.0000 sec  13.9 MBytes   116 Mbits/sec

[  1] 17.0000-18.0000 sec  15.1 MBytes   127 Mbits/sec

[  1] 18.0000-19.0000 sec  13.9 MBytes   116 Mbits/sec

[  1] 19.0000-20.0000 sec  14.0 MBytes   117 Mbits/sec

[  1] 20.0000-20.3825 sec   128 KBytes  2.74 Mbits/sec

[  1] 0.0000-20.3825 sec   295 MBytes   121 Mbits/sec

 

iPerf results with tcpip_thread prio set to 2 instead of 1, and increased tcpip mbox to 80, No of TCP segments PCB set to 80 instead of 20 and tcpip msg api/inpkt set to 40 instead of 20:
tcpip-transport.pngtcpip-mem.png

 

iperf -c 192.168.0.200 -p 5001 -P 1 -i 1 -t 20

------------------------------------------------------------

Client connecting to 192.168.0.200, TCP port 5001

TCP window size: 2.50 MByte (default)

------------------------------------------------------------

[  1] local 192.168.0.10 port 38134 connected with 192.168.0.200 port 5001

[ ID] Interval       Transfer     Bandwidth

[  1] 0.0000-1.0000 sec  22.0 MBytes   185 Mbits/sec

[  1] 1.0000-2.0000 sec  17.0 MBytes   143 Mbits/sec

[  1] 2.0000-3.0000 sec  15.6 MBytes   131 Mbits/sec

[  1] 3.0000-4.0000 sec  15.6 MBytes   131 Mbits/sec

[  1] 4.0000-5.0000 sec  17.0 MBytes   143 Mbits/sec

[  1] 5.0000-6.0000 sec  15.6 MBytes   131 Mbits/sec

[  1] 6.0000-7.0000 sec  15.5 MBytes   130 Mbits/sec

[  1] 7.0000-8.0000 sec  15.6 MBytes   131 Mbits/sec

[  1] 8.0000-9.0000 sec  15.6 MBytes   131 Mbits/sec

[  1] 9.0000-10.0000 sec  15.6 MBytes   131 Mbits/sec

[  1] 10.0000-11.0000 sec  17.0 MBytes   143 Mbits/sec

[  1] 11.0000-12.0000 sec  15.6 MBytes   131 Mbits/sec

[  1] 12.0000-13.0000 sec  15.6 MBytes   131 Mbits/sec

[  1] 13.0000-14.0000 sec  17.0 MBytes   143 Mbits/sec

[  1] 14.0000-15.0000 sec  15.6 MBytes   131 Mbits/sec

[  1] 15.0000-16.0000 sec  15.6 MBytes   131 Mbits/sec

[  1] 16.0000-17.0000 sec  16.6 MBytes   139 Mbits/sec

[  1] 17.0000-18.0000 sec  16.0 MBytes   134 Mbits/sec

[  1] 18.0000-19.0000 sec  15.6 MBytes   131 Mbits/sec

[  1] 19.0000-20.0000 sec  15.6 MBytes   131 Mbits/sec

[  1] 20.0000-20.3902 sec   128 KBytes  2.69 Mbits/sec

[  1] 0.0000-20.3902 sec   326 MBytes   134 Mbits/sec

 

I want to know what is the tested limit for lwip stack on s32g3 cortex m7 with freertos?

I expect around 8-900Mbits/second throughput on iPerf with no other task other than the iperf application and the tcpip_thread.

Any help/insights would be appreciated.

 

 

 

0 Kudos
Reply
6 Replies

1,628 Views
rizwan_at_disruptdotcom
Contributor III

@alejandro_e 
One more question: 

If we use PFE but with same stack: Lwip, EthIf, Eth, Gmac_Ip with FreeRTOS. Will the iperf results be better? Can you please provide numbers if this experiment is documented already.

Thanks!

0 Kudos
Reply

1,651 Views
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @rizwan_at_disruptdotcom,

Thanks for reaching out to us. Regarding your question, the command you shared measures the throughput of the bytes in the payload in the TCP frame, it does not show the raw throughput. Even if the line is transmitting at 100% capacity, you will never see  a value close to 1000Mbits/s, the TCP frames and the protocol itself includes quite a heavy overhead that needs to be processed in the M7 core. The value you see does not include the framing of the payload, nor the handshakes, ACKs and retransmissions. It only shows the effective payload transmitted from the host to the board. Therefore the bottleneck is in the M7 core. You could try to run the same test using the A53 cores running Linux, those are more powerful cores and should be affected noticeably less than the M7 cores. 

You can also use the PFE network accelerator which offloads the handling process of the application cores. However, this depends on your network requirements.

 

Let me know if you have more questions.

 

0 Kudos
Reply

1,637 Views
rizwan_at_disruptdotcom
Contributor III

@alejandro_e  Can you confirm that this is the ceiling limit for the cortex-m7/lwip/freertos or is there room for optimization in the integration. Does NXP has its own numbers for this stack? The documentation that came with this example does not talk about throughput numbers at all.

0 Kudos
Reply

1,608 Views
alejandro_e
NXP TechSupport
NXP TechSupport

Hello @rizwan_at_disruptdotcom,

Please find my answers below: 

> Can you confirm that this is the ceiling limit for the cortex-m7/lwip/freertos or is there room for optimization in the integration. Does NXP has its own numbers for this stack? The documentation that came with this example does not talk about throughput numbers at all.

We do not offer official test results, although checking internally your results are about what others are getting. I got a slight improvement after chaning MEMP_NUM_UDP_PCB from 8 to 32, I got around a maximum of 134Mbits/s, while before I was getting a maximum of 123. Note that the lwip configuration in the RTD4.0.2 is the fastest version we have delivered, improvements were added in previous verions.

Since lwip is not an NXP product, we do not offer official results or advertise any kind of expected performance, we offer the example "as is". You can check the lwip documentation to get information on how to improve the performance.

 

> If we use PFE but with same stack: Lwip, EthIf, Eth, Gmac_Ip with FreeRTOS. Will the iperf results be better? Can you please provide numbers if this experiment is documented already.

I have very little knowledge on what exactly the iperf tests does, however, for what I have seen, the performance may even be worse, I mentioned the PFE with the idea of accelerating your final application. Basically the PFE can route, shape and classify packages automatically, this is, without the application core spending time on that, the configuration is highly dependent on your application and thus, a general test like iperf may not benefit from it. if you prefer, you can share some general details of your final application and I can help you identifying the best options.

In the PFE example application you can generate a configuration with lwip and check if it is appropriate for your requirements. Regarding the documentation of the results, we do not offer those results, just as in the GMAC example.

As a heads up, the PFE can be quite tricky to configure from the M7 side, so if you have any question please let me know.

 

Regards

0 Kudos
Reply

1,560 Views
rizwan_at_disruptdotcom
Contributor III

@alejandro_e 
thank you for the detailed reply.

I have more questions and numbers which, unfortunately, they are even more concerning:

Setup:

  • gPTP task firing every 3ms as required by gPTP manual and of prio lower than tcpip_thread
  • tcpip_thread at max prio in system
  • LwIP port in gmacif.c updated to use EthIf instead so that bot gPTP and LwIP use one interface to speak to driver. Which required me to remove zero-copy support in RX and TX path because of EthIf and Eth APIs. Eth requires ownership of DMA buffers so we can not do pbuf_alloced_custom and let lwIP decide when to return DMA buffers to Eth. Similarly, TX path does not allow zero copy because we have to use EthIf API to get txBuf from driver and lwIP can not directly map its pbuf to txBuf.

Results: Iperf dropped down to 40.3 Mbits/sec 

  • IMHO this is because of EthIf dependency in gPTP stack provided by NXP that we had to update LwIP porting layer to use EthIf/Eth API instead of directly using Gmac_Ip API. Can you please confirm these numbers or are they different from your expectation. 
  • Is there a plan for updating gPTP implementation to use Gmac_Ip instead of EthIf?
  • What is the recommended way to integrate gPTP along with lwIP in one system. We want to keep zero-copy for RX and TX path to keep throughput at max possible rate.

Any help here is much appreciated,
Rizwan.

0 Kudos
Reply

1,430 Views
alejandro_e
NXP TechSupport
NXP TechSupport

Hello again @rizwan_at_disruptdotcom,

Please find my answers below:

- We do not have official test results when combining gPTP and LWIP, however, chaining from the Gmac_Ip API to the EthIf is not expected to slow down the throughput in such a magnitude. My conclusion is that the gPTP is using more core processing time and therefore the throughput gets affected so much.

 

- There is no plan to update gPTP from EthIf to Gmac_Ip.

 

- We have any document on how to integrate both components, furthermore, my expertise on both is quite limited and therefore I cannot give you any recommendation.

 

As I mentioned above, my recommendations are to use the A53 cores or use the PFE accelerator, depending on your application.

 

Let me know if you have more questions.

 

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2343143%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ELwIP%20FreeRTOS%20throughput%20for%20S32G399%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2343143%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3CBR%20%2F%3E%3CBR%20%2F%3EI%20am%20concerned%20regarding%20iPerf%20results%20I%20got%20with%201G%20gmac%20speed%2C%20using%20the%20available%20Lwip%20freertos%20example.%3C%2FP%3E%3CP%3ERTD%3A%26nbsp%3B%3CSPAN%3ES32%20Real-Time%20Drivers%20Version%204.0.2%20HF03%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EExample%20lwip_FreeRTOS_S32G399A_M7%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EBoard%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Fdevelopment-boards-and-designs%2FGOLDBOX-3%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Ehttps%3A%2F%2Fwww.nxp.com%2Fdesign%2Fdesign-center%2Fdevelopment-boards-and-designs%2FGOLDBOX-3%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EDefault%20example%20iperf%20result%3A%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Eiperf%20-c%20192.168.0.200%20-p%205001%20-P%201%20-i%201%20-t%2020%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E------------------------------------------------------------%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EClient%20connecting%20to%20192.168.0.200%2C%20TCP%20port%205001%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ETCP%20window%20size%3A%202.50%20MByte%20(default)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E------------------------------------------------------------%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%20local%20192.168.0.10%20port%2038578%20connected%20with%20192.168.0.200%20port%205001%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%20ID%5D%20Interval%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Transfer%20%26nbsp%3B%20%26nbsp%3B%20Bandwidth%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%200.0000-1.0000%20sec%26nbsp%3B%2020.6%20MBytes%20%26nbsp%3B%20173%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%201.0000-2.0000%20sec%26nbsp%3B%2013.9%20MBytes%20%26nbsp%3B%20116%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%202.0000-3.0000%20sec%26nbsp%3B%2015.2%20MBytes%20%26nbsp%3B%20128%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%203.0000-4.0000%20sec%26nbsp%3B%2015.1%20MBytes%20%26nbsp%3B%20127%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%204.0000-5.0000%20sec%26nbsp%3B%2014.0%20MBytes%20%26nbsp%3B%20117%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%205.0000-6.0000%20sec%26nbsp%3B%2015.1%20MBytes%20%26nbsp%3B%20127%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%206.0000-7.0000%20sec%26nbsp%3B%2013.9%20MBytes%20%26nbsp%3B%20116%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%207.0000-8.0000%20sec%26nbsp%3B%2015.1%20MBytes%20%26nbsp%3B%20127%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%208.0000-9.0000%20sec%26nbsp%3B%2013.9%20MBytes%20%26nbsp%3B%20116%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%209.0000-10.0000%20sec%26nbsp%3B%2014.0%20MBytes%20%26nbsp%3B%20117%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2010.0000-11.0000%20sec%26nbsp%3B%2015.1%20MBytes%20%26nbsp%3B%20127%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2011.0000-12.0000%20sec%26nbsp%3B%2013.9%20MBytes%20%26nbsp%3B%20116%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2012.0000-13.0000%20sec%26nbsp%3B%2015.1%20MBytes%20%26nbsp%3B%20127%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2013.0000-14.0000%20sec%26nbsp%3B%2013.9%20MBytes%20%26nbsp%3B%20116%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2014.0000-15.0000%20sec%26nbsp%3B%2015.2%20MBytes%20%26nbsp%3B%20128%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2015.0000-16.0000%20sec%26nbsp%3B%2013.9%20MBytes%20%26nbsp%3B%20116%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2016.0000-17.0000%20sec%26nbsp%3B%2013.9%20MBytes%20%26nbsp%3B%20116%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2017.0000-18.0000%20sec%26nbsp%3B%2015.1%20MBytes%20%26nbsp%3B%20127%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2018.0000-19.0000%20sec%26nbsp%3B%2013.9%20MBytes%20%26nbsp%3B%20116%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2019.0000-20.0000%20sec%26nbsp%3B%2014.0%20MBytes%20%26nbsp%3B%20117%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2020.0000-20.3825%20sec%20%26nbsp%3B%20128%20KBytes%26nbsp%3B%202.74%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%5B%26nbsp%3B%201%5D%200.0000-20.3825%20sec%20%26nbsp%3B%20295%20MBytes%20%26nbsp%3B%20121%20Mbits%2Fsec%3C%2FSTRONG%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EiPerf%20results%20with%20tcpip_thread%20prio%20set%20to%202%20instead%20of%201%2C%20and%20increased%20tcpip%20mbox%20to%2080%2C%20No%20of%20TCP%20segments%20PCB%20set%20to%2080%20instead%20of%2020%20and%20tcpip%20msg%20api%2Finpkt%20set%20to%2040%20instead%20of%2020%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22tcpip-transport.png%22%20style%3D%22width%3A%20603px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22tcpip-transport.png%22%20style%3D%22width%3A%20603px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22tcpip-transport.png%22%20style%3D%22width%3A%20603px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22tcpip-transport.png%22%20style%3D%22width%3A%20603px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F380959i0399D9A1C37471BE%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22tcpip-transport.png%22%20alt%3D%22tcpip-transport.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22tcpip-mem.png%22%20style%3D%22width%3A%20588px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22tcpip-mem.png%22%20style%3D%22width%3A%20588px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22tcpip-mem.png%22%20style%3D%22width%3A%20588px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22tcpip-mem.png%22%20style%3D%22width%3A%20588px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F380960i3988C54382210C85%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22tcpip-mem.png%22%20alt%3D%22tcpip-mem.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3CP%3E%3CSPAN%3Eiperf%20-c%20192.168.0.200%20-p%205001%20-P%201%20-i%201%20-t%2020%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E------------------------------------------------------------%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EClient%20connecting%20to%20192.168.0.200%2C%20TCP%20port%205001%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ETCP%20window%20size%3A%202.50%20MByte%20(default)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E------------------------------------------------------------%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%20local%20192.168.0.10%20port%2038134%20connected%20with%20192.168.0.200%20port%205001%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%20ID%5D%20Interval%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20Transfer%20%26nbsp%3B%20%26nbsp%3B%20Bandwidth%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%200.0000-1.0000%20sec%26nbsp%3B%2022.0%20MBytes%20%26nbsp%3B%20185%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%201.0000-2.0000%20sec%26nbsp%3B%2017.0%20MBytes%20%26nbsp%3B%20143%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%202.0000-3.0000%20sec%26nbsp%3B%2015.6%20MBytes%20%26nbsp%3B%20131%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%203.0000-4.0000%20sec%26nbsp%3B%2015.6%20MBytes%20%26nbsp%3B%20131%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%204.0000-5.0000%20sec%26nbsp%3B%2017.0%20MBytes%20%26nbsp%3B%20143%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%205.0000-6.0000%20sec%26nbsp%3B%2015.6%20MBytes%20%26nbsp%3B%20131%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%206.0000-7.0000%20sec%26nbsp%3B%2015.5%20MBytes%20%26nbsp%3B%20130%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%207.0000-8.0000%20sec%26nbsp%3B%2015.6%20MBytes%20%26nbsp%3B%20131%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%208.0000-9.0000%20sec%26nbsp%3B%2015.6%20MBytes%20%26nbsp%3B%20131%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%209.0000-10.0000%20sec%26nbsp%3B%2015.6%20MBytes%20%26nbsp%3B%20131%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2010.0000-11.0000%20sec%26nbsp%3B%2017.0%20MBytes%20%26nbsp%3B%20143%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2011.0000-12.0000%20sec%26nbsp%3B%2015.6%20MBytes%20%26nbsp%3B%20131%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2012.0000-13.0000%20sec%26nbsp%3B%2015.6%20MBytes%20%26nbsp%3B%20131%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2013.0000-14.0000%20sec%26nbsp%3B%2017.0%20MBytes%20%26nbsp%3B%20143%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2014.0000-15.0000%20sec%26nbsp%3B%2015.6%20MBytes%20%26nbsp%3B%20131%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2015.0000-16.0000%20sec%26nbsp%3B%2015.6%20MBytes%20%26nbsp%3B%20131%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2016.0000-17.0000%20sec%26nbsp%3B%2016.6%20MBytes%20%26nbsp%3B%20139%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2017.0000-18.0000%20sec%26nbsp%3B%2016.0%20MBytes%20%26nbsp%3B%20134%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2018.0000-19.0000%20sec%26nbsp%3B%2015.6%20MBytes%20%26nbsp%3B%20131%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2019.0000-20.0000%20sec%26nbsp%3B%2015.6%20MBytes%20%26nbsp%3B%20131%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%5B%26nbsp%3B%201%5D%2020.0000-20.3902%20sec%20%26nbsp%3B%20128%20KBytes%26nbsp%3B%202.69%20Mbits%2Fsec%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSTRONG%3E%5B%26nbsp%3B%201%5D%200.0000-20.3902%20sec%20%26nbsp%3B%20326%20MBytes%20%26nbsp%3B%20134%20Mbits%2Fsec%3C%2FSTRONG%3E%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSTRONG%3EI%20want%20to%20know%20what%20is%20the%20tested%20limit%20for%20lwip%20stack%20on%20s32g3%20cortex%20m7%20with%20freertos%3F%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EI%20expect%20around%208-900Mbits%2Fsecond%20throughput%20on%20iPerf%20with%20no%20other%20task%20other%20than%20the%20iperf%20application%20and%20the%20tcpip_thread.%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20help%2Finsights%20would%20be%20appreciated.%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2343839%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LwIP%20FreeRTOS%20throughput%20for%20S32G399%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2343839%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F257363%22%20target%3D%22_blank%22%3E%40rizwan_at_disruptdotcom%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EPlease%20find%20my%20answers%20below%3A%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CEM%3E%26gt%3B%20Can%20you%20confirm%20that%20this%20is%20the%20ceiling%20limit%20for%20the%20cortex-m7%2Flwip%2Ffreertos%20or%20is%20there%20room%20for%20optimization%20in%20the%20integration.%20Does%20NXP%20has%20its%20own%20numbers%20for%20this%20stack%3F%20The%20documentation%20that%20came%20with%20this%20example%20does%20not%20talk%20about%20throughput%20numbers%20at%20all.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EWe%20do%20not%20offer%20official%20test%20results%2C%20although%20checking%20internally%20your%20results%20are%20about%20what%20others%20are%20getting.%20I%20got%20a%20slight%20improvement%20after%20chaning%26nbsp%3BMEMP_NUM_UDP_PCB%20from%208%20to%2032%2C%20I%20got%20around%20a%20maximum%20of%20134Mbits%2Fs%2C%20while%20before%20I%20was%20getting%20a%20maximum%20of%20123.%20Note%20that%20the%20lwip%20configuration%20in%20the%20RTD4.0.2%20is%20the%20fastest%20version%20we%20have%20delivered%2C%20improvements%20were%20added%20in%20previous%20verions.%3C%2FP%3E%0A%3CP%3ESince%20lwip%20is%20not%20an%20NXP%20product%2C%20we%20do%20not%20offer%20official%20results%20or%20advertise%20any%20kind%20of%20expected%20performance%2C%20we%20offer%20the%20example%20%22as%20is%22.%20You%20can%20check%20the%20lwip%20documentation%20to%20get%20information%20on%20how%20to%20improve%20the%20performance.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CEM%3E%26gt%3B%20If%20we%20use%20PFE%20but%20with%20same%20stack%3A%20Lwip%2C%20EthIf%2C%20Eth%2C%20Gmac_Ip%20with%20FreeRTOS.%20Will%20the%20iperf%20results%20be%20better%3F%20Can%20you%20please%20provide%20numbers%20if%20this%20experiment%20is%20documented%20already.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3EI%20have%20very%20little%20knowledge%20on%20what%20exactly%20the%20iperf%20tests%20does%2C%20however%2C%20for%20what%20I%20have%20seen%2C%20the%20performance%20may%20even%20be%20worse%2C%20I%20mentioned%20the%20PFE%20with%20the%20idea%20of%20accelerating%20your%20final%20application.%20Basically%20the%20PFE%20can%20route%2C%20shape%20and%20classify%20packages%20automatically%2C%20this%20is%2C%20without%20the%20application%20core%20spending%20time%20on%20that%2C%20the%20configuration%20is%20highly%20dependent%20on%20your%20application%20and%20thus%2C%20a%20general%20test%20like%20iperf%20may%20not%20benefit%20from%20it.%20if%20you%20prefer%2C%20you%20can%20share%20some%20general%20details%20of%20your%20final%20application%20and%20I%20can%20help%20you%20identifying%20the%20best%20options.%3C%2FP%3E%0A%3CP%3EIn%20the%20PFE%20example%20application%20you%20can%20generate%20a%20configuration%20with%20lwip%20and%20check%20if%20it%20is%20appropriate%20for%20your%20requirements.%20Regarding%20the%20documentation%20of%20the%20results%2C%20we%20do%20not%20offer%20those%20results%2C%20just%20as%20in%20the%20GMAC%20example.%3C%2FP%3E%0A%3CP%3EAs%20a%20heads%20up%2C%20the%20PFE%20can%20be%20quite%20tricky%20to%20configure%20from%20the%20M7%20side%2C%20so%20if%20you%20have%20any%20question%20please%20let%20me%20know.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2343652%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LwIP%20FreeRTOS%20throughput%20for%20S32G399%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2343652%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F238460%22%20target%3D%22_blank%22%3E%40alejandro_e%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3EOne%20more%20question%3A%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EIf%20we%20use%20PFE%20but%20with%20same%20stack%3A%20Lwip%2C%20EthIf%2C%20Eth%2C%20Gmac_Ip%20with%20FreeRTOS.%20Will%20the%20iperf%20results%20be%20better%3F%20Can%20you%20please%20provide%20numbers%20if%20this%20experiment%20is%20documented%20already.%3CBR%20%2F%3E%3CBR%20%2F%3EThanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2343538%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LwIP%20FreeRTOS%20throughput%20for%20S32G399%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2343538%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F238460%22%20target%3D%22_blank%22%3E%40alejandro_e%3C%2FA%3E%26nbsp%3B%20Can%20you%20confirm%20that%20this%20is%20the%20ceiling%20limit%20for%20the%20cortex-m7%2Flwip%2Ffreertos%20or%20is%20there%20room%20for%20optimization%20in%20the%20integration.%20Does%20NXP%20has%20its%20own%20numbers%20for%20this%20stack%3F%20The%20documentation%20that%20came%20with%20this%20example%20does%20not%20talk%20about%20throughput%20numbers%20at%20all.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2343292%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LwIP%20FreeRTOS%20throughput%20for%20S32G399%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2343292%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F257363%22%20target%3D%22_blank%22%3E%40rizwan_at_disruptdotcom%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EThanks%20for%20reaching%20out%20to%20us.%20Regarding%20your%20question%2C%20the%20command%20you%20shared%20measures%20the%20throughput%20of%20the%20bytes%20in%20the%20payload%20in%20the%20TCP%20frame%2C%20it%20does%20not%20show%20the%20raw%26nbsp%3Bthroughput.%20Even%20if%20the%20line%20is%20transmitting%20at%20100%25%20capacity%2C%20you%20will%20never%20see%26nbsp%3B%20a%20value%20close%20to%201000Mbits%2Fs%2C%20the%20TCP%20frames%20and%20the%20protocol%20itself%20includes%20quite%20a%20heavy%20overhead%20that%20needs%20to%20be%20processed%20in%20the%20M7%20core.%20The%20value%20you%20see%20does%20not%20include%20the%20framing%20of%20the%20payload%2C%20nor%20the%20handshakes%2C%20ACKs%20and%20retransmissions.%20It%20only%20shows%20the%20effective%20payload%20transmitted%20from%20the%20host%20to%20the%20board.%20Therefore%20the%20bottleneck%20is%20in%20the%20M7%20core.%20You%20could%20try%20to%20run%20the%20same%20test%20using%20the%20A53%20cores%20running%20Linux%2C%20those%20are%20more%20powerful%20cores%20and%20should%20be%20affected%20noticeably%20less%20than%20the%20M7%20cores.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20also%20use%20the%20PFE%20network%20accelerator%20which%20offloads%20the%20handling%20process%20of%20the%20application%20cores.%20However%2C%20this%20depends%20on%20your%20network%20requirements.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ELet%20me%20know%20if%20you%20have%20more%20questions.%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2345136%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LwIP%20FreeRTOS%20throughput%20for%20S32G399%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2345136%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F238460%22%20target%3D%22_blank%22%3E%40alejandro_e%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3Ethank%20you%20for%20the%20detailed%20reply.%3CBR%20%2F%3E%3CBR%20%2F%3EI%20have%20more%20questions%20and%20numbers%20which%2C%20unfortunately%2C%20they%20are%20even%20more%20concerning%3A%3CBR%20%2F%3E%3CBR%20%2F%3ESetup%3A%3C%2FP%3E%3CUL%3E%3CLI%3EgPTP%20task%20firing%20every%203ms%20as%20required%20by%20gPTP%20manual%20and%20of%20prio%20lower%20than%20tcpip_thread%3C%2FLI%3E%3CLI%3Etcpip_thread%20at%20max%20prio%20in%20system%3C%2FLI%3E%3CLI%3ELwIP%20port%20in%20gmacif.c%20updated%20to%20use%20EthIf%20instead%20so%20that%20bot%20gPTP%20and%20LwIP%20use%20one%20interface%20to%20speak%20to%20driver.%20Which%20required%20me%20to%20remove%20zero-copy%20support%20in%20RX%20and%20TX%20path%20because%20of%20EthIf%20and%20Eth%20APIs.%20Eth%20requires%20ownership%20of%20DMA%20buffers%20so%20we%20can%20not%20do%20pbuf_alloced_custom%20and%20let%20lwIP%20decide%20when%20to%20return%20DMA%20buffers%20to%20Eth.%20Similarly%2C%20TX%20path%20does%20not%20allow%20zero%20copy%20because%20we%20have%20to%20use%20EthIf%20API%20to%20get%20txBuf%20from%20driver%20and%20lwIP%20can%20not%20directly%20map%20its%20pbuf%20to%20txBuf.%3C%2FLI%3E%3C%2FUL%3E%3CP%3EResults%3A%20Iperf%20dropped%20down%20to%26nbsp%3B%3CSTRONG%3E40.3%20Mbits%2Fsec%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3CUL%3E%3CLI%3EIMHO%20this%20is%20because%20of%20EthIf%20dependency%20in%20gPTP%20stack%20provided%20by%20NXP%20that%20we%20had%20to%20update%20LwIP%20porting%20layer%20to%20use%20EthIf%2FEth%20API%20instead%20of%20directly%20using%20Gmac_Ip%20API.%20Can%20you%20please%20confirm%20these%20numbers%20or%20are%20they%20different%20from%20your%20expectation.%26nbsp%3B%3C%2FLI%3E%3CLI%3EIs%20there%20a%20plan%20for%20updating%20gPTP%20implementation%20to%20use%20Gmac_Ip%20instead%20of%20EthIf%3F%3C%2FLI%3E%3CLI%3EWhat%20is%20the%20recommended%20way%20to%20integrate%20gPTP%20along%20with%20lwIP%20in%20one%20system.%20We%20want%20to%20keep%20zero-copy%20for%20RX%20and%20TX%20path%20to%20keep%20throughput%20at%20max%20possible%20rate.%3C%2FLI%3E%3C%2FUL%3E%3CP%3EAny%20help%20here%20is%20much%20appreciated%2C%3CBR%20%2F%3ERizwan.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2346552%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20LwIP%20FreeRTOS%20throughput%20for%20S32G399%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2346552%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%20again%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F257363%22%20target%3D%22_blank%22%3E%40rizwan_at_disruptdotcom%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EPlease%20find%20my%20answers%20below%3A%3C%2FP%3E%0A%3CP%3E-%20We%20do%20not%20have%20official%20test%20results%20when%20combining%20gPTP%20and%20LWIP%2C%20however%2C%20chaining%20from%20the%20Gmac_Ip%20API%20to%20the%20EthIf%20is%20not%20expected%20to%20slow%20down%20the%26nbsp%3Bthroughput%20in%20such%20a%20magnitude.%20My%20conclusion%20is%20that%20the%20gPTP%20is%20using%20more%20core%20processing%20time%20and%20therefore%20the%26nbsp%3Bthroughput%20gets%20affected%20so%20much.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E-%20There%20is%20no%20plan%20to%20update%20gPTP%20from%20EthIf%20to%20Gmac_Ip.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E-%20We%20have%20any%20document%20on%20how%20to%20integrate%20both%20components%2C%20furthermore%2C%20my%20expertise%20on%20both%20is%20quite%20limited%20and%20therefore%20I%20cannot%20give%20you%20any%20recommendation.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EAs%20I%20mentioned%20above%2C%20my%20recommendations%20are%20to%20use%20the%20A53%20cores%20or%20use%20the%20PFE%20accelerator%2C%20depending%20on%20your%20application.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ELet%20me%20know%20if%20you%20have%20more%20questions.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E