diff mbox series

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

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

Commit Message

Github ODP bot Dec. 21, 2017, 5:01 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: c38fc105f0e9a88dd4ebb4d9e7ac9e1160466322
 ** Merge commit sha: d554b8508bc74d27b4459a1d4cbb3cd84fc1f1eb
 **/
 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 3e11e09f1..e20935c02 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -167,6 +167,13 @@  typedef struct odp_ipsec_inbound_config_t {
 	 */
 	odp_proto_chksums_t chksums;
 
+	/** Drop dummy packets (NH=59) instead of reporting it via
+	 *  @dummy_packet error bit.
+	 *
+	 *  @see dummy_packets_drop
+	 */
+	odp_bool_t dummy_packets_drop;
+
 } odp_ipsec_inbound_config_t;
 
 /**
@@ -263,6 +270,11 @@  typedef struct odp_ipsec_capability_t {
 	 *  packets */
 	odp_bool tfc_padding_truncate;
 
+	/**
+	 * Support dropping dummy packets
+	 */
+	odp_support_t 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.
@@ -905,6 +917,9 @@  typedef struct odp_ipsec_error_t {
 
 			/** Hard lifetime expired: packets */
 			uint32_t hard_exp_packets : 1;
+
+			/** TFC dummy packet (NextHeader = 59) */
+			uint32_t dummy_packet     : 1;
 		};
 
 		/** All error bits