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 192B545701; Wed, 31 Jul 2024 14:03:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 039FA40A87; Wed, 31 Jul 2024 14:03: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 9C65A40696 for ; Wed, 31 Jul 2024 13:55:02 +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 46V3DQMW001745; Wed, 31 Jul 2024 04:54:56 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=pfpt0220; bh=xFBrrxUdLq+InpFcgM4e4Gt Fag9MOGk0XJdOAN/Hq30=; b=JxfcsSmiRXs/mDc6nHZpLR9L4Waz+qpRmoj3Y1R 6xlw7mjeq89sHEVbVlwUq5BgOFOVYfUEBgoNhzJ0oUCX6OxSxeSze6AfWekpeKfN F7Vn3WBh7pskHaHyP8UeUvTucEx2TO8V10/iKXohXXuQYZ2YQ/LHsHacbXn6q2hu HtFaFw9r6B453bAWzkXDVjETEyT/pkPp6oY5q3sJvlm53kfColCSNq7gPMwj22fe mNUhn/oSBkryGtlIkrGr6uSYXh22KMTCd339ANYMBj12wPKhrx3fOxb/sBzox0Yu NJMIpK+sb7WKsqwkmQzcXLa+oHFOE3+7gMd7TTJaYsvLi4A== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 40qd64sxs1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 31 Jul 2024 04:54:55 -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; Wed, 31 Jul 2024 04:54:54 -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; Wed, 31 Jul 2024 04:54:54 -0700 Received: from localhost.localdomain (unknown [10.28.36.102]) by maili.marvell.com (Postfix) with ESMTP id 5AE505C68E1; Wed, 31 Jul 2024 04:54:49 -0700 (PDT) From: Akhil Goyal To: CC: , , , , , , , , , , , , , , , , Akhil Goyal Subject: [PATCH 1/2] cryptodev: add queue pair priority Date: Wed, 31 Jul 2024 17:24:44 +0530 Message-ID: <20240731115445.1771803-1-gakhil@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: gAnS9c14tJmy-GYGEQy8kTEEUlLcP7qJ X-Proofpoint-GUID: gAnS9c14tJmy-GYGEQy8kTEEUlLcP7qJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-31_08,2024-07-30_01,2024-05-17_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 Change-Id: Ida87d0f354901013f3321cfa9ada443f39b00e0f --- lib/cryptodev/rte_cryptodev.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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