This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] SK-TDA4VM:TDA4VM QNX UDP

Guru**** 2392905 points
Other Parts Discussed in Thread: TDA4VM

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1487315/sk-tda4vm-tda4vm-qnx-udp

器件型号:SK-TDA4VM
Thread 中讨论的其他器件:TDA4VHTDA4VM

工具/软件:

我们使用乒乓模式对 QNX 系统执行 UDP 性能测试。
对于 Ping 端:它仅发送 UDP 数据包并等待 Pong 端的响应。 收到响应后、它启动下一轮数据包传输、连续重复此过程。
对于 Pong 侧:它只在收到 UDP 数据包后对其做出响应。

系统报错。 在正常情况下、ping 侧发送和接收响应的平均时间为40微秒(us)。 但是、存在周期性异常、其中时间峰值达到130,000 μ s 以上。
进一步分析发现、这是由于 ping 方调用 sendto()时延迟过长造成的。

为了解决这个问题、我们将 net.inet.udp.sendspace 增加到了5000000、但问题仍然存在。
我们应该怎么做?

-----
编译:
来源 qnxsdp-env.sh
aarch64-unknown-nto-qnx7.1.0-gcc -o udpong udp_pong.c TimeTest.c -lsocket
aarch64-unknown-nto-qnx7.1.0-gcc -o udp_ping udp_ping.c TimeTest.c -lsocket

运行:
终端 A:./udp_pong 127.0.0.1 6802 64
Terminal-B:../udp_ping 127.0.0.1 6801 127.0.0.1 6802 64 30

观察数据:
postTakeTime - preTakeTime

e2e.ti.com/.../ping.txt

e2e.ti.com/.../pong.txt

e2e.ti.com/.../udpTest.zip