diff mbox series

[API-NEXT,v7,1/2] api: ipsec: use odp_proto_layer_t for parse layer spec

Message ID 1513328418-26052-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v7,1/2] api: ipsec: use odp_proto_layer_t for parse layer spec | expand

Commit Message

Github ODP bot Dec. 15, 2017, 9 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Usign odp_proto_layer_t for parse layer spec is more logical, as it is
the same enum that is used for the rest of packet parsing API.

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

---
/** Email created from pull request 336 (lumag:ipsec-proto-layer)
 ** https://github.com/Linaro/odp/pull/336
 ** Patch: https://github.com/Linaro/odp/pull/336.patch
 ** Base sha: 0588040068a50d0d15a641d091fce23214b15594
 ** Merge commit sha: 360d1f4862344412fc832e1d28e6fd4ee0c8e834
 **/
 include/odp/api/spec/ipsec.h       | 4 ++--
 platform/linux-generic/odp_ipsec.c | 2 +-
 test/validation/api/ipsec/ipsec.c  | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index 538472a5e..c67954689 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -156,9 +156,9 @@  typedef struct odp_ipsec_inbound_config_t {
 	 *
 	 *  Each successfully transformed packet has a valid value for L3 offset
 	 *  regardless of the parse configuration. Default value is
-	 *  ODP_IPSEC_LAYER_NONE. ODP_IPSEC_LAYER_L2 is not a valid value.
+	 *  ODP_PROTO_LAYER_NONE. ODP_PROTO_LAYER_L2 is not a valid value.
 	 */
-	odp_ipsec_proto_layer_t parse;
+	odp_proto_layer_t parse_level;
 
 	/** Flags to control IPSEC payload data checks up to the selected parse
 	 *  level. Checksum checking status can be queried for each packet with
diff --git a/platform/linux-generic/odp_ipsec.c b/platform/linux-generic/odp_ipsec.c
index 4f23eb17b..f40cd5e64 100644
--- a/platform/linux-generic/odp_ipsec.c
+++ b/platform/linux-generic/odp_ipsec.c
@@ -756,7 +756,7 @@  static ipsec_sa_t *ipsec_in_single(odp_packet_t pkt,
 	parse_param.proto = state.is_ipv4 ?
 				ODP_PROTO_IPV4 :
 				ODP_PROTO_IPV6;
-	parse_param.last_layer = (odp_proto_layer_t)ipsec_config.inbound.parse;
+	parse_param.last_layer = ipsec_config.inbound.parse_level;
 	parse_param.chksums = ipsec_config.inbound.chksums;
 
 	/* We do not care about return code here.
diff --git a/test/validation/api/ipsec/ipsec.c b/test/validation/api/ipsec/ipsec.c
index 097216730..4d17c4b9e 100644
--- a/test/validation/api/ipsec/ipsec.c
+++ b/test/validation/api/ipsec/ipsec.c
@@ -904,7 +904,7 @@  int ipsec_config(odp_instance_t ODP_UNUSED inst)
 	ipsec_config.inbound_mode = suite_context.inbound_op_mode;
 	ipsec_config.outbound_mode = suite_context.outbound_op_mode;
 	ipsec_config.inbound.default_queue = suite_context.queue;
-	ipsec_config.inbound.parse = ODP_IPSEC_LAYER_ALL;
+	ipsec_config.inbound.parse_level = ODP_PROTO_LAYER_ALL;
 
 	if (ODP_IPSEC_OK != odp_ipsec_config(&ipsec_config))
 		return -1;