From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: passt.top; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=UY60x60q; dkim-atps=neutral Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by passt.top (Postfix) with ESMTPS id DE1955A0265 for ; Wed, 12 Aug 2026 18:36:08 +0200 (CEST) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-47fe2d179e2so701810f8f.1 for ; Wed, 12 Aug 2026 09:36:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786552568; x=1787157368; darn=passt.top; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=TvMcSUgZn6UZdArhs/Tfajdd93MOhYYo+fY4YVmgABo=; b=UY60x60qz0wpv4x2x+NnTwlBIIb7mBf8t8oLdhu8W5g/f6xmR9Y3JbRfslDDPoy1wj +gD52C5MmZqx60gEfkzzbF9f5SHP4MS+hHG6kSNm4lMa0frL82Nm76JFhHOEPK7szRNf 9MZr3VQCwOisNoRUTYpF5FdfiV0ed+i1CsrUh0DLOCpr3AmyDZch7ETIpRgWZzi4lEQb eysS12FmhCHAdeFORfgfpxFjU/474opNB/0BRVmIJqj5lgaOBVsg6icdp9NPqffUmwUN VtbUmZGNmvmzqCeAjrUaBAuPCcrvu5aXPg1TePqQgYEv/uTpqCqtjQVgGG9UraouL2+Z Qsag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786552568; x=1787157368; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type;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A= X-Received: by 2002:a05:6000:2305:b0:481:51ce:542f with SMTP id ffacd0b85a97d-48152b082f5mr9057304f8f.21.1786552568298; Wed, 12 Aug 2026 09:36:08 -0700 (PDT) Received: from localhost ([196.157.64.51]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48150bf5c13sm8405694f8f.7.2026.08.12.09.36.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Aug 2026 09:36:07 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 12 Aug 2026 19:36:06 +0300 Message-Id: Subject: Re: [RFC v3 3/8] conf: Add context fields, epoll types and the --vhost flag to pasta From: "Ammar Yasser" To: "David Gibson" , "Ammar Yasser" X-Mailer: aerc 0.21.0 References: <20260802132155.870796-1-aerosound161@gmail.com> <20260802132155.870796-4-aerosound161@gmail.com> In-Reply-To: Message-ID-Hash: QALPFQ76UYNRVQZLB4DOFB2P62L32XDN X-Message-ID-Hash: QALPFQ76UYNRVQZLB4DOFB2P62L32XDN X-MailFrom: aerosound161@gmail.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: passt-dev@passt.top, eperezma@redhat.com 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: On Mon Aug 10, 2026 at 4:11 AM EEST, David Gibson wrote:=20 >> Add the fd_vhost field on the context which will carry the file >> descriptor of the device and will indicate that the setup was >> successful. The vq field contains the kick, call and err file >> descriptors for both queues. >>=20 >> Also add vhost (mark if vhost acceleration was requested) and >> virtio_features field. > > A couple of concerns about the command line interface. IIUC, once > this is all ready the difference between vhost-kernel and regular > tuntap should be neither guest-visible nor user-visible. So, assuming > it does perform better, we'll probably want to make it the default. > > So, making this explicitly an opt-in probably isn't what we want. > Maybe --vhost on|off|auto would be a better idea, defaulting to off > now, but auto (use if available) in future. "on" would be if the user > definitely wants vhost, and would rather we exit than fall back if > it's not available. The auto option seems like a nice suggestion. will incorporate it in the next revision > A more minor concern is that there's the potential confusion between > this and --vhost-user. Not immediately sure what we can do about > this, since that's just reflecting the confusingly similar names of > the underlying features. Good point, will try to find a better fitting name >> @@ -258,11 +263,14 @@ struct ctx { >> int fd_control; >> int fd_repair_listen; >> int fd_repair; >> + >> + int fd_vhost; >> unsigned char our_tap_mac[ETH_ALEN]; >> unsigned char guest_mac[ETH_ALEN]; >> uint16_t mtu; >> =20 >> uint64_t hash_secret[2]; >> + uint64_t virtio_features; >> =20 >> int ifi4; >> struct ip4_ctx ip4; >> @@ -288,6 +296,12 @@ struct ctx { >> struct udp_ctx udp; >> int no_icmp; >> =20 >> + struct { >> + int kick_fd; >> + int call_fd; >> + int err_fd; >> + } vq[2]; >> + >> int no_dns; >> int no_dns_search; >> int no_dhcp_dns; >> @@ -300,6 +314,7 @@ struct ctx { >> int splice_only; >> int host_lo_to_ns_lo; >> int freebind; >> + int vhost; >> bool chroot_fallback; >> =20 >> int low_wmem; > > It might be a bit neater to put the new vhost-kernel related fields > into a substructure, rather than spreading them across struct ctx. At > some point it would be nice to make the various tap backends a bit > more pluggable / independent from each other. Doing that's obviously > not in scope for this series, but keeping it's internal data all > together will at least not make that job harder in the future. Good suggestion. Will make things more organized for sure > >> --=20 >> 2.34.1 >>=20