From: Dmitry Eremin-Solenikov <dmitry.ereminsoleni...@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 reset of packet parsing API.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsoleni...@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: 65d690fbcf03c6a4d5eb3f01bde36807833feaaa
 ** Merge commit sha: 5837f541514787dbed97ac3478e4967a53a5f9c2
 **/
 include/odp/api/spec/ipsec.h       |  4 ++--
 platform/linux-generic/odp_ipsec.c | 12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/odp/api/spec/ipsec.h b/include/odp/api/spec/ipsec.h
index 6f00a2c9c..4d3aeefdc 100644
--- a/include/odp/api/spec/ipsec.h
+++ b/include/odp/api/spec/ipsec.h
@@ -151,9 +151,9 @@ typedef struct odp_ipsec_inbound_config_t {
         *  resulting packet must be parsed (at least) up to this level. Parsing
         *  starts from IP (layer 3). Each successfully transformed packet has
         *  a valid value for L3 offset regardless of the parse configuration.
-        *  Default value is ODP_IPSEC_LAYER_NONE.
+        *  Default value is ODP_PROTO_LAYER_NONE.
         */
-       odp_ipsec_proto_layer_t parse;
+       odp_proto_layer_t parse;
 
        /** 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 8735e6052..3901443ec 100644
--- a/platform/linux-generic/odp_ipsec.c
+++ b/platform/linux-generic/odp_ipsec.c
@@ -200,18 +200,18 @@ static const uint8_t ipsec_padding[255] = {
        0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff,
 };
 
-static inline odp_pktio_parser_layer_t parse_layer(odp_ipsec_proto_layer_t l)
+static inline odp_pktio_parser_layer_t parse_layer(odp_proto_layer_t l)
 {
        switch (l) {
-       case ODP_IPSEC_LAYER_NONE:
+       case ODP_PROTO_LAYER_NONE:
                return ODP_PKTIO_PARSER_LAYER_NONE;
-       case ODP_IPSEC_LAYER_L2:
+       case ODP_PROTO_LAYER_L2:
                return ODP_PKTIO_PARSER_LAYER_L2;
-       case ODP_IPSEC_LAYER_L3:
+       case ODP_PROTO_LAYER_L3:
                return ODP_PKTIO_PARSER_LAYER_L3;
-       case ODP_IPSEC_LAYER_L4:
+       case ODP_PROTO_LAYER_L4:
                return ODP_PKTIO_PARSER_LAYER_L4;
-       case ODP_IPSEC_LAYER_ALL:
+       case ODP_PROTO_LAYER_ALL:
                return ODP_PKTIO_PARSER_LAYER_ALL;
        }
 

Reply via email to