On 17/10/2024 02:10, Stefano Brivio wrote:I did in the past, but the problem here is most of the time ctx is passed to the function as a "const" and vdev (for the virqueues) must be modified (so it's not a const anymore). But I can try again if you think "const" is not important. Thanks, Laurent--- a/vhost_user.c +++ b/vhost_user.c @@ -48,12 +48,13 @@ /* vhost-user version we are compatible with */ #define VHOST_USER_VERSION 1 +static struct vu_dev vdev_storage;I see that struct vu_dev is 1564 bytes (on x86), but struct ctx is 580320 bytes (because of tcp_ctx and udp_ctx), so I wouldn't see a problem if you embedded this directly into struct ctx without a pointer.