diff mbox

[1/2] Uplevel example programs to ODP v1.0 APIs for odp_packet_flags.h

Message ID 1416265167-2611-1-git-send-email-bill.fischofer@linaro.org
State New
Headers show

Commit Message

Bill Fischofer Nov. 17, 2014, 10:59 p.m. UTC
This patch updates the ODP example programs to reflect the specified
odp_packet_flags.h API name changes.

Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org>
---
 example/generator/odp_generator.c | 2 +-
 example/ipsec/odp_ipsec.c         | 4 ++--
 example/ipsec/odp_ipsec_stream.c  | 4 ++--
 example/packet/odp_pktio.c        | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index ffa5e62..b630e17 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -392,7 +392,7 @@  static void print_pkts(int thr, odp_packet_t pkt_tbl[], unsigned len)
 		rlen = 0;
 
 		/* only ip pkts */
-		if (!odp_packet_inflag_ipv4(pkt))
+		if (!odp_packet_has_ipv4(pkt))
 			continue;
 
 		odp_atomic_inc_u64(&counters.ip);
diff --git a/example/ipsec/odp_ipsec.c b/example/ipsec/odp_ipsec.c
index da6c48e..908bd95 100644
--- a/example/ipsec/odp_ipsec.c
+++ b/example/ipsec/odp_ipsec.c
@@ -617,10 +617,10 @@  pkt_disposition_e do_input_verify(odp_packet_t pkt, pkt_ctx_t *ctx ODP_UNUSED)
 	if (odp_unlikely(odp_packet_error(pkt)))
 		return PKT_DROP;
 
-	if (!odp_packet_inflag_eth(pkt))
+	if (!odp_packet_has_eth(pkt))
 		return PKT_DROP;
 
-	if (!odp_packet_inflag_ipv4(pkt))
+	if (!odp_packet_has_ipv4(pkt))
 		return PKT_DROP;
 
 	return PKT_CONTINUE;
diff --git a/example/ipsec/odp_ipsec_stream.c b/example/ipsec/odp_ipsec_stream.c
index fa9aba8..f0ffe23 100644
--- a/example/ipsec/odp_ipsec_stream.c
+++ b/example/ipsec/odp_ipsec_stream.c
@@ -195,7 +195,7 @@  odp_packet_t create_ipv4_packet(stream_db_entry_t *stream,
 	data = odp_packet_data(pkt);
 
 	/* Ethernet */
-	odp_packet_set_inflag_eth(pkt, 1);
+	odp_packet_set_has_eth(pkt, 1);
 	odp_packet_set_l2_offset(pkt, data - base);
 	eth = (odph_ethhdr_t *)data;
 	data += sizeof(*eth);
@@ -205,7 +205,7 @@  odp_packet_t create_ipv4_packet(stream_db_entry_t *stream,
 	eth->type = odp_cpu_to_be_16(ODPH_ETHTYPE_IPV4);
 
 	/* IPv4 */
-	odp_packet_set_inflag_ipv4(pkt, 1);
+	odp_packet_set_has_ipv4(pkt, 1);
 	odp_packet_set_l3_offset(pkt, data - base);
 	ip = (odph_ipv4hdr_t *)data;
 	data += sizeof(*ip);
diff --git a/example/packet/odp_pktio.c b/example/packet/odp_pktio.c
index 2cf3f0d..afa2ac7 100644
--- a/example/packet/odp_pktio.c
+++ b/example/packet/odp_pktio.c
@@ -455,14 +455,14 @@  static void swap_pkt_addrs(odp_packet_t pkt_tbl[], unsigned len)
 
 	for (i = 0; i < len; ++i) {
 		pkt = pkt_tbl[i];
-		if (odp_packet_inflag_eth(pkt)) {
+		if (odp_packet_has_eth(pkt)) {
 			eth = (odph_ethhdr_t *)odp_packet_l2(pkt);
 
 			tmp_addr = eth->dst;
 			eth->dst = eth->src;
 			eth->src = tmp_addr;
 
-			if (odp_packet_inflag_ipv4(pkt)) {
+			if (odp_packet_has_ipv4(pkt)) {
 				/* IPv4 */
 				ip = (odph_ipv4hdr_t *)odp_packet_l3(pkt);