public inbox for passt-dev@passt.top
 help / color / mirror / code / Atom feed
From: "Ammar Yasser" <aerosound161@gmail.com>
To: "David Gibson" <david@gibson.dropbear.id.au>,
	"Ammar Yasser" <aerosound161@gmail.com>
Cc: passt-dev@passt.top, eperezma@redhat.com
Subject: Re: [RFC v3 3/8] conf: Add context fields, epoll types and the --vhost flag to pasta
Date: Wed, 12 Aug 2026 19:36:06 +0300	[thread overview]
Message-ID: <DKN412KIQN28.1O8VXNEN4D94G@gmail.com> (raw)
In-Reply-To: <anklTWjo_1L-rgIJ@zatzit>

On Mon Aug 10, 2026 at 4:11 AM EEST, David Gibson wrote: 
>> 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.
>> 
>> 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;
>>  
>>  	uint64_t hash_secret[2];
>> +	uint64_t virtio_features;
>>  
>>  	int ifi4;
>>  	struct ip4_ctx ip4;
>> @@ -288,6 +296,12 @@ struct ctx {
>>  	struct udp_ctx udp;
>>  	int no_icmp;
>>  
>> +	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;
>>  
>>  	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

>
>> -- 
>> 2.34.1
>> 


  reply	other threads:[~2026-08-12 16:36 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-02 13:21 [RFC v3 0/8] Add vhost-net kernel support " Ammar Yasser
2026-08-02 13:21 ` [RFC v3 1/8] tap: Move the tap_hdr file to a separate file Ammar Yasser
2026-08-07  5:40   ` David Gibson
2026-08-02 13:21 ` [RFC v3 2/8] udp,tcp: Make protocol specific buffers public Ammar Yasser
2026-08-07  5:56   ` David Gibson
2026-08-12 16:29     ` Ammar Yasser
2026-08-02 13:21 ` [RFC v3 3/8] conf: Add context fields, epoll types and the --vhost flag to pasta Ammar Yasser
2026-08-10  1:11   ` David Gibson
2026-08-12 16:36     ` Ammar Yasser [this message]
2026-08-02 13:21 ` [RFC v3 4/8] virtio: Define the pasta vhost interface Ammar Yasser
2026-08-10  2:06   ` David Gibson
2026-08-12 17:17     ` Ammar Yasser
2026-08-13  1:16       ` David Gibson
2026-08-02 13:21 ` [RFC v3 5/8] virtio: Implement the pasta vhost functions Ammar Yasser
2026-08-10  6:34   ` David Gibson
2026-08-12 17:57     ` Ammar Yasser
2026-08-13  1:26       ` David Gibson
2026-08-02 13:21 ` [RFC v3 6/8] virtio: Implement pasta vhost acceleration guest->pasta path Ammar Yasser
2026-08-10  7:34   ` David Gibson
2026-08-12 18:17     ` Ammar Yasser
2026-08-13  1:35       ` David Gibson
2026-08-02 13:21 ` [RFC v3 7/8] pasta: Implement pasta vhost TX (pasta->guest) prerequisites Ammar Yasser
2026-08-10  9:01   ` David Gibson
2026-08-12 18:39     ` Ammar Yasser
2026-08-13  2:01       ` David Gibson
2026-08-02 13:21 ` [RFC v3 8/8] tap: Implement pasta vhost TX Ammar Yasser
2026-08-10  9:18   ` David Gibson
2026-08-12 18:45     ` Ammar Yasser
2026-08-13  2:09       ` David Gibson

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=DKN412KIQN28.1O8VXNEN4D94G@gmail.com \
    --to=aerosound161@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=eperezma@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).