From patchwork Wed Nov 30 15:56:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Coquelin X-Patchwork-Id: 120378 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A1809A00C2; Wed, 30 Nov 2022 16:59:06 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E5CA42D88; Wed, 30 Nov 2022 16:57:23 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 128F542D2F for ; Wed, 30 Nov 2022 16:57:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669823840; 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=bc+zq2Y/KSowB36yxsOrYV0rbdwBtFdBVL1DJIgnKwE=; b=UsIXmKUjpt/kovjLfmXv9XOk2H/EtJOdbrXtMbb+MubWpFS+n398id8ny3BAqSqinK4g7D CtV4s4XtjC0Ap+ZlJ4Rietn1c12hmzqbwXOtXkYJGcrzmJD1HLOuWFixHdVXvALxueuI6Y p+6H+dKobASY1vOzKhHjVVU53hbg5qg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-515-_wLK4GZ4PeS29jet5Z7ixA-1; Wed, 30 Nov 2022 10:57:19 -0500 X-MC-Unique: _wLK4GZ4PeS29jet5Z7ixA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8DE3D101A528; Wed, 30 Nov 2022 15:57:17 +0000 (UTC) Received: from max-t490s.redhat.com (unknown [10.39.208.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7654540C83D9; Wed, 30 Nov 2022 15:57:16 +0000 (UTC) From: Maxime Coquelin To: dev@dpdk.org, chenbo.xia@intel.com, david.marchand@redhat.com, eperezma@redhat.com Cc: Maxime Coquelin Subject: [PATCH v1 20/21] net/virtio-user: advertize control VQ support with vDPA Date: Wed, 30 Nov 2022 16:56:38 +0100 Message-Id: <20221130155639.150553-21-maxime.coquelin@redhat.com> In-Reply-To: <20221130155639.150553-1-maxime.coquelin@redhat.com> References: <20221130155639.150553-1-maxime.coquelin@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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 This patch advertizes control virtqueue support by the vDPA backend if it supports VIRTIO_NET_F_CTRL_VQ. Signed-off-by: Maxime Coquelin Reviewed-by: Chenbo Xia --- drivers/net/virtio/virtio_user/vhost_vdpa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtio_user/vhost_vdpa.c b/drivers/net/virtio/virtio_user/vhost_vdpa.c index 3fd13d9fac..7bb4995893 100644 --- a/drivers/net/virtio/virtio_user/vhost_vdpa.c +++ b/drivers/net/virtio/virtio_user/vhost_vdpa.c @@ -135,8 +135,8 @@ vhost_vdpa_get_features(struct virtio_user_dev *dev, uint64_t *features) return -1; } - /* Multiqueue not supported for now */ - *features &= ~(1ULL << VIRTIO_NET_F_MQ); + if (*features & 1ULL << VIRTIO_NET_F_CTRL_VQ) + dev->hw_cvq = true; /* Negotiated vDPA backend features */ ret = vhost_vdpa_get_protocol_features(dev, &data->protocol_features);