-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
drivers/esp-hosted: Bug fixes and minor performance tuning. #12490
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
Conversation
a8ee18e
to
7a950aa
Compare
soft_timer_static_init(&network_timer, SOFT_TIMER_MODE_PERIODIC, 128, network_timer_callback); | ||
soft_timer_reinsert(&network_timer, 128); | ||
soft_timer_static_init(&network_timer, SOFT_TIMER_MODE_PERIODIC, 50, network_timer_callback); | ||
soft_timer_reinsert(&network_timer, 50); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think dropping this poll interval to 50ms will improve TCP/UDP throughput, this polling is used for things like DHCP timeout.
Can you try iperf3 with the existing value of 128 here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also polls the WiFi driver (like cyw43_poll), I did notice a significant increase when lower it, but not much below 50ms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is much more important than LWIP config, when reverting back to 128ms I lose 40% of the TCP throughput.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I guess the esp-hosted driver needs more frequent polling (ideally it would interrupt the main processor when it needed polling).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally it would interrupt the main processor when it needed polling
It does, but it still needs to poll at that rate, I'm also looking at the firmware to see if there's room for improvements there.
This patch reinstalls the pin IRQ handler on WiFi init, as some ports disable/remove pin IRQs on soft-reboot, or deinit the pins. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
The maximum SPI frame payload is 1600 - header_size. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
7a950aa
to
bf3dbad
Compare
Changes are: - Enable IRQ on WiFi data ready pin. - Fix WiFi SPI clock (an exact 30MHz is not possible). - Update WiFi pins. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
bf3dbad
to
9d5d2e8
Compare
iperf test before (UDP mode didn't work for some reason)
iperf test after: