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 9137BA0C4B; Thu, 14 Oct 2021 18:17:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF38640E0F; Thu, 14 Oct 2021 18:17:46 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id CA2B7410E1 for ; Thu, 14 Oct 2021 18:17:42 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10137"; a="214879311" X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="214879311" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2021 09:15:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,372,1624345200"; d="scan'208";a="442881620" Received: from silpixa00400884.ir.intel.com ([10.243.22.82]) by orsmga003.jf.intel.com with ESMTP; 14 Oct 2021 09:15:41 -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: Thu, 14 Oct 2021 17:03:23 +0100 Message-Id: <20211014160329.579970-4-radu.nicolau@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211014160329.579970-1-radu.nicolau@intel.com> References: <20210713133542.3550525-1-radu.nicolau@intel.com> <20211014160329.579970-1-radu.nicolau@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v10 3/9] security: add UDP params for IPsec NAT-T 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" Add support for specifying UDP port params for UDP encapsulation option. RFC3948 section-2.1 does not enforce using specific the UDP ports for UDP-Encapsulated ESP Header 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 | 5 ++--- doc/guides/rel_notes/release_21_11.rst | 4 ++++ lib/security/rte_security.h | 7 +++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index adec0a5677..a744fdb2c6 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -199,9 +199,8 @@ Deprecation Notices pointer for the private data to the application which can be attached to the packet while enqueuing. -* 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). +* security: The structure ``rte_security_ipsec_xform`` will be extended with: + new field: 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 ef078e756a..ed56c16d4b 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -282,6 +282,10 @@ ABI Changes application to start from an arbitrary ESN value for debug and SA lifetime enforcement purposes. +* security: A new structure ``udp`` was added in structure + ``rte_security_ipsec_xform`` to allow setting the source and destination ports + for UDP encapsulated IPsec traffic. + * 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 764ce83bca..17d0e95412 100644 --- a/lib/security/rte_security.h +++ b/lib/security/rte_security.h @@ -128,6 +128,11 @@ struct rte_security_ipsec_tunnel_param { }; }; +struct rte_security_ipsec_udp_param { + uint16_t sport; + uint16_t dport; +}; + /** * IPsec Security Association option flags */ @@ -326,6 +331,8 @@ struct rte_security_ipsec_xform { }; } esn; /**< Extended Sequence Number */ + struct rte_security_ipsec_udp_param udp; + /**< UDP parameters, ignored when udp_encap option not specified */ }; /** -- 2.25.1