diff mbox series

[API-NEXT,v3,2/2] api: ipsec: support TFC packets reception

Message ID 1513897240-21266-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v3,1/2] api: ipsec: document TFC padding usage | expand

Commit Message

Github ODP bot Dec. 21, 2017, 11 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Add error bit used to report TFC (NH=59) packets. Such events MUST be
generated in SYNC and ASYNC modes. In INLINE mode generation of this
error is controlled by inline_tfc_packets_drop config field. Support for
dropping or delivering TFC packets in INLINE mode is reported to
application via inline_tfc_packets_drop and inline_tfc_packets_deliver
capabilities.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 329 (lumag:ipsec-tfc)
 ** https://github.com/Linaro/odp/pull/329
 ** Patch: https://github.com/Linaro/odp/pull/329.patch
 ** Base sha: 177eeff39e19289e771119cfdffc515cb16f9db5
 ** Merge commit sha: b3c4632b8d6f0fb1635f4ec9eedd9862b727f5a5
 **/
 include/odp/api/spec/ipsec.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff mbox series

Patch

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index a6a622f13..447d0c933 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -146,6 +146,13 @@  typedef struct odp_ipsec_inbound_config_t {
 	 */
 	odp_proto_chksums_t chksums;
 
+	/** Drop TFC dummy packets (NH=59) instead of reporting it via
+	 *  @tfc_dummy_packet error bit.
+	 *
+	 *  @see tfc_dummy_packets_drop
+	 */
+	odp_bool_t tfc_dummy_packets_drop;
+
 } odp_ipsec_inbound_config_t;
 
 /**
@@ -242,6 +249,11 @@  typedef struct odp_ipsec_capability_t {
 	 *  packets */
 	odp_bool_t tfc_padding_truncate;
 
+	/**
+	 * Support dropping TFC dummy packets
+	 */
+	odp_support_t tfc_dummy_packets_drop;
+
 	/** Maximum number of different destination CoSes in classification
 	 *  pipelining. The same CoS may be used for many SAs. This is equal or
 	 *  less than 'max_cos' capability in classifier API.
@@ -902,6 +914,9 @@  typedef struct odp_ipsec_error_t {
 
 			/** Hard lifetime expired: packets */
 			uint32_t hard_exp_packets : 1;
+
+			/** TFC dummy packet (NextHeader = 59) */
+			uint32_t tfc_dummy_packet : 1;
 		};
 
 		/** All error bits