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=Y3WpP5ZK; 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 D299A5A004C for ; Thu, 17 Oct 2024 10:33:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729153992; 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=vBOsFo3H0PWqjtv6L1XobB44Ov37U/iYTd8xgdR98iI=; b=Y3WpP5ZKmBz2OoFwi/U9FBTcJ2cmVTxqBKP1dy+m5+tLCWn7ZqJ/wHxg8nYhH86ZMmNTfQ pWjUbift2qwocPhd0BAHlliMD9+OlkFzYwqjbk2VCScGaVSiWGMPsvvw5Slwv44EN0qGKj yluslt467+x5qHZDglwnh5jAr/5hxic= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-388-jbRyK24NOsuCJU3gbp9IQg-1; Thu, 17 Oct 2024 04:33:11 -0400 X-MC-Unique: jbRyK24NOsuCJU3gbp9IQg-1 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-37d47127e69so279400f8f.1 for ; Thu, 17 Oct 2024 01:33:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729153989; x=1729758789; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=vBOsFo3H0PWqjtv6L1XobB44Ov37U/iYTd8xgdR98iI=; b=czpHBhpfS/yj4eHgwZdjohmpVFQmR24nVPulxnTb1nmBFjc1U6QqNxAV/CTmrGos94 Jl/5IdQ9IktvToaw7+5fJlEqwekLVli3o3Y/xq7JOIqdf7JEK8ZgAXsRBnSc2dbvJuhK 3ROw8RpgFMb2lkZ8nHYZG8KfXihuUdZrILil08GqHbZyPbco0hTlZq8uJFJEIkdVZBWm zM4lvwBjaTXaSxJnkupEFkLuj0i0+XiR8glHJQU3iJRyN2AyrC7EHAatChE/8IKjuVlT ElCsblgOq5BOzdMTqYimt70bUMvJsTTDLACnwKZUBEWybE6Ys9JlMnobN+nxr0HKvihX B8AQ== X-Gm-Message-State: AOJu0Yz9I7U0M+JkfHIoH33dIE4/KC7yFbH6qpGKBybOl7mxTlB32vYC dHe77OOnuslNjpXuRhPcjMS9sI3BjNmhcXlmt6WZxzf3dWq+rduklzAPhNU4hbuYfsQAyd1Fdze Sk7QI1Xwhl6bwzCK4y4ifFX8/go7MIBsR/CUqdiBRY+cNiXPlCJzA+DgN8O3Zyv3OYdRqCg/FUB PkWu4sqzP2yK8B+3H3IRyXuzN2+y3CKANN X-Received: by 2002:a05:6000:400f:b0:37d:4ebe:164c with SMTP id ffacd0b85a97d-37d86d3db24mr4667241f8f.45.1729153989099; Thu, 17 Oct 2024 01:33:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGCrLIy7d2/4J+yHfrWoXSZRhUJ2qRsrQwVwUUFnZka0xdJ4X9Sj51I6Q/pFJzAVXfxww7R6A== X-Received: by 2002:a05:6000:400f:b0:37d:4ebe:164c with SMTP id ffacd0b85a97d-37d86d3db24mr4667227f8f.45.1729153988626; Thu, 17 Oct 2024 01:33:08 -0700 (PDT) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [176.103.220.4]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-37d7fbf821dsm6513016f8f.80.2024.10.17.01.33.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Oct 2024 01:33:07 -0700 (PDT) Date: Thu, 17 Oct 2024 10:33:06 +0200 From: Stefano Brivio To: Laurent Vivier Subject: Re: [PATCH v8 7/8] vhost-user: add vhost-user Message-ID: <20241017103306.4c0529b6@elisabeth> In-Reply-To: <7ba5bca3-7cf6-416c-a8ec-e925935190f2@redhat.com> References: <20241010122903.1188992-1-lvivier@redhat.com> <20241010122903.1188992-8-lvivier@redhat.com> <20241017021034.437f3757@elisabeth> <7ba5bca3-7cf6-416c-a8ec-e925935190f2@redhat.com> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: ORGBB5JUQQJPDCDW2KMQJ6BMS3B37NEE X-Message-ID-Hash: ORGBB5JUQQJPDCDW2KMQJ6BMS3B37NEE X-MailFrom: sbrivio@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: passt-dev@passt.top 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 Thu, 17 Oct 2024 09:28:21 +0200 Laurent Vivier wrote: > On 17/10/2024 02:10, Stefano Brivio wrote: > >> --- a/vhost_user.c > >> +++ b/vhost_user.c > >> @@ -48,12 +48,13 @@ > >> /* vhost-user version we are compatible with */ > >> #define VHOST_USER_VERSION 1 > >> > >> +static struct vu_dev vdev_storage; > > I see that struct vu_dev is 1564 bytes (on x86), but struct ctx is > > 580320 bytes (because of tcp_ctx and udp_ctx), so I wouldn't see a > > problem if you embedded this directly into struct ctx without a pointer. > > I did in the past, but the problem here is most of the time ctx is passed to the function > as a "const" and vdev (for the virqueues) must be modified (so it's not a const anymore). > But I can try again if you think "const" is not important. Ah, right, sorry, I just assumed you did that for a reason of size. No, I think const is a nice thing to have for the actual runtime configuration, so I guess it's better to keep it like you did. -- Stefano