From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E7B7B42DDA; Wed, 5 Jul 2023 19:16:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 891CF406B5; Wed, 5 Jul 2023 19:16:08 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 4E3D44021F for ; Wed, 5 Jul 2023 19:16:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688577366; 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=DdQEJiBUdxGUEMV2p7E3I84eb50imoSO4srT/uI2A8w=; b=Zy1KZkQp018a9efVyTaZ8CMvlLeG0AhFdORUPB+MZNiKpMzEv2K5IvLGc7rBBpV7FAeeyI f4mm9DNIar+OJZK4kxsFguPgBBUyTBQclZLO1sGXGBogpz+7Ol3aBHnS0Cscw9C1GyjAKz JokeRWNgSzY5PYCy03cpkycF/zQtdIs= Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-314-fHTcmwQaNbaoM3hZ62uFmg-1; Wed, 05 Jul 2023 13:16:05 -0400 X-MC-Unique: fHTcmwQaNbaoM3hZ62uFmg-1 Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-262ffe98bcfso6872751a91.0 for ; Wed, 05 Jul 2023 10:16:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688577364; x=1691169364; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DdQEJiBUdxGUEMV2p7E3I84eb50imoSO4srT/uI2A8w=; b=EdIXMkOfP1jfhqSdOJk7FQN7DtexcPwgBAXLPjGhoIM07/0U+8b9Lp0pgWdJyQY8ij N+M2R7sKxJDF1ywnSajY3muOZOELXeY0bmxYK5qNdx+kPZrs0/i0t5EJ9C6FLiRbyB14 Ox7wiIxVqgJbz1BKJgNAZ5DR89zjsemZl4cy+JoHLITEPXA24Hjmzx29sav3jJDJlPYk i4Dwg1k464oqGfK4YL0o4UD7ktwmvmWF01DP1msJ9LbyLP01aiXWuKIZkp/Te5gZYhNG XRNqYlqyJU3JFLo5AEWidAdItGUMAz6+lIvxfXBwGCczHGItlKcRqSK34gsPVyVjZ26X w1ow== X-Gm-Message-State: ABy/qLZegbTV9wVu0uKrUiNC9a1q3BdgwzJPeCx/zW8NEmPnUgJBUPXq gquWOLnohWylaG/lhx72rzKb1SWstEW0TYm1LJCrLVqNLGInAGGhchJsqjEEQ1hKRRrhvLeWD+O Csk6k0/GiMEKwuwplJyk= X-Received: by 2002:a17:90b:e07:b0:263:feab:2804 with SMTP id ge7-20020a17090b0e0700b00263feab2804mr810298pjb.37.1688577364192; Wed, 05 Jul 2023 10:16:04 -0700 (PDT) X-Google-Smtp-Source: APBJJlH06TFh+D/sDnsA5puHBukB+fYlBxStrNfRBzFSGOaw7DqY6pkGn3jRmaeCG9/47KBCG5q/PvPWeHA8+Q9nyTE= X-Received: by 2002:a17:90b:e07:b0:263:feab:2804 with SMTP id ge7-20020a17090b0e0700b00263feab2804mr810287pjb.37.1688577363873; Wed, 05 Jul 2023 10:16:03 -0700 (PDT) MIME-Version: 1.0 References: <20230705132232.114266-1-maxime.coquelin@redhat.com> <20230705132232.114266-2-maxime.coquelin@redhat.com> <3cc8e20a-70d7-871c-c799-5adf37306167@redhat.com> In-Reply-To: <3cc8e20a-70d7-871c-c799-5adf37306167@redhat.com> From: David Marchand Date: Wed, 5 Jul 2023 19:15:52 +0200 Message-ID: Subject: Re: [PATCH 1/2] vhost: fix vduse features negotiation To: Maxime Coquelin Cc: dev@dpdk.org, chenbo.xia@intel.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, Jul 5, 2023 at 7:02=E2=80=AFPM Maxime Coquelin wrote: > > On 7/5/23 15:36, David Marchand wrote: > > On Wed, Jul 5, 2023 at 3:22=E2=80=AFPM Maxime Coquelin > > wrote: > >> @@ -950,9 +954,14 @@ rte_vhost_driver_register(const char *path, uint6= 4_t flags) > >> * two values. > >> */ > >> vsocket->use_builtin_virtio_net =3D true; > >> - vsocket->supported_features =3D VIRTIO_NET_SUPPORTED_FEATURES; > >> - vsocket->features =3D VIRTIO_NET_SUPPORTED_FEATURES; > >> - vsocket->protocol_features =3D VHOST_USER_PROTOCOL_FEATURES; > >> + if (vsocket->is_vduse) { > >> + vsocket->supported_features =3D VDUSE_NET_SUPPORTED_FE= ATURES; > >> + vsocket->features =3D VDUSE_NET_SUPPORTED_FE= ATURES; > >> + } else { > >> + vsocket->supported_features =3D VIRTIO_NET_SUPPORTED_F= EATURES; > >> + vsocket->features =3D VIRTIO_NET_SUPPORTED_F= EATURES; > >> + vsocket->protocol_features =3D VHOST_USER_PROTOCOL_FE= ATURES; > >> + } > >> > > > > Would it make sense to split those features in a set of features > > shared by vhost-user and vduse, and one dedicated set for each of > > them? > > For example, the VIRTIO_NET_F_GUEST/HOST_* features are not bound to > > vhost-user / vduse, are they? > > Most of the features are the same, but there are a few differences: > - VIRTIO_F_RING_PACKED: this is not really Vhost or VDUSE specific. The > issue is we just lack packed ring support in the control queue > implementation, only used by VDUSE for now. I expect to add it in > v23.11. > > - VHOST_USER_F_PROTOCOL_FEATURES: This feature is Vhost-user specific > > - VHOST_F_LOG_ALL: This is for live-migration, maybe it will be > advertised by VDUSE in the future, but we miss live-migration support in > Kernel VDUSE at the moment. > > - VIRTIO_NET_F_CTRL_RX: This is advertised by Vhost-user, but it does > not do anything specific. While if we do it in VDUSE, we need to > implement its support in CVQ. > > To summarize, we have some features specific to Vhost-user, but for the > other differences, this is just some features are not yet > implemented/tested with VDUSE. > > Maybe we could have something like this, which has the advantage to > highlight the gaps we have in VDUSE (not compiled/tested): LGTM on the principle. Thanks Maxime. --=20 David Marchand