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 D5C56431D5 for ; Sun, 22 Oct 2023 16:26:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CEF4D40A8A; Sun, 22 Oct 2023 16:26:56 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2057.outbound.protection.outlook.com [40.107.93.57]) by mails.dpdk.org (Postfix) with ESMTP id 130F14069F for ; Sun, 22 Oct 2023 16:26:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XXCqL2SKGpNukGuvHDbLr8j3svja1NBUGNgSiNQbjPue7RTcb4HcBNEJ88WKpvnk21sXo6GgFrIUeDpdIHzd4TUeJpjZe4V/CRN/wsKwoBvWvz1FFJbZ3eivZAXkxEAyHYs42VpA/XCJkrYaK3lig2Q0h/dDlXrEW8C7Qb9TfR0VjGLv/PV+ky53CCD6rErTx419Ex0TYh5imOUXVDExXWE0NLi45f3P06YUMYqTblU6ePvghkI5Wh70cDbsf0ZYsFlDVYGW8g/EKkXmDn6lAS++FSFVceD1SuuKOpi/SiJ9TePFMjWCK35lA2+0ZFCE7S+gVDXSiU5CisRXu1HHlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mnIdZ5AdtdW4wj/d91qxaHCmsdteU9eFFTUT35t4vBU=; b=OocW18g81ixzlrNEM5f3iYJzU0UJVH5m9ni/wRWzuS18yac7oNovAejzZvX+txvmcq+uYnCDfVadRNtq945y+quhj8L76RbBD2MsqS+BwjoHICluwAPyeZXs3ZLvPxzu2ZKRKySZ5pn4lVel1EDjVCSxbr2l/alkQNUlqbw4jPAQCEkNrUFLUQqpu6FKdZP5rO97RvlpC40488DJOT23kmNwpiJ6gz38kSaE2U6u66KmpGBxs5mcLGvz74EXooduydx2RpA+FxNnLpiiUt561G3mvuq1joVNvCK2u68Hi11kS38W/8sOhqlCJEFVoOioCWVnUNpCGBJ5SVomE408TQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=marvell.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mnIdZ5AdtdW4wj/d91qxaHCmsdteU9eFFTUT35t4vBU=; b=fPvE1nOhJhruDXZAln3Iu5s/Fb2/c9wRqAULgx/wmm+cWzZePvfiGr6EhvdeKcNcaxRSafXMOYr4rLSsG8deUk0qVtd4iPv8rquxvXv72s3svNvvVxpdQbuRxKFnERQAyGpt6ccOtFZ0UAzoZJjRqhcQr7mKJMk6Z0cXHyU98n9Zgg4FICa0sh6CD5JZbLNl3FslPKJ1SHXiaqRBhLgNu5xf4L2S8C5AJWP/ZkyVUuHWdbueBIwDCJNfoGdNkhj8BFt/dZP0SBJAzwcP76wqWBdDA25sxr3JzbvRuzyBgH/3RTjZVXaalbzOpPqt7hN6QWgPvsnc4ezMICrPBHekMQ== Received: from CH2PR15CA0026.namprd15.prod.outlook.com (2603:10b6:610:51::36) by SA1PR12MB8947.namprd12.prod.outlook.com (2603:10b6:806:386::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26; Sun, 22 Oct 2023 14:26:52 +0000 Received: from DS1PEPF00017094.namprd03.prod.outlook.com (2603:10b6:610:51:cafe::57) by CH2PR15CA0026.outlook.office365.com (2603:10b6:610:51::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.29 via Frontend Transport; Sun, 22 Oct 2023 14:26:52 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DS1PEPF00017094.mail.protection.outlook.com (10.167.17.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.15 via Frontend Transport; Sun, 22 Oct 2023 14:26:51 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 22 Oct 2023 07:26:44 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Sun, 22 Oct 2023 07:26:42 -0700 From: Xueming Li To: Anoob Joseph CC: Akhil Goyal , dpdk stable Subject: patch 'doc: replace code blocks with includes in security guide' has been queued to stable release 22.11.4 Date: Sun, 22 Oct 2023 22:21:11 +0800 Message-ID: <20231022142250.10324-43-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231022142250.10324-1-xuemingl@nvidia.com> References: <20231022142250.10324-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017094:EE_|SA1PR12MB8947:EE_ X-MS-Office365-Filtering-Correlation-Id: cafc1a20-6fc9-421c-6c62-08dbd30aef2a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /BBwS79nuVYc3We2WG/JiLS5iZE3rWmtRrekWcgBjm1Ag74e841ABYgJqtyfkg1ZOqI2YB3k33han6YEugUHsx6+omppfd20hh0aVjh4fFXAeQvvgQ/zgB1lFN3IFW42XIHOIwu9mglyblerKWuaWQMa4Kv56x/lFXcoEybnVi9hyR4a6FQx3pq27gQQxIt8W7w6zXurC+j9s7avH7ps/rQZdeFgYWWtkEXARjRgpf0Nh89OuJo+4JWLhl7euIjodaOCUuHuWGni8Qj75s3zhL+94ySDQqwLWtN5pWTggPhNMXgD5I0nKn4cDvS01vLDKLJRILGKDBYeJVhqfTuhQT1cSw4Wvy3oso3AQ75KrABdEc9sYOriG5cxtkBhdTAh6ANHCShn7H6EfOpNz1YRrlKssGhaBHj/XDV0OYONKLAzMD+LxOhDljGyd8hHa2fn2aqtWh2vyoU+He0F4oEmej/QZD+efuv0SfCpwWRUsRXXoZFDHJ+CMLvgs6gGPf3yhu8IpZXQRGFEJzkuiuxEoMx7QXK7A0ebXI9AItrYGUwste5ITkXtLgQ+VZiyKBCeF89m7ip6pWDdXr3eDcyAe+Ownv/X/i+J1clzktmGPDz0CuGl0W3DrucvfwiP0SiIL+9Eg/kwddTOIX6z5ELhVRyN3Omp3t4luS7ID8+iQFb6GFXaGodshJO3039OuR9rIyC+g1V58+mKkc0KFB2XUY9S8q0rqhNNCCuqJ8DuJKy2oNE4vEWiWqgi2JYJnHlKMZS97ByR3btktYfQt1Kgy841nMDBtRaYjdgHwJXcH2M= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(4636009)(39860400002)(136003)(376002)(396003)(346002)(230922051799003)(186009)(451199024)(64100799003)(82310400011)(1800799009)(46966006)(40470700004)(36840700001)(4326008)(86362001)(40460700003)(6286002)(55016003)(2616005)(47076005)(7696005)(15650500001)(2906002)(36756003)(4001150100001)(336012)(16526019)(83380400001)(356005)(1076003)(7636003)(82740400003)(41300700001)(40480700001)(426003)(36860700001)(5660300002)(53546011)(26005)(6666004)(478600001)(8676002)(966005)(70206006)(70586007)(316002)(54906003)(6916009)(8936002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2023 14:26:51.7163 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cafc1a20-6fc9-421c-6c62-08dbd30aef2a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017094.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8947 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/15/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=22.11-staging&id=7004929e2978e63af021411e31eb0b9a05d2c87d Thanks. Xueming Li --- >From 7004929e2978e63af021411e31eb0b9a05d2c87d Mon Sep 17 00:00:00 2001 From: Anoob Joseph Date: Fri, 18 Aug 2023 14:59:42 +0530 Subject: [PATCH] doc: replace code blocks with includes in security guide Cc: Xueming Li [ upstream commit 03e3cfda1679998aa512464affb8dd293146364a ] 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 4bacf9fcd9..fd7013a23d 100644 --- a/lib/security/rte_security.h +++ b/lib/security/rte_security.h @@ -618,6 +618,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 */ @@ -638,8 +639,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 */ @@ -650,10 +653,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 */ @@ -672,6 +677,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 -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-10-22 22:17:35.995120100 +0800 +++ 0042-doc-replace-code-blocks-with-includes-in-security-gu.patch 2023-10-22 22:17:34.236723700 +0800 @@ -1 +1 @@ -From 03e3cfda1679998aa512464affb8dd293146364a Mon Sep 17 00:00:00 2001 +From 7004929e2978e63af021411e31eb0b9a05d2c87d Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 03e3cfda1679998aa512464affb8dd293146364a ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -105 +107 @@ -index 3f8abfef15..c6550f4d8d 100644 +index 4bacf9fcd9..fd7013a23d 100644 @@ -108 +110 @@ -@@ -622,6 +622,7 @@ struct rte_security_docsis_xform { +@@ -618,6 +618,7 @@ struct rte_security_docsis_xform { @@ -116 +118 @@ -@@ -642,8 +643,10 @@ enum rte_security_session_action_type { +@@ -638,8 +639,10 @@ enum rte_security_session_action_type { @@ -127 +129 @@ -@@ -654,10 +657,12 @@ enum rte_security_session_protocol { +@@ -650,10 +653,12 @@ enum rte_security_session_protocol { @@ -140 +142 @@ -@@ -675,6 +680,7 @@ struct rte_security_session_conf { +@@ -672,6 +677,7 @@ struct rte_security_session_conf {