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 0CC8F46010; Tue, 7 Jan 2025 19:44:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EC86A4042E; Tue, 7 Jan 2025 19:44:37 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id CF479402DD for ; Tue, 7 Jan 2025 19:44:36 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 507HESAs031475; Tue, 7 Jan 2025 10:44:36 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=pfpt0220; bh=b KcFvJzAzbhofj5G6Ii1P8r6rwbThx5uLn2570omXkc=; b=DaRn1f4RRAPI5MSP4 pPbC+UAAwsvbaSJdLTCizirQ76x2cgO5/BGzUFiCYsOW4LemEMjDR8CCEEJd9plL j+evtAraNhy9Jnaa0D5by5ihl00N2/qSp20QfEsHUb/mHp16977wv7iRNTDh970s iacV24Ve7N8d6yBLUVKnnU37X0MmCLp13ncwGZUgPITAjPr29qjjX7IBGah9GavZ iesnGwdE9yYDeeT6Hsdux8/qGPhHzZYFGDBwMOppnz7C7eYAk3287Bd/SakW5EUf KlCi+1mvdGJvuTIBx70tdy43+emRIbiPBQ7vKeT60Z7Xuo+yb7l2umHWJixO+vP9 Ze/mA== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 4418gc86ey-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Jan 2025 10:44:36 -0800 (PST) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Tue, 7 Jan 2025 10:44:35 -0800 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Tue, 7 Jan 2025 10:44:35 -0800 Received: from IN-lckQE5Rwctls.marvell.com (IN-lckQE5Rwctls.marvell.com [10.28.163.68]) by maili.marvell.com (Postfix) with ESMTP id 188433F7099; Tue, 7 Jan 2025 10:44:31 -0800 (PST) From: Gowrishankar Muthukrishnan To: , Akhil Goyal , Maxime Coquelin , Chenbo Xia , Fan Zhang , Jay Zhou CC: , , David Marchand , Gowrishankar Muthukrishnan Subject: [v2 2/4] common/virtio: support cryptodev in vdev setup Date: Wed, 8 Jan 2025 00:14:07 +0530 Message-ID: X-Mailer: git-send-email 2.37.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: cI2RGfQMEwyISTmQvKDdGKxYw9uEeBUR X-Proofpoint-GUID: cI2RGfQMEwyISTmQvKDdGKxYw9uEeBUR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 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 Support cryptodev in vdev setup. Signed-off-by: Gowrishankar Muthukrishnan --- drivers/common/virtio/virtio_user/vhost_vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/common/virtio/virtio_user/vhost_vdpa.c b/drivers/common/virtio/virtio_user/vhost_vdpa.c index af5c4cbf33..d143967aaa 100644 --- a/drivers/common/virtio/virtio_user/vhost_vdpa.c +++ b/drivers/common/virtio/virtio_user/vhost_vdpa.c @@ -123,6 +123,7 @@ struct virtio_user_dev { #define VIRTIO_NET_F_CTRL_VQ 17 #define VIRTIO_F_IOMMU_PLATFORM 33 #define VIRTIO_ID_NETWORK 0x01 +#define VIRTIO_ID_CRYPTO 0x20 static int vhost_vdpa_set_owner(struct virtio_user_dev *dev) @@ -561,7 +562,7 @@ vhost_vdpa_setup(struct virtio_user_dev *dev) } if (ioctl(data->vhostfd, VHOST_VDPA_GET_DEVICE_ID, &did) < 0 || - did != VIRTIO_ID_NETWORK) { + (did != VIRTIO_ID_NETWORK) || (did != VIRTIO_ID_CRYPTO)) { PMD_DRV_LOG(ERR, "Invalid vdpa device ID: %u", did); close(data->vhostfd); free(data); -- 2.25.1