[API-NEXT,v5,4/7] api: ipsec: outbound operation option flags

Message ID 1517410819-24732-5-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • [API-NEXT,v5,1/7] api: packet: add protocol type enumeration
Related show

Commit Message

Github ODP bot Jan. 31, 2018, 3 p.m.
From: Petri Savolainen <petri.savolainen@linaro.org>


Add flags to select which options application uses. Currently,
there's no ambiguity, but as soon as there are multiple options
implementation needs to know which options are used and which
are ignored.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 403 (psavol:next-ipsec-tfc)
 ** https://github.com/Linaro/odp/pull/403
 ** Patch: https://github.com/Linaro/odp/pull/403.patch
 ** Base sha: 5718327018debbb02aacb464493504c95fbe57a3
 ** Merge commit sha: a8d85f63d9e1de7ba709e84b37a06e3482bdea1d
 **/
 include/odp/api/spec/ipsec.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

Patch

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index 1060a3ee2..08533d80d 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -983,6 +983,20 @@  typedef struct odp_ipsec_op_flag_t {
  * These may be used to override some SA level options
  */
 typedef struct odp_ipsec_out_opt_t {
+	/** Union of all flag bits */
+	union {
+		/** Option flags. Set flag for those options that are
+		 *  used, all other options are ignored. */
+		struct {
+			/** Use fragmentation mode option */
+			uint32_t frag_mode: 1;
+
+		} flag;
+
+		/** All flag bits */
+		uint32_t all_flags;
+	};
+
 	/** Fragmentation mode */
 	odp_ipsec_frag_mode_t frag_mode;