From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=VVGltJUq; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id A15245A0272 for ; Mon, 09 Dec 2024 17:54:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1733763297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XgClOovTs6q16WGf7CNOIkSH5GrsPx7jVO89w64kmdo=; b=VVGltJUqBoJ8NfMbndzInfqTFzpWGmP1/XASV5L3+t7bZZkJtFR7ETLb/YWs4s9XVm2jV7 4NCyKN2vR2hEIeEuTbxePavFAIvQlh80569advsz1G+R3KskUjRHC2tgrO0M5HGsE5xdNK U5eA3HgQXDiTxTssFrRTo10ub0aCU84= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-284-F_Jhw1XbOkqtj6ZtF9lSXA-1; Mon, 09 Dec 2024 11:54:56 -0500 X-MC-Unique: F_Jhw1XbOkqtj6ZtF9lSXA-1 X-Mimecast-MFC-AGG-ID: F_Jhw1XbOkqtj6ZtF9lSXA Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9FEA71955DDB for ; Mon, 9 Dec 2024 16:54:54 +0000 (UTC) Received: from lenovo-t14s.redhat.com (unknown [10.39.192.141]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9FC55300018D; Mon, 9 Dec 2024 16:54:53 +0000 (UTC) From: Laurent Vivier To: passt-dev@passt.top Subject: [PATCH 2/2] tap: Call vu_init() with --fd Date: Mon, 9 Dec 2024 17:54:50 +0100 Message-ID: <20241209165450.2314060-2-lvivier@redhat.com> In-Reply-To: <20241209165450.2314060-1-lvivier@redhat.com> References: <20241209165450.2314060-1-lvivier@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 7vqsHRXhwnXez4N4wsjEl64D_KoOfVdTqpaGAcZRnQs_1733763294 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: ZFZR2OTFSLNLU253T2ZQTWMW5OOLYXQV X-Message-ID-Hash: ZFZR2OTFSLNLU253T2ZQTWMW5OOLYXQV X-MailFrom: lvivier@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Laurent Vivier X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: We need to initialize vhost-user structures with --fd too. Signed-off-by: Laurent Vivier --- 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); -- 2.47.1