diff mbox series

[API-NEXT,v3,2/5] linux-gen: adapt to odp_pktio_parser_layer_t removal

Message ID 1513702859-14312-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v3,1/5] api: pktio: start switching to using odp_proto_layer_t | expand

Commit Message

Github ODP bot Dec. 19, 2017, 5 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


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

---
/** Email created from pull request 338 (lumag:pktio_parse_layer)
 ** https://github.com/Linaro/odp/pull/338
 ** Patch: https://github.com/Linaro/odp/pull/338.patch
 ** Base sha: 12fd3a9224a856271934986a1bad981843915d68
 ** Merge commit sha: f11c958e9552610bd1305f996e17c6b79a209a7e
 **/
 platform/linux-generic/include/odp_packet_internal.h |  4 ++--
 platform/linux-generic/odp_classification.c          |  2 +-
 platform/linux-generic/odp_packet.c                  | 10 +++++-----
 platform/linux-generic/odp_packet_io.c               |  4 ++--
 4 files changed, 10 insertions(+), 10 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/include/odp_packet_internal.h b/platform/linux-generic/include/odp_packet_internal.h
index 0f661679e..346c2dc6f 100644
--- a/platform/linux-generic/include/odp_packet_internal.h
+++ b/platform/linux-generic/include/odp_packet_internal.h
@@ -296,11 +296,11 @@  int packet_alloc_multi(odp_pool_t pool_hdl, uint32_t len,
 
 /* Perform packet parse up to a given protocol layer */
 int packet_parse_layer(odp_packet_hdr_t *pkt_hdr,
-		       odp_pktio_parser_layer_t layer);
+		       odp_proto_layer_t layer);
 
 /* Perform L3 and L4 parsing up to a given protocol layer */
 int packet_parse_l3_l4(odp_packet_hdr_t *pkt_hdr,
-		       odp_pktio_parser_layer_t layer,
+		       odp_proto_layer_t layer,
 		       uint32_t l3_offset,
 		       uint16_t ethtype);
 
diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c
index 025f12593..276430923 100644
--- a/platform/linux-generic/odp_classification.c
+++ b/platform/linux-generic/odp_classification.c
@@ -973,7 +973,7 @@  int cls_classify_packet(pktio_entry_t *entry, const uint8_t *base,
 	packet_set_len(pkt_hdr, pkt_len);
 
 	packet_parse_common(&pkt_hdr->p, base, pkt_len, seg_len,
-			    ODP_PKTIO_PARSER_LAYER_ALL);
+			    ODP_PROTO_LAYER_ALL);
 	cos = cls_select_cos(entry, base, pkt_hdr);
 
 	if (cos == NULL)
diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c
index cf76df72c..72d1ca625 100644
--- a/platform/linux-generic/odp_packet.c
+++ b/platform/linux-generic/odp_packet.c
@@ -2211,7 +2211,7 @@  int packet_parse_common_l3_l4(packet_parser_t *prs, const uint8_t *parseptr,
 
 	prs->l3_offset = offset;
 
-	if (layer <= ODP_PKTIO_PARSER_LAYER_L2)
+	if (layer <= ODP_PROTO_LAYER_L2)
 		return prs->error_flags.all != 0;
 
 	/* Set l3 flag only for known ethtypes */
@@ -2242,7 +2242,7 @@  int packet_parse_common_l3_l4(packet_parser_t *prs, const uint8_t *parseptr,
 		ip_proto = 255;  /* Reserved invalid by IANA */
 	}
 
-	if (layer == ODP_PKTIO_PARSER_LAYER_L3)
+	if (layer == ODP_PROTO_LAYER_L3)
 		return prs->error_flags.all != 0;
 
 	/* Set l4 flag only for known ip_proto */
@@ -2314,7 +2314,7 @@  int packet_parse_common(packet_parser_t *prs, const uint8_t *ptr,
 	parseptr = ptr;
 	offset = 0;
 
-	if (layer == ODP_PKTIO_PARSER_LAYER_NONE)
+	if (layer == ODP_PROTO_LAYER_NONE)
 		return 0;
 
 	/* Assume valid L2 header, no CRC/FCS check in SW */
@@ -2333,7 +2333,7 @@  int packet_parse_common(packet_parser_t *prs, const uint8_t *ptr,
  * Simple packet parser
  */
 int packet_parse_layer(odp_packet_hdr_t *pkt_hdr,
-		       odp_pktio_parser_layer_t layer)
+		       odp_proto_layer_t layer)
 {
 	uint32_t seg_len = packet_first_seg_len(pkt_hdr);
 	void *base = packet_data(pkt_hdr);
@@ -2343,7 +2343,7 @@  int packet_parse_layer(odp_packet_hdr_t *pkt_hdr,
 }
 
 int packet_parse_l3_l4(odp_packet_hdr_t *pkt_hdr,
-		       odp_pktio_parser_layer_t layer,
+		       odp_proto_layer_t layer,
 		       uint32_t l3_offset,
 		       uint16_t ethtype)
 {
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index aa6cdb068..ffbc73b26 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -998,7 +998,7 @@  void odp_pktio_config_init(odp_pktio_config_t *config)
 {
 	memset(config, 0, sizeof(odp_pktio_config_t));
 
-	config->parser.layer = ODP_PKTIO_PARSER_LAYER_ALL;
+	config->parser.layer = ODP_PROTO_LAYER_ALL;
 }
 
 int odp_pktio_info(odp_pktio_t hdl, odp_pktio_info_t *info)
@@ -1203,7 +1203,7 @@  int odp_pktio_capability(odp_pktio_t pktio, odp_pktio_capability_t *capa)
 
 	/* The same parser is used for all pktios */
 	if (ret == 0)
-		capa->config.parser.layer = ODP_PKTIO_PARSER_LAYER_ALL;
+		capa->config.parser.layer = ODP_PROTO_LAYER_ALL;
 
 	return ret;
 }