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 A21544326F for ; Thu, 2 Nov 2023 14:13:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D52C42DB4; Thu, 2 Nov 2023 14:13:54 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 2CC0F402E3 for ; Thu, 2 Nov 2023 14:13:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1698930832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xHbShjdNFF3jLpI80ewADkbBRJ+SYd10iRJ325bCb7c=; b=P4OW2aFSbRRQBq0Nkn9+bUfi+kz8P7szMXiu6VXGEEzkGC8B88M2AoGP6ggJZfUbdMStpx 8V3IJU79e73Abz4Jx4zSWOvWrlHjD7UaKpTecChY1KRTCVhnI0MmiBcOi1zToyjAXgUZT5 y0G1Hg+16DhxosYZT/3MUQSBBQw9TQ4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-461-PeIajywQP5i5D4iZzXb9Jg-1; Thu, 02 Nov 2023 09:13:49 -0400 X-MC-Unique: PeIajywQP5i5D4iZzXb9Jg-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 52E47811E7B; Thu, 2 Nov 2023 13:13:49 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.192.45]) by smtp.corp.redhat.com (Postfix) with ESMTP id 74DA8492BFA; Thu, 2 Nov 2023 13:13:48 +0000 (UTC) From: Kevin Traynor 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 21.11.6 Date: Thu, 2 Nov 2023 13:11:34 +0000 Message-ID: <20231102131254.315947-28-ktraynor@redhat.com> In-Reply-To: <20231102131254.315947-1-ktraynor@redhat.com> References: <20231102131254.315947-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 21.11.6 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/08/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/de8bdca2b3b761a8833de512c695913c54a76fc8 Thanks. Kevin --- >From de8bdca2b3b761a8833de512c695913c54a76fc8 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/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 72ca0bd330..8619757e84 100644 --- a/doc/guides/prog_guide/rte_security.rst +++ b/doc/guides/prog_guide/rte_security.rst @@ -593,23 +593,8 @@ 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 @@ -618,41 +603,15 @@ session is configured for Lookaside Protocol offload or Inline Crypto or Inline 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. diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h index 1a15e95267..71af1bf3e3 100644 --- a/lib/security/rte_security.h +++ b/lib/security/rte_security.h @@ -454,4 +454,5 @@ 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, @@ -474,6 +475,8 @@ enum rte_security_session_action_type { */ }; +/* >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, @@ -486,8 +489,10 @@ enum rte_security_session_protocol { /**< 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; @@ -508,4 +513,5 @@ struct rte_security_session_conf { /**< Application specific userdata to be saved with session */ }; +/* >8 End of structure rte_security_session_conf. */ struct rte_security_session { -- 2.41.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-11-02 13:09:41.561249512 +0000 +++ 0028-doc-replace-code-blocks-with-includes-in-security-gu.patch 2023-11-02 13:09:40.824163371 +0000 @@ -1 +1 @@ -From 03e3cfda1679998aa512464affb8dd293146364a Mon Sep 17 00:00:00 2001 +From de8bdca2b3b761a8833de512c695913c54a76fc8 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 03e3cfda1679998aa512464affb8dd293146364a ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -20 +21 @@ -index 7418e35c1b..ae8b0aaef3 100644 +index 72ca0bd330..8619757e84 100644 @@ -23 +24 @@ -@@ -672,23 +672,8 @@ Security session configuration +@@ -593,23 +593,8 @@ Security session configuration @@ -51 +52 @@ -@@ -697,41 +682,15 @@ session is configured for Lookaside Protocol offload or Inline Crypto or Inline +@@ -618,41 +603,15 @@ session is configured for Lookaside Protocol offload or Inline Crypto or Inline @@ -102 +103 @@ -index 3f8abfef15..c6550f4d8d 100644 +index 1a15e95267..71af1bf3e3 100644 @@ -105 +106 @@ -@@ -623,4 +623,5 @@ struct rte_security_docsis_xform { +@@ -454,4 +454,5 @@ struct rte_security_docsis_xform { @@ -111 +112 @@ -@@ -643,6 +644,8 @@ enum rte_security_session_action_type { +@@ -474,6 +475,8 @@ enum rte_security_session_action_type { @@ -120 +121 @@ -@@ -655,8 +658,10 @@ enum rte_security_session_protocol { +@@ -486,8 +489,10 @@ enum rte_security_session_protocol { @@ -131 +132 @@ -@@ -676,4 +681,5 @@ struct rte_security_session_conf { +@@ -508,4 +513,5 @@ struct rte_security_session_conf { @@ -136 +137 @@ - /** + struct rte_security_session {