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 42745431A0 for ; Thu, 19 Oct 2023 02:00:32 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C6534064C; Thu, 19 Oct 2023 02:00:32 +0200 (CEST) Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) by mails.dpdk.org (Postfix) with ESMTP id 3287B40ED8 for ; Thu, 19 Oct 2023 02:00:31 +0200 (CEST) Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-507a98517f3so5577800e87.0 for ; Wed, 18 Oct 2023 17:00:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697673630; x=1698278430; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NpwOO9n0brrNQ9iOUX/w7n61KlCmEeVg/wnxcd79VL8=; b=a2LHbBc44LdLnRP3CZ4wMFMpxMNP9uHUtzNl7LW1k8Iq07yS3mVwY1ZFICkKZeT9qB vOeCVEV11QkoAmHOWZ6Wk80XlD8pU4FHY9Uceaby7JEm+8brI88V3UxWKIjsqtPfDoX4 96Pn8z9IA4y5Ab/V7eBiQCGsc8WT0/ob90Rt2ZtYGF9oNGzF6X7QwkjH9KTmMwFKA1KU z4MgQw+hkZ/agQ+j7MjBvyAyf6YxN39w/Jmu8bnTL5b51qsrGUFPjURxdlz0In2uX7r0 ufCIB+EgEGdWksym3JcG5RaBq3CIwfNkJ4ZGJEm+cyqMjzVR5YBQk3x5ZW4pSuseSRJG vFGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697673630; x=1698278430; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NpwOO9n0brrNQ9iOUX/w7n61KlCmEeVg/wnxcd79VL8=; b=mnreY/tjyX+kPHIwiwa40dfvftWi/1wQ5bYPcHmIrYB3C5fKc6tidMJ+gXYmzHlwwd riCc/jwg5iswDCOGEeUC/mZ5k8gCxQTz1d5lUiOkc5QovaFvguCCs+qSTerGciGgnBmU ASMTMKZzXz/qAI8sgyQ2+/NuAKHyPbsHyFl+LVYWJ8y0LRitwd6b+kiWaroQ1jGNaczD HdRB4fgotMZk0+YKTitQSRJAeQDyFRgEqqU9xpvdGNf2KT0K25JgTe7HRHBtouIH2W2Q eRtpQJgxj2IkWi4OdvGccVgPSiH+8TX17M6RNaRV8GiaJx4OiMSVizdhFI+I4Ude5Stw W3fA== X-Gm-Message-State: AOJu0YxBfrHrZAssynQwCacKAhDX1/z3u60Lq41v/fhIwNI87w3MFezE ypihZNaVnN3nswFipNJY7GTVoB1WVXJ88A== X-Google-Smtp-Source: AGHT+IH/APE3MU6cbXe/K3piEeACWonbYkoTnpvjKPmngd2tR6pjoZLJbh1xl+acaDX7yoWU8vtCag== X-Received: by 2002:ac2:548c:0:b0:503:653:5711 with SMTP id t12-20020ac2548c000000b0050306535711mr333274lfk.9.1697673630536; Wed, 18 Oct 2023 17:00:30 -0700 (PDT) Received: from localhost ([137.220.119.58]) by smtp.gmail.com with ESMTPSA id g11-20020a05600c310b00b003fe1fe56202sm2977740wmo.33.2023.10.18.17.00.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 17:00:30 -0700 (PDT) From: luca.boccassi@gmail.com 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 20.11.10 Date: Thu, 19 Oct 2023 00:59:09 +0100 Message-Id: <20231018235930.3144-20-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231018235930.3144-1-luca.boccassi@gmail.com> References: <20231018235930.3144-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 20.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/21/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://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/029efa33a077190d28c82d1984f1e58c47586566 Thanks. Luca Boccassi --- >From 029efa33a077190d28c82d1984f1e58c47586566 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 [ 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/librte_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 f72bc8a78f..2939771b87 100644 --- a/doc/guides/prog_guide/rte_security.rst +++ b/doc/guides/prog_guide/rte_security.rst @@ -583,68 +583,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/librte_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/librte_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/librte_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/librte_security/rte_security.h b/lib/librte_security/rte_security.h index 88d31de0a6..42895411c3 100644 --- a/lib/librte_security/rte_security.h +++ b/lib/librte_security/rte_security.h @@ -327,6 +327,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 */ @@ -347,8 +348,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 */ @@ -359,10 +362,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 */ @@ -381,6 +386,7 @@ struct rte_security_session_conf { void *userdata; /**< Application specific userdata to be saved with session */ }; +/* >8 End of structure rte_security_session_conf. */ struct rte_security_session { void *sess_private_data; -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-10-19 00:28:57.249466041 +0100 +++ 0020-doc-replace-code-blocks-with-includes-in-security-gu.patch 2023-10-19 00:28:56.249805367 +0100 @@ -1 +1 @@ -From 03e3cfda1679998aa512464affb8dd293146364a Mon Sep 17 00:00:00 2001 +From 029efa33a077190d28c82d1984f1e58c47586566 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 03e3cfda1679998aa512464affb8dd293146364a ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -16 +17 @@ - lib/security/rte_security.h | 6 +++ + lib/librte_security/rte_security.h | 6 +++ @@ -20 +21 @@ -index 7418e35c1b..ae8b0aaef3 100644 +index f72bc8a78f..2939771b87 100644 @@ -23 +24 @@ -@@ -671,68 +671,27 @@ Security session configuration +@@ -583,68 +583,27 @@ Security session configuration @@ -46 +47 @@ -+.. literalinclude:: ../../../lib/security/rte_security.h ++.. literalinclude:: ../../../lib/librte_security/rte_security.h @@ -78 +79 @@ -+.. literalinclude:: ../../../lib/security/rte_security.h ++.. literalinclude:: ../../../lib/librte_security/rte_security.h @@ -97 +98 @@ -+.. literalinclude:: ../../../lib/security/rte_security.h ++.. literalinclude:: ../../../lib/librte_security/rte_security.h @@ -104,5 +105,5 @@ -diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h -index 3f8abfef15..c6550f4d8d 100644 ---- a/lib/security/rte_security.h -+++ b/lib/security/rte_security.h -@@ -622,6 +622,7 @@ struct rte_security_docsis_xform { +diff --git a/lib/librte_security/rte_security.h b/lib/librte_security/rte_security.h +index 88d31de0a6..42895411c3 100644 +--- a/lib/librte_security/rte_security.h ++++ b/lib/librte_security/rte_security.h +@@ -327,6 +327,7 @@ struct rte_security_docsis_xform { @@ -116 +117 @@ -@@ -642,8 +643,10 @@ enum rte_security_session_action_type { +@@ -347,8 +348,10 @@ enum rte_security_session_action_type { @@ -127 +128 @@ -@@ -654,10 +657,12 @@ enum rte_security_session_protocol { +@@ -359,10 +362,12 @@ enum rte_security_session_protocol { @@ -140 +141 @@ -@@ -675,6 +680,7 @@ struct rte_security_session_conf { +@@ -381,6 +386,7 @@ struct rte_security_session_conf { @@ -146,2 +147,2 @@ - /** - * Create security session as specified by the session configuration + struct rte_security_session { + void *sess_private_data;