On Mon, Dec 09, 2024 at 05:54:50PM +0100, Laurent Vivier wrote:We need to initialize vhost-user structures with --fd too. Signed-off-by: Laurent Vivier <lvivier(a)redhat.com>Reviewed-by: David Gibson <david(a)gibson.dropbear.id.au>--- tap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tap.c b/tap.c index b2d30456e8dc..cd32a901e534 100644 --- a/tap.c +++ b/tap.c @@ -1405,10 +1405,12 @@ void tap_sock_update_pool(void *base, size_t size) */ void tap_backend_init(struct ctx *c) { - if (c->mode == MODE_VU) + if (c->mode == MODE_VU) { tap_sock_update_pool(NULL, 0); - else + vu_init(c); + } else { tap_sock_update_pool(pkt_buf, sizeof(pkt_buf)); + } if (c->fd_tap != -1) { /* Passed as --fd */ ASSERT(c->one_off); @@ -1421,8 +1423,6 @@ void tap_backend_init(struct ctx *c) tap_sock_tun_init(c); break; case MODE_VU: - vu_init(c); - /* fall through */ case MODE_PASST: tap_sock_unix_init(c);-- 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