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 2A06FA034F; Mon, 11 Oct 2021 13:41:45 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 587D5410E1; Mon, 11 Oct 2021 13:41:34 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 2B89140150 for ; Mon, 11 Oct 2021 13:41:32 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10133"; a="207660498" X-IronPort-AV: E=Sophos;i="5.85,364,1624345200"; d="scan'208";a="207660498" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2021 04:41:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,364,1624345200"; d="scan'208";a="479821971" Received: from silpixa00400884.ir.intel.com ([10.243.22.82]) by orsmga007.jf.intel.com with ESMTP; 11 Oct 2021 04:41:28 -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: Mon, 11 Oct 2021 12:29:38 +0100 Message-Id: <20211011112945.2876-4-radu.nicolau@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211011112945.2876-1-radu.nicolau@intel.com> References: <20210713133542.3550525-1-radu.nicolau@intel.com> <20211011112945.2876-1-radu.nicolau@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v8 03/10] 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 --- doc/guides/rel_notes/deprecation.rst | 5 ++--- doc/guides/rel_notes/release_21_11.rst | 5 +++++ lib/security/rte_security.h | 7 +++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 8b7b0beee2..d24d69b669 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -210,9 +210,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 IPsec inner diff --git a/doc/guides/rel_notes/release_21_11.rst b/doc/guides/rel_notes/release_21_11.rst index 8ac6632abf..1a29640eea 100644 --- a/doc/guides/rel_notes/release_21_11.rst +++ b/doc/guides/rel_notes/release_21_11.rst @@ -238,6 +238,11 @@ 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. + + Known Issues ------------ diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h index 371d64647a..b30425e206 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 */ @@ -288,6 +293,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