From: Laurent Vivier <lvivier@redhat.com>
To: passt-dev@passt.top
Cc: Laurent Vivier <lvivier@redhat.com>
Subject: [PATCH 2/2] tap: Call vu_init() with --fd
Date: Mon, 9 Dec 2024 17:54:50 +0100 [thread overview]
Message-ID: <20241209165450.2314060-2-lvivier@redhat.com> (raw)
In-Reply-To: <20241209165450.2314060-1-lvivier@redhat.com>
We need to initialize vhost-user structures with --fd too.
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
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);
--
@@ -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);
--
2.47.1
next prev parent reply other threads:[~2024-12-09 16:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 16:54 [PATCH 1/2] tap: Use a common function to start a new connection Laurent Vivier
2024-12-09 16:54 ` Laurent Vivier [this message]
2024-12-10 1:17 ` [PATCH 2/2] tap: Call vu_init() with --fd David Gibson
2024-12-10 14:36 ` Stefano Brivio
2024-12-10 1:13 ` [PATCH 1/2] tap: Use a common function to start a new connection David Gibson
2024-12-10 14:36 ` Stefano Brivio
2024-12-10 14:36 ` Stefano Brivio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241209165450.2314060-2-lvivier@redhat.com \
--to=lvivier@redhat.com \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).