[API-NEXT,v3,9/14] example: switch to using odp_packet_l4_type_set()

Message ID 1518008409-31750-10-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • Packet L3/L4 type implementation and API extension
Related show

Commit Message

Github ODP bot Feb. 7, 2018, 1 p.m.
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Use odp_packet_l4_type_set() instead of calling odp_packet_has_*_set().

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

---
/** Email created from pull request 457 (lumag:packet-types)
 ** https://github.com/Linaro/odp/pull/457
 ** Patch: https://github.com/Linaro/odp/pull/457.patch
 ** Base sha: e1175d5a69c65bb465022c9f1381c40fdb5c4069
 ** Merge commit sha: 86fcf3650d33f5dd82712dda131fb8ca66a3bdf8
 **/
 example/generator/odp_generator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c
index c34457643..3d61e025f 100644
--- a/example/generator/odp_generator.c
+++ b/example/generator/odp_generator.c
@@ -338,7 +338,7 @@  static odp_packet_t setup_udp_pkt_ref(odp_pool_t pool,
 
 	/* udp */
 	odp_packet_l4_offset_set(pkt, ODPH_ETHHDR_LEN + ODPH_IPV4HDR_LEN);
-	odp_packet_has_udp_set(pkt, 1);
+	odp_packet_l4_type_set(pkt, ODP_PROTO_L4_TYPE_UDP);
 	udp = (odph_udphdr_t *)(buf + ODPH_ETHHDR_LEN + ODPH_IPV4HDR_LEN);
 	udp->src_port = odp_cpu_to_be_16(args->appl.srcport);
 	udp->dst_port = odp_cpu_to_be_16(args->appl.dstport);