On Mon, Aug 03, 2026 at 03:43:15PM +1000, David Gibson wrote: > On Fri, Jul 31, 2026 at 06:23:21PM +0200, Laurent Vivier wrote: > > The L4 sequence arrays tap4_l4[] and tap6_l4[] are used to batch > > packets with the same L4 tuple within a single tap_handler() call. > > They are global, but tap_handler() can be called concurrently from > > different worker threads with different qpairs in vhost-user mode. > > > > Make these arrays per-qpair by adding a VHOST_USER_MAX_VQS/2 first > > dimension, indexed by the qpair parameter already available in > > tap4_handler() and tap6_handler(). > > > > Update tap_sock_update_pool() to initialize all qpair*seq entries. > > > > Signed-off-by: Laurent Vivier > > Reviewed-by: David Gibson Although.. it now occurred to me on both this and the previous patch. IIRC, the effective lifetime of these pool structures is just from slurping the packets off the tap interface to processing them through tap[46]_handler(). So, rather than having per queue arrays, would it make more sense to put these on the stack as well? -- David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson