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

Message ID 1515430837-17818-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • IPsec TFC packets/padding support
Related show

Commit Message

Github ODP bot Jan. 8, 2018, 5 p.m.
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 implementation tells
to the application if it delivers or drop such packets via
tfc_dummy_packets_drop capability.

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: 6303c7d0e98fafe0f14c8c4dd9989b3b7633ebf4
 ** Merge commit sha: 52e02806dd3cade37d6594389c800c0f3610a267
 **/
 include/odp/api/spec/ipsec.h | 8 ++++++++
 1 file changed, 8 insertions(+)

Patch

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index 3728e2e26..696a59b7a 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -242,6 +242,11 @@  typedef struct odp_ipsec_capability_t {
 	 *  packets in ESP tunnel mode */
 	odp_bool_t tfc_padding_truncate;
 
+	/** In INLINE mode drop TFC dummy packets (NH=59) instead of reporting
+	 *  them via tfc_dummy_packet error bit.
+	 */
+	odp_bool_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 +907,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