raiden00pl opened a new pull request, #21937:
URL: https://github.com/apache/nuttx/pull/21937
# Summary
Convert the STM32 Ethernet drivers to the netdev lower half API:
common/stm32/stm32_eth_m3m4_v1.c (F1, F2, F4), stm32f7, stm32h5 and stm32h7.
All four drivers use the same design:
- frames are sent and received in place: each DMA descriptor owns one
IOB and a frame spans several descriptors, so the static frame buffers
and the copies are gone,
- frames are received in the interrupt work (NETDEV_RX_DIRECT),
- when no IOB is free, the received frame waits in the ring for the IOB
notifier and the MAC drops the next frames,
- F7 and H7 clean the TX IOBs and invalidate the RX IOBs in the D-Cache.
STM32_ETHMAC selects IOB_NOTIFIER and ARCH_HAVE_NETDEV_STATISTICS. The
series also adds Ethernet support to stm32h573i-dk and nucleo-f207zg, and an
Ethernet section to the STM32 porting guide.
# Impact
BREAKING CHANGE: the RX/TX rings take their buffers from the IOB pool, so
configurations with too few IOBs fail to build. Quick fix: set
CONFIG_IOB_NBUFFERS=100 and CONFIG_IOB_THROTTLE=8. With a write-back
D-Cache, CONFIG_IOB_ALIGNMENT and CONFIG_IOB_BUFSIZE must be multiples of 32.
All in-tree STM32 Ethernet defconfigs are updated.
# Testing
iperf between the board and a Linux host on the same LAN, master and this
branch on the same board, Mbit/s, median of 5 runs. Master runs with its
upstream IOB pool.
| Board | TCP board to host | TCP host to board | UDP 50 Mbit/s
offered |
|---------------|-------------------|-------------------|-----------------------|
| nucleo-f207zg | 10.3 / 13.7 | 7.5 / 9.4 | 6.2 / 6.2
|
| nucleo-f439zi | 16.3 / 21.3 | 11.0 / 13.7 | 9.7 / 10.3
|
| nucleo-f767zi | 34.9 / 36.2 | 24.3 / 23.7 | 23.1 / 27.6
|
| stm32h573i-dk | 19.1 / 23.3 | 12.7 / 15.0 | 19.3 / 11.7
|
| stm32h735g-dk | 50.3 / 55.4 | 31.0 / 33.8 | 49.7 / 49.9
|
--
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]