[PATCH] ctrl_iface: Allow configuring pending message queue depth

Jouni Malinen j at w1.fi
Mon Jul 27 06:08:24 PDT 2026


On Tue, Apr 28, 2026 at 12:07:20AM +0000, Shukla, Ashish wrote:
> The ctrl_iface UNIX socket implementation queues event messages when
> monitor clients cannot keep up, and starts dropping the oldest message
> once 2000 have accumulated. This limit is hardcoded and cannot be
> changed without modifying the source.
> 
> On embedded and mobile platforms (e.g., Android devices with STA + P2P
> interfaces), each interface maintains its own queue in addition to the
> global queue. Each queued message allocates the struct header plus the
> full event text inline, so the combined queues can consume several
> hundred KB before throttling takes effect.
> 
> This patch adds CONFIG_CTRL_IFACE_MSG_QUEUE_LIMIT as a build-time
> option to control the threshold. The default remains 2000 so there is
> no change in behavior for existing builds. Platforms with tighter
> memory constraints can set a lower value in their .config (e.g., 100)
> to cap the queue earlier without any functional impact — messages that
> old are stale for monitor clients anyway.

Thanks, applied.
 
-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list