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 36A1545F2A; Tue, 24 Dec 2024 08:39:57 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA2F040663; Tue, 24 Dec 2024 08:39:00 +0100 (CET) Received: from mx0a-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 76C2B40698 for ; Tue, 24 Dec 2024 08:38:59 +0100 (CET) Received: from pps.filterd (m0431384.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4BO5u8HD022793; Mon, 23 Dec 2024 23:38:58 -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=W c3m8llrKU79owu6KLkK+vJIKrRzw0NXtmVBXdn3H5c=; b=M0LcP4rVOkXTcuWXe ooVKP7+5Her28YTifpYYd0WWNfckeZJet6fxpEZhYxBZsdK2TTF9hJY182Ujjta3 9ZbQJ+UAf0BWNJSI9t/qcwHzEG/x5Kne00/zt8riZDiqSga++7UOwlWBchnNoZHq 24JSZSbXFiaZ/1fkAGENOGL5lKj4DHWl+sE1iDWzGp5gzaSvRXp80FmAAveVpDDY VxSRkSvfrc3js8QsnZmXdWOotrLSI/0AGzXocy6f6x335FchjE15irDdD4JaUUfi 6+YxtW/gu5/2CyGSXtJ9Tn1diVnZU6aW+rglwNlWHp3/lHSBAJCQqWJAK2VvvTjV F0SnQ== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 43qq83r8rf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 23 Dec 2024 23:38:58 -0800 (PST) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 23 Dec 2024 23:38:57 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 23 Dec 2024 23:38:57 -0800 Received: from IN-lckQE5Rwctls.marvell.com (IN-lckQE5Rwctls.marvell.com [10.28.163.68]) by maili.marvell.com (Postfix) with ESMTP id 9DF833F705D; Mon, 23 Dec 2024 23:38:54 -0800 (PST) From: Gowrishankar Muthukrishnan To: , Akhil Goyal , Maxime Coquelin , Chenbo Xia , Fan Zhang , Jay Zhou CC: , , Rajesh Mudimadugula , Gowrishankar Muthukrishnan Subject: [v1 14/16] common/virtio: support cryptodev in vdev setup Date: Tue, 24 Dec 2024 13:07:12 +0530 Message-ID: <5c617affb0f5930a57ba12623b2101e9130ddc75.1735025264.git.gmuthukrishn@marvell.com> 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-GUID: tLGLomUl3E6PhNPt6-HCwRRBPnR81ALF X-Proofpoint-ORIG-GUID: tLGLomUl3E6PhNPt6-HCwRRBPnR81ALF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.687,Hydra:6.0.235,FMLib:17.0.607.475 definitions=2020-10-13_15,2020-10-13_02,2020-04-07_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 c32cfdeb18..07d695e0a4 100644 --- a/drivers/common/virtio/virtio_user/vhost_vdpa.c +++ b/drivers/common/virtio/virtio_user/vhost_vdpa.c @@ -122,6 +122,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) @@ -560,7 +561,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