From 199fcba1bd2c8ba0d880828ea134557e4fbdae49 Mon Sep 17 00:00:00 2001 From: Radu Nicolau Date: Thu, 14 Oct 2021 17:03:21 +0100 Subject: [PATCH] security: add ESN field to IPsec xform 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 Acked-by: Akhil Goyal --- 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 5183d05804..cc9718cdec 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -208,7 +208,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 d85690047d..2dafb66897 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -305,6 +305,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.20.1