mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
cdcncm_send() defers each transmit with MSEC2TICK(CDCNCM_DGRAM_COMBINE_PERIOD) (1 ms). MSEC2TICK() rounds up to the system tick, so at the default 100 Hz tick the "1 ms" coalescing window becomes a full 10 ms tick (10-20 ms with phase), adding that latency to every single-datagram reply (ICMP echo, TCP ACK, one-MSS HTTP segment) and dominating the CDC-NCM round-trip time. The window only coalesces datagrams appended within the same synchronous TX burst (already queued before the worker runs), so an inter-burst delay adds latency without batching benefit in the common case. Fire the transmit worker immediately (delay 0); within-burst coalescing is preserved. On RP2350 (Pico 2 W) USB-NIC at 100 Hz tick: ping RTT 21.7 -> 2.8 ms, a 257 KB HTTP download 5.79 -> 0.92 s (44.5 -> 279 KB/s). Signed-off-by: Ricard Rosson <ricard@groundbits.com> Assisted-by: Claude (Anthropic Claude Code) Signed-off-by: Ricard Rosson <ricard@groundbits.com> |
||
|---|---|---|
| .. | ||
| adb.c | ||
| cdcacm.c | ||
| cdcacm.h | ||
| cdcacm_desc.c | ||
| cdcecm.c | ||
| cdcecm.h | ||
| cdcncm.c | ||
| CMakeLists.txt | ||
| composite.c | ||
| composite.h | ||
| composite_desc.c | ||
| dfu.c | ||
| Kconfig | ||
| Make.defs | ||
| mtp.c | ||
| pl2303.c | ||
| rndis.c | ||
| rndis_std.h | ||
| usbdev_desc.c | ||
| usbdev_fs.c | ||
| usbdev_fs.h | ||
| usbdev_req.c | ||
| usbdev_strings.c | ||
| usbdev_trace.c | ||
| usbdev_trprintf.c | ||
| usbmsc.c | ||
| usbmsc.h | ||
| usbmsc_desc.c | ||
| usbmsc_scsi.c | ||
| uvc.c | ||