diff options
author | Laurent Vivier <lvivier@redhat.com> | 2024-12-09 17:54:50 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2024-12-10 12:26:56 +0100 |
commit | 947f5cdb93062fd4e56adbab9901bbbb8aa8b5cb (patch) | |
tree | 502ce65689342ced32b59205b952db45426655fe | |
parent | 2139ad33fc8ab48736d65f3d65dc882f0d612006 (diff) | |
download | passt-947f5cdb93062fd4e56adbab9901bbbb8aa8b5cb.tar passt-947f5cdb93062fd4e56adbab9901bbbb8aa8b5cb.tar.gz passt-947f5cdb93062fd4e56adbab9901bbbb8aa8b5cb.tar.bz2 passt-947f5cdb93062fd4e56adbab9901bbbb8aa8b5cb.tar.lz passt-947f5cdb93062fd4e56adbab9901bbbb8aa8b5cb.tar.xz passt-947f5cdb93062fd4e56adbab9901bbbb8aa8b5cb.tar.zst passt-947f5cdb93062fd4e56adbab9901bbbb8aa8b5cb.zip |
tap: Call vu_init() with --fd
We need to initialize vhost-user structures with --fd too.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | tap.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |