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 08EB3A0C55; Wed, 13 Oct 2021 14:25:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EF1E411BD; Wed, 13 Oct 2021 14:25:29 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 823BD411BD for ; Wed, 13 Oct 2021 14:25:27 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10135"; a="207528537" X-IronPort-AV: E=Sophos;i="5.85,370,1624345200"; d="scan'208";a="207528537" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Oct 2021 05:25:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,370,1624345200"; d="scan'208";a="524607691" Received: from silpixa00400884.ir.intel.com ([10.243.22.82]) by orsmga001.jf.intel.com with ESMTP; 13 Oct 2021 05:25:23 -0700 From: Radu Nicolau To: Ray Kinsella , Akhil Goyal , Declan Doherty Cc: dev@dpdk.org, konstantin.ananyev@intel.com, vladimir.medvedkin@intel.com, bruce.richardson@intel.com, roy.fan.zhang@intel.com, hemant.agrawal@nxp.com, anoobj@marvell.com, abhijit.sinha@intel.com, daniel.m.buckley@intel.com, marchana@marvell.com, ktejasree@marvell.com, matan@nvidia.com, Radu Nicolau Date: Wed, 13 Oct 2021 13:13:22 +0100 Message-Id: <20211013121331.300245-2-radu.nicolau@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211013121331.300245-1-radu.nicolau@intel.com> References: <20210713133542.3550525-1-radu.nicolau@intel.com> <20211013121331.300245-1-radu.nicolau@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v9 01/10] security: add ESN field to ipsec_xform 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 Sender: "dev" Update ipsec_xform definition to include ESN field. This allows the application to control the ESN starting value. Signed-off-by: Declan Doherty Signed-off-by: Radu Nicolau Signed-off-by: Abhijit Sinha Signed-off-by: Daniel Martin Buckley Acked-by: Fan Zhang Acked-by: Anoob Joseph Acked-by: Konstantin Ananyev --- doc/guides/rel_notes/deprecation.rst | 2 +- doc/guides/rel_notes/release_21_11.rst | 5 +++++ lib/security/rte_security.h | 8 ++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index a4e86b31f5..accb9c7d83 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -206,7 +206,7 @@ Deprecation Notices * security: The structure ``rte_security_ipsec_xform`` will be extended with multiple fields: source and destination port of UDP encapsulation, - IPsec payload MSS (Maximum Segment Size), and ESN (Extended Sequence Number). + IPsec payload MSS (Maximum Segment Size). * security: The IPsec SA config options ``struct rte_security_ipsec_sa_options`` will be updated with new fields to support new features like TSO in case of diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst index 54718ff367..f840586a20 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -265,6 +265,11 @@ ABI Changes packet IPv4 header checksum and L4 checksum need to be offloaded to security device. +* security: A new structure ``esn`` was added in structure + ``rte_security_ipsec_xform`` to set an initial ESN value. This permits + application to start from an arbitrary ESN value for debug and SA lifetime + enforcement purposes. + * bbdev: Added capability related to more comprehensive CRC options, shifting values of the ``enum rte_bbdev_op_ldpcdec_flag_bitmasks``. diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h index 7eb9f109ae..764ce83bca 100644 --- a/lib/security/rte_security.h +++ b/lib/security/rte_security.h @@ -318,6 +318,14 @@ struct rte_security_ipsec_xform { /**< Anti replay window size to enable sequence replay attack handling. * replay checking is disabled if the window size is 0. */ + union { + uint64_t value; + struct { + uint32_t low; + uint32_t hi; + }; + } esn; + /**< Extended Sequence Number */ }; /** -- 2.25.1