From patchwork Fri Aug 18 09:29:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 130511 X-Patchwork-Delegate: gakhil@marvell.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 1638343095; Fri, 18 Aug 2023 11:29:57 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C3CF40ED9; Fri, 18 Aug 2023 11:29:56 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id DE88440395 for ; Fri, 18 Aug 2023 11:29:54 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37I8bKJs014092; Fri, 18 Aug 2023 02:29:53 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=uP3o84eYeBy9BoPFFO7mRD4Pp50NymwpguFw6UieYsY=; b=Qsix0FtPiOyEVWheB84R4zzTat4di79h6QeX+iGiE+ccoQW5hdu2Lkn7gv+nuSzPv5J5 uT4me6YIcmDCTFEHzYSyWVpcnIE1mEkpOh6HtGEM093jhxtJib2hhXmMjWrjTaH6d+Nr 25kdTMEmU07Qc/NF2jZsWLWDg55g0I8CMdTyoGB6fjR8rAABfHSf7yeG7VSmEWOz5DEV XsnbDqqdKkPu6X5PSSxU9hs350dPxBCG8lmhdXq6lAh65Vnw3AXsneb4yN59t4O55KaS zBVcUmsKWte0zQpbhf9g7XP8hS3GJ8vKbHl1r9uFqlDy5ioDNxn1yZWRtA9HS7BdnEl2 UA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3sj59y042s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 18 Aug 2023 02:29:53 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 18 Aug 2023 02:29:45 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Fri, 18 Aug 2023 02:29:45 -0700 Received: from BG-LT92004.corp.innovium.com (unknown [10.28.163.189]) by maili.marvell.com (Postfix) with ESMTP id 238C13F7048; Fri, 18 Aug 2023 02:29:42 -0700 (PDT) From: Anoob Joseph To: Thomas Monjalon , Akhil Goyal , Jerin Jacob CC: Bruce Richardson , Subject: [PATCH 1/2] doc: fix code blocks in security guide Date: Fri, 18 Aug 2023 14:59:42 +0530 Message-ID: <20230818092943.1771-1-anoobj@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: ufOp6sHJcVXdE0PSWVSIvPnJ9X0Wq4aa X-Proofpoint-GUID: ufOp6sHJcVXdE0PSWVSIvPnJ9X0Wq4aa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-18_11,2023-08-17_02,2023-05-22_02 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 Add literal includes to copy code block while compiling. Having a copy may lead to mismatch if code is updated without updating the doc. Fixes: 40ff8c99ea99 ("doc: add details of security library") Signed-off-by: Anoob Joseph Acked-by: Akhil Goyal --- doc/guides/prog_guide/rte_security.rst | 65 +++++--------------------- lib/security/rte_security.h | 6 +++ 2 files changed, 18 insertions(+), 53 deletions(-) diff --git a/doc/guides/prog_guide/rte_security.rst b/doc/guides/prog_guide/rte_security.rst index 7418e35c1b..ae8b0aaef3 100644 --- a/doc/guides/prog_guide/rte_security.rst +++ b/doc/guides/prog_guide/rte_security.rst @@ -671,68 +671,27 @@ Security session configuration Security Session configuration structure is defined as ``rte_security_session_conf`` -.. code-block:: c - - struct rte_security_session_conf { - enum rte_security_session_action_type action_type; - /**< Type of action to be performed on the session */ - enum rte_security_session_protocol protocol; - /**< Security protocol to be configured */ - union { - struct rte_security_ipsec_xform ipsec; - struct rte_security_macsec_xform macsec; - struct rte_security_pdcp_xform pdcp; - struct rte_security_docsis_xform docsis; - }; - /**< Configuration parameters for security session */ - struct rte_crypto_sym_xform *crypto_xform; - /**< Security Session Crypto Transformations */ - void *userdata; - /**< Application specific userdata to be saved with session */ - }; +.. literalinclude:: ../../../lib/security/rte_security.h + :language: c + :start-after: Structure rte_security_session_conf 8< + :end-before: >8 End of structure rte_security_session_conf. The configuration structure reuses the ``rte_crypto_sym_xform`` struct for crypto related configuration. The ``rte_security_session_action_type`` struct is used to specify whether the session is configured for Lookaside Protocol offload or Inline Crypto or Inline Protocol Offload. -.. code-block:: c - - enum rte_security_session_action_type { - RTE_SECURITY_ACTION_TYPE_NONE, - /**< No security actions */ - RTE_SECURITY_ACTION_TYPE_INLINE_CRYPTO, - /**< Crypto processing for security protocol is processed inline - * during transmission - */ - RTE_SECURITY_ACTION_TYPE_INLINE_PROTOCOL, - /**< All security protocol processing is performed inline during - * transmission - */ - RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL, - /**< All security protocol processing including crypto is performed - * on a lookaside accelerator - */ - RTE_SECURITY_ACTION_TYPE_CPU_CRYPTO - /**< Similar to ACTION_TYPE_NONE but crypto processing for security - * protocol is processed synchronously by a CPU. - */ - }; +.. literalinclude:: ../../../lib/security/rte_security.h + :language: c + :start-after: Enumeration of rte_security_session_action_type 8< + :end-before: >8 End enumeration of rte_security_session_action_type. The ``rte_security_session_protocol`` is defined as -.. code-block:: c - - enum rte_security_session_protocol { - RTE_SECURITY_PROTOCOL_IPSEC = 1, - /**< IPsec Protocol */ - RTE_SECURITY_PROTOCOL_MACSEC, - /**< MACSec Protocol */ - RTE_SECURITY_PROTOCOL_PDCP, - /**< PDCP Protocol */ - RTE_SECURITY_PROTOCOL_DOCSIS, - /**< DOCSIS Protocol */ - }; +.. literalinclude:: ../../../lib/security/rte_security.h + :language: c + :start-after: Enumeration of rte_security_session_protocol 8< + :end-before: >8 End enumeration of rte_security_session_protocol. Currently the library defines configuration parameters for IPsec and PDCP only. For other protocols like MACSec, structures and enums are defined as place holders diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h index 35ddf208a7..c908c428ad 100644 --- a/lib/security/rte_security.h +++ b/lib/security/rte_security.h @@ -634,6 +634,7 @@ struct rte_security_docsis_xform { /** * Security session action type. */ +/* Enumeration of rte_security_session_action_type 8<*/ enum rte_security_session_action_type { RTE_SECURITY_ACTION_TYPE_NONE, /**< No security actions */ @@ -654,8 +655,10 @@ enum rte_security_session_action_type { * protocol is processed synchronously by a CPU. */ }; +/* >8 End enumeration of rte_security_session_action_type. */ /** Security session protocol definition */ +/* Enumeration of rte_security_session_protocol 8<*/ enum rte_security_session_protocol { RTE_SECURITY_PROTOCOL_IPSEC = 1, /**< IPsec Protocol */ @@ -666,10 +669,12 @@ enum rte_security_session_protocol { RTE_SECURITY_PROTOCOL_DOCSIS, /**< DOCSIS Protocol */ }; +/* >8 End enumeration of rte_security_session_protocol. */ /** * Security session configuration */ +/* Structure rte_security_session_conf 8< */ struct rte_security_session_conf { enum rte_security_session_action_type action_type; /**< Type of action to be performed on the session */ @@ -688,6 +693,7 @@ struct rte_security_session_conf { void *userdata; /**< Application specific userdata to be saved with session */ }; +/* >8 End of structure rte_security_session_conf. */ /** * Create security session as specified by the session configuration From patchwork Fri Aug 18 09:29:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anoob Joseph X-Patchwork-Id: 130512 X-Patchwork-Delegate: gakhil@marvell.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 4047B43095; Fri, 18 Aug 2023 11:30:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C184F4324E; Fri, 18 Aug 2023 11:29:57 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 35E6440ED9 for ; Fri, 18 Aug 2023 11:29:55 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37I8bKJt014092; Fri, 18 Aug 2023 02:29:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=Mdi/34QzsEbz03+o9Ds+MvYqnGVPQG/64dwA6FuGhKQ=; b=AAAaXDRWhK+uSBfG1WdGFS+QKg5LaLC6PmeJBznTi6yHiSstZMK9SznFz7JxJatAjRWT 9Dk1zYfKbT8UFlZIRnjMxZpNId+USZfQZ4pICqkE7y7Ja61XM+YutQ4dAmCXZ9DJRjH3 xBMmOUuapF72nolfTpmmpBts90bMDbl9LZQYpDmbvENW9sppAsS6lX9N2OXlEDqdAaGx 4glxkXPPDA37/IW2HJ8bEQ4+tbezdDPHpUvTqClTK8T6EAg+fRI91ZnuFuklMV4kXY6F ywYRt3XsSLnPtUIvronTkSK5thfge4vhYNiRzadjgbIBiv46pAZCBIbg5UYsC2vWPrYs +w== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3sj59y042s-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 18 Aug 2023 02:29:54 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Fri, 18 Aug 2023 02:29:47 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Fri, 18 Aug 2023 02:29:47 -0700 Received: from BG-LT92004.corp.innovium.com (unknown [10.28.163.189]) by maili.marvell.com (Postfix) with ESMTP id B276E3F7060; Fri, 18 Aug 2023 02:29:45 -0700 (PDT) From: Anoob Joseph To: Thomas Monjalon , Akhil Goyal , Jerin Jacob CC: Bruce Richardson , Subject: [PATCH 2/2] doc: update security guide Date: Fri, 18 Aug 2023 14:59:43 +0530 Message-ID: <20230818092943.1771-2-anoobj@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230818092943.1771-1-anoobj@marvell.com> References: <20230818092943.1771-1-anoobj@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: t2Bj0nWlQ5m3Al4RpvSHXiB_t-eDvmXQ X-Proofpoint-GUID: t2Bj0nWlQ5m3Al4RpvSHXiB_t-eDvmXQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-08-18_11,2023-08-17_02,2023-05-22_02 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 Security library has definitions for configuration parameters of DOCSIS and MACsec. Remove obsolete comments. Signed-off-by: Anoob Joseph Acked-by: Akhil Goyal --- doc/guides/prog_guide/rte_security.rst | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/guides/prog_guide/rte_security.rst b/doc/guides/prog_guide/rte_security.rst index ae8b0aaef3..b4db4a7bfd 100644 --- a/doc/guides/prog_guide/rte_security.rst +++ b/doc/guides/prog_guide/rte_security.rst @@ -693,10 +693,6 @@ The ``rte_security_session_protocol`` is defined as :start-after: Enumeration of rte_security_session_protocol 8< :end-before: >8 End enumeration of rte_security_session_protocol. -Currently the library defines configuration parameters for IPsec and PDCP only. -For other protocols like MACSec, structures and enums are defined as place holders -which will be updated in the future. - IPsec related configuration parameters are defined in ``rte_security_ipsec_xform`` MACsec related configuration parameters are defined in ``rte_security_macsec_xform``