Thread (184 messages) 184 messages, 7 authors, 2021-10-27

Re: [dpdk-dev] [EXT] [PATCH v4 02/10] security: add UDP params for IPsec NAT-T

From: Nicolau, Radu <hidden>
Date: 2021-09-06 11:09:24

On 9/5/2021 3:19 PM, Akhil Goyal wrote:
Hi Radu,
quoted
Add support for specifying UDP port params for UDP encapsulation option.

Signed-off-by: Declan Doherty <redacted>
Signed-off-by: Radu Nicolau <redacted>
Signed-off-by: Abhijit Sinha <redacted>
Signed-off-by: Daniel Martin Buckley <redacted>
Do we really need to specify the port numbers for NAT-T?
I suppose they are fixed as 4500.
Could you please specify what the user need to set here for session
creation?
 From what I'm seeing here 
https://datatracker.ietf.org/doc/html/rfc3948#section-2.1 there is no 
requirement in general for UDP encapsulation so I think it's better to 
make the API flexible as to allow any port to be used.

quoted
---
  lib/security/rte_security.h | 8 ++++++++
  1 file changed, 8 insertions(+)
diff --git a/lib/security/rte_security.h b/lib/security/rte_security.h
index 45896a77d0..03572b10ab 100644
--- a/lib/security/rte_security.h
+++ b/lib/security/rte_security.h
@@ -112,6 +112,12 @@ struct rte_security_ipsec_tunnel_param {
  	};
  };

+struct rte_security_ipsec_udp_param {
+
+	uint16_t sport;
+	uint16_t dport;
+};
+
  /**
   * IPsec Security Association option flags
   */
@@ -224,6 +230,8 @@ struct rte_security_ipsec_xform {
  	/**< IPsec SA Mode - transport/tunnel */
  	struct rte_security_ipsec_tunnel_param tunnel;
  	/**< Tunnel parameters, NULL for transport mode */
+	struct rte_security_ipsec_udp_param udp;
+	/**< UDP parameters, ignored when udp_encap option not specified
*/
  	uint64_t esn_soft_limit;
  	/**< ESN for which the overflow event need to be raised */
  	uint32_t replay_win_sz;
--
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help