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 2E36045A1E; Tue, 24 Sep 2024 18:38:27 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1829540608; Tue, 24 Sep 2024 18:38:26 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 6648040274 for ; Tue, 24 Sep 2024 18:38:24 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48OAYI5r013074; Tue, 24 Sep 2024 09:38:16 -0700 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=d hOjNNSG8gJMIWkDtdSef4OddnWAvUevpYf1Xigm5z8=; b=c5QEX+r/eDbl6gVqM WrUbbncFTOVzBCY5oDEp408mk/FdI7/a9ae6kqXBfN94i1ml39JNMWNZvyABzl1m 6oriWn64cMHc4WwtexTl+wbJFGv0Wcqe13/V3t087wbGnUcORr3u86MvOjNb4xCq lEAPLA2zxnBEVec6BlgFb2aiegKHC0VVhT8A+TmUrMeKi8tiyz+QfU4TUhkN/nxT BSID2NW5Z3BjUFAJIoJlFnty6YsQrnbTaOQOHoIFi1W45XW4ZJ+0eCZCXuEEcukT UzdHTOTjjA0APfqy6B10WTmvQnEY/4O8SVD1rXsEToXuDYyl6oLod1foleF9k81n 2oLhw== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 41sugp67c5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Sep 2024 09:38:16 -0700 (PDT) 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, 24 Sep 2024 09:38:15 -0700 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, 24 Sep 2024 09:38:15 -0700 Received: from localhost.localdomain (unknown [10.28.36.102]) by maili.marvell.com (Postfix) with ESMTP id 952473F707E; Tue, 24 Sep 2024 09:38:09 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , , , , , , , , , , , , Akhil Goyal Subject: [PATCH v2 1/2] cryptodev: add queue pair priority Date: Tue, 24 Sep 2024 22:08:00 +0530 Message-ID: <20240924163801.1841582-2-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240924163801.1841582-1-gakhil@marvell.com> References: <20240731115445.1771803-1-gakhil@marvell.com> <20240924163801.1841582-1-gakhil@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: 3wOGDPo8aaaOnTOYTvX7R7KUZruRGny7 X-Proofpoint-GUID: 3wOGDPo8aaaOnTOYTvX7R7KUZruRGny7 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 Added a new field priority in `rte_cryptodev_qp_conf`, to set the queue pair priority while setting up. The priorities can be set between `RTE_CRYPTODEV_QP_PRIORITY_HIGHEST` and `RTE_CRYPTODEV_QP_PRIORITY_LOWEST`. The underlying implementation may normalize the value as per the supported priority levels. If the implementation does not support setting up priority, all queue pairs will be on same priority level and this field will be ignored. Signed-off-by: Akhil Goyal --- doc/guides/rel_notes/deprecation.rst | 3 --- doc/guides/rel_notes/release_24_11.rst | 3 +++ lib/cryptodev/rte_cryptodev.h | 22 ++++++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 211f59fdc9..3605e9cddc 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -174,9 +174,6 @@ Deprecation Notices which got error interrupt to the application, so that application can reset that particular queue pair. -* cryptodev: The structure ``rte_cryptodev_qp_conf`` will be updated - to have a new parameter to set priority of that particular queue pair. - * cryptodev: The enum ``rte_crypto_asym_xform_type`` and struct ``rte_crypto_asym_op`` will be extended to include new values to support EDDSA. This will break ABI compatibility with existing applications that use these data types. diff --git a/doc/guides/rel_notes/release_24_11.rst b/doc/guides/rel_notes/release_24_11.rst index 0ff70d9057..fcdc738cf6 100644 --- a/doc/guides/rel_notes/release_24_11.rst +++ b/doc/guides/rel_notes/release_24_11.rst @@ -100,6 +100,9 @@ ABI Changes Also, make sure to start the actual text at the margin. ======================================================= +* cryptodev: The queue pair configuration structure ``rte_cryptodev_qp_conf`` + is updated to have a new parameter to set priority of that particular queue pair. + Known Issues ------------ diff --git a/lib/cryptodev/rte_cryptodev.h b/lib/cryptodev/rte_cryptodev.h index bec947f6d5..0a9cd718ea 100644 --- a/lib/cryptodev/rte_cryptodev.h +++ b/lib/cryptodev/rte_cryptodev.h @@ -608,12 +608,34 @@ enum rte_cryptodev_event_type { RTE_CRYPTODEV_EVENT_MAX /**< max value of this enum */ }; +/* Crypto queue pair priority levels */ +#define RTE_CRYPTODEV_QP_PRIORITY_HIGHEST 0 +/**< Highest priority of a cryptodev queue pair + * @see rte_cryptodev_queue_pair_setup(), rte_cryptodev_enqueue_burst() + */ +#define RTE_CRYPTODEV_QP_PRIORITY_NORMAL 128 +/**< Normal priority of a cryptodev queue pair + * @see rte_cryptodev_queue_pair_setup(), rte_cryptodev_enqueue_burst() + */ +#define RTE_CRYPTODEV_QP_PRIORITY_LOWEST 255 +/**< Lowest priority of a cryptodev queue pair + * @see rte_cryptodev_queue_pair_setup(), rte_cryptodev_enqueue_burst() + */ + /** Crypto device queue pair configuration structure. */ /* Structure rte_cryptodev_qp_conf 8<*/ struct rte_cryptodev_qp_conf { uint32_t nb_descriptors; /**< Number of descriptors per queue pair */ struct rte_mempool *mp_session; /**< The mempool for creating session in sessionless mode */ + uint8_t priority; + /**< Priority for this queue pair relative to other queue pairs. + * + * The requested priority should in the range of + * [@ref RTE_CRYPTODEV_QP_PRIORITY_HIGHEST, @ref RTE_CRYPTODEV_QP_PRIORITY_LOWEST]. + * The implementation may normalize the requested priority to + * device supported priority value. + */ }; /* >8 End of structure rte_cryptodev_qp_conf. */ -- 2.25.1