From patchwork Wed Jan 10 19:00:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 124128 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5634156qgn; Wed, 10 Jan 2018 11:00:27 -0800 (PST) X-Google-Smtp-Source: ACJfBovu1oskSaOoBfq/GxIgBCBQU1gmF/5e910pn/YtdNJn33wtKZ8FJQqwODrajsR3IydfudCv X-Received: by 10.200.42.50 with SMTP id k47mr28813418qtk.150.1515610827771; Wed, 10 Jan 2018 11:00:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515610827; cv=none; d=google.com; s=arc-20160816; b=RhvOxZKvqNWJ+EAz/Ha2o5beZiw0plPZy2Sx1jjtVv3v1Q1nQHMOvOei1GX0WDK2hK eQSkqrKiHXGgbt2XkZOMzgB9b4JUhI8l568tLQRqTH19j1ftQAJlv1aglTKDUdZK7EU+ SbqG1am+In+Jh+sUq4hzCfNrLzogVNXa3MaPYfxq/oIF2J0dtkACitedzLFjcsiWAb0k UcU/AaKaPaH3yfqu/Cf9FtF9y+8e1//krwkd0hqFkcXXtV/lDdHEl3I6IjOIQH9xmM1S Xb6dpZ5rl9UeqxFm5ryvJM8+TL9HBYhvHfjCwn9NSx21vVT8CFbbDfI6Fh3PNgoT1Z+7 5BXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=NrmMQ75E+pWez2weYUkFo/vlwgJYc2dCj5nebiHUhqQ=; b=EUeYNL5fOd+gM+6LmpDGZgFsNGPevkOuRBpTeNyuNLCmsoP+dTItCpnB5AfIzrn24m 0UUHgF7xIC/xiVGvdXPKy3CiV1Q0SwxhGHBoXdwHz61MYYSOTb8K1hGNJLiVYhqdXyIQ A6uy1je/KwyQ5bRE+24AMyBOIk1y1l4tS1ZAQQ4mMoNWjjeKUP/7bw5iIqd5MACyvlXJ yqzUnT/I1n5jMiWa1sAHxDhC5PUhf+HRUohO8MedcRa3H/iMmN0SrlvKdFPLAqUNpxaQ CXJGmtd1oAZiHcRm/N9i35MF6530LeKJw/b/ogrBoS3/8wGBilIVaHi5PavloVMhP/Yc fRDw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id 73si1185048qka.446.2018.01.10.11.00.26; Wed, 10 Jan 2018 11:00:27 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 8381561703; Wed, 10 Jan 2018 19:00:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 26A4C61511; Wed, 10 Jan 2018 19:00:19 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 008966151B; Wed, 10 Jan 2018 19:00:14 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id D7FBD6150C for ; Wed, 10 Jan 2018 19:00:11 +0000 (UTC) Received: from mxback1g.mail.yandex.net (mxback1g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:162]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 8194E185113 for ; Wed, 10 Jan 2018 22:00:10 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback1g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id Nv7h9rJRJj-0AMiUWBH; Wed, 10 Jan 2018 22:00:10 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id pe1nemgttC-09QW24JX; Wed, 10 Jan 2018 22:00:10 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 10 Jan 2018 22:00:07 +0300 Message-Id: <1515610808-27519-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515610808-27519-1-git-send-email-odpbot@yandex.ru> References: <1515610808-27519-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 386 Subject: [lng-odp] [PATCH API-NEXT v2 1/2] linux-generic: remove camelcase from icmp protocol X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Bill Fischofer Change ODP_IPPROTO_ICMPv4 and ODP_IPPROTO_ICMPv6 to ODP_IPPROTO_ICMPV4 and ODP_IPPROTO_ICMPV6 to eliminate camelcase issues in ODP code. Signed-off-by: Bill Fischofer --- /** Email created from pull request 386 (Bill-Fischofer-Linaro:icmp-camelcase) ** https://github.com/Linaro/odp/pull/386 ** Patch: https://github.com/Linaro/odp/pull/386.patch ** Base sha: 6303c7d0e98fafe0f14c8c4dd9989b3b7633ebf4 ** Merge commit sha: ae40d82e299c9127862e2432fde9301f44537377 **/ platform/linux-generic/include/protocols/ip.h | 4 ++-- platform/linux-generic/odp_packet.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/linux-generic/include/protocols/ip.h b/platform/linux-generic/include/protocols/ip.h index 7b6b736a6..e92a38993 100644 --- a/platform/linux-generic/include/protocols/ip.h +++ b/platform/linux-generic/include/protocols/ip.h @@ -157,7 +157,7 @@ typedef struct ODP_PACKED { * IP protocol values (IPv4:'proto' or IPv6:'next_hdr') * @{*/ #define _ODP_IPPROTO_HOPOPTS 0x00 /**< IPv6 hop-by-hop options */ -#define _ODP_IPPROTO_ICMPv4 0x01 /**< Internet Control Message Protocol (1) */ +#define _ODP_IPPROTO_ICMPV4 0x01 /**< Internet Control Message Protocol (1) */ #define _ODP_IPPROTO_IPIP 0x04 /**< IP Encapsulation within IP (4) */ #define _ODP_IPPROTO_TCP 0x06 /**< Transmission Control Protocol (6) */ #define _ODP_IPPROTO_UDP 0x11 /**< User Datagram Protocol (17) */ @@ -166,7 +166,7 @@ typedef struct ODP_PACKED { #define _ODP_IPPROTO_FRAG 0x2C /**< IPv6 Fragment (44) */ #define _ODP_IPPROTO_AH 0x33 /**< Authentication Header (51) */ #define _ODP_IPPROTO_ESP 0x32 /**< Encapsulating Security Payload (50) */ -#define _ODP_IPPROTO_ICMPv6 0x3A /**< Internet Control Message Protocol (58) */ +#define _ODP_IPPROTO_ICMPV6 0x3A /**< Internet Control Message Protocol (58) */ #define _ODP_IPPROTO_DEST 0x3C /**< IPv6 Destination header (60) */ #define _ODP_IPPROTO_SCTP 0x84 /**< Stream Control Transmission protocol (132) */ diff --git a/platform/linux-generic/odp_packet.c b/platform/linux-generic/odp_packet.c index 83a880947..a812fec15 100644 --- a/platform/linux-generic/odp_packet.c +++ b/platform/linux-generic/odp_packet.c @@ -2220,10 +2220,10 @@ int packet_parse_common_l3_l4(packet_parser_t *prs, const uint8_t *parseptr, /* Parse Layer 4 headers */ switch (ip_proto) { - case _ODP_IPPROTO_ICMPv4: + case _ODP_IPPROTO_ICMPV4: /* Fall through */ - case _ODP_IPPROTO_ICMPv6: + case _ODP_IPPROTO_ICMPV6: prs->input_flags.icmp = 1; break; From patchwork Wed Jan 10 19:00:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 124129 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp5635151qgn; Wed, 10 Jan 2018 11:01:08 -0800 (PST) X-Google-Smtp-Source: ACJfBovLvhLNR3EFiMWq4iA3gptCziHd2yvs7bV93yGisJdZbI6mNJKpMYCL6/lfNI9ucrlQEPs6 X-Received: by 10.37.116.21 with SMTP id p21mr10485411ybc.108.1515610867799; Wed, 10 Jan 2018 11:01:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515610867; cv=none; d=google.com; s=arc-20160816; b=gRsl3UYnQs1Auf1UGYOzq2VEfMjZWwrV06mYQHFS6SmD7nAADtv2Vjxdh2lPOfUPBx vEhcAW+jjVWYsoRoeA8M8JtGgY3gSUQwKRoJ4q05zaeDGfPku/7tb6fO5lx4q7F0gQgd 8FGKocRE2KODQ9y+Xf7oLZgmJ7xskqVV7MIfaanrcERp0VFBCrJ18tvjOkhWCbt4Lim5 ooeilwHKHT/Vfsr1o9bCtfHotjZrSIsjiJ98SxAI6QysnVjPXA6YpXJCIGLX4dSGb6Hp JASdkkLPoK04POZmUCJaJZgZcrN0uHqtzTn4nW00oLTZUCqw9KNu1PmGiDWmcwhe2IBi SQZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=ZVxYLVLLhKIFNs4dt456XHTIuLVkypeM5iHZLKWiAGg=; b=RRQeiySRBr4eivFn3bbazyt7OOm87noC6Z8TMezcYj0i8+U27SK3w0z+PHVougF4BH S2W7X48K+aje/8OugAcpCDv7CAHrZG94jjkreUy3mjq7uAlJlp9ZprCT1Ky4F3CKdQJO wxtXQW2M5HZlJ1V0l5ckoUX2qFCOB6ku1Me6QLE6dbkGDsumGY/Cgn5BMjOb55E6aC3C e4Fe6oIrWapP1va03ybtyYwyXgqxpITFwbMaJ1EFywgmqdfehrZCLaFtYQEOGP5zCXvX Uq81THFIgoVlzCGUNw1gH6o2DuyOHMDi76Cvc92lrobQWKpA7PNqFczsm/BjKyL0MrkW hWqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id h129si15458qkc.112.2018.01.10.11.01.07; Wed, 10 Jan 2018 11:01:07 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 7FFD361732; Wed, 10 Jan 2018 19:01:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 6D846616DE; Wed, 10 Jan 2018 19:00:24 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 282EF6150C; Wed, 10 Jan 2018 19:00:15 +0000 (UTC) Received: from forward105p.mail.yandex.net (forward105p.mail.yandex.net [77.88.28.108]) by lists.linaro.org (Postfix) with ESMTPS id 5BE8161511 for ; Wed, 10 Jan 2018 19:00:12 +0000 (UTC) Received: from mxback12g.mail.yandex.net (mxback12g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:91]) by forward105p.mail.yandex.net (Yandex) with ESMTP id 0AFDC408439D for ; Wed, 10 Jan 2018 22:00:11 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback12g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id zIYQE5oQli-0AXKOpW8; Wed, 10 Jan 2018 22:00:11 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id pe1nemgttC-0AQimKmR; Wed, 10 Jan 2018 22:00:10 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Wed, 10 Jan 2018 22:00:08 +0300 Message-Id: <1515610808-27519-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515610808-27519-1-git-send-email-odpbot@yandex.ru> References: <1515610808-27519-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 386 Subject: [lng-odp] [PATCH API-NEXT v2 2/2] helper: remove camelcase from icmp protocol X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Bill Fischofer Change ODPH_IPPROTO_ICMPv4 and ODPH_IPPROTO_ICMPv6 to ODPH_IPPROTO_ICMPV4 and ODPH_PROTO_ICMPV6 to eliminate camelcase issues in ODP examples. Signed-off-by: Bill Fischofer --- /** Email created from pull request 386 (Bill-Fischofer-Linaro:icmp-camelcase) ** https://github.com/Linaro/odp/pull/386 ** Patch: https://github.com/Linaro/odp/pull/386.patch ** Base sha: 6303c7d0e98fafe0f14c8c4dd9989b3b7633ebf4 ** Merge commit sha: ae40d82e299c9127862e2432fde9301f44537377 **/ example/generator/odp_generator.c | 4 ++-- example/ipsec/odp_ipsec_stream.c | 6 +++--- helper/include/odp/helper/ip.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/example/generator/odp_generator.c b/example/generator/odp_generator.c index b1827e9c9..0fc4c9ccd 100644 --- a/example/generator/odp_generator.c +++ b/example/generator/odp_generator.c @@ -426,7 +426,7 @@ static odp_packet_t setup_icmp_pkt_ref(odp_pool_t pool, ip->ttl = 64; ip->tot_len = odp_cpu_to_be_16(args->appl.payload + ODPH_ICMPHDR_LEN + ODPH_IPV4HDR_LEN); - ip->proto = ODPH_IPPROTO_ICMPv4; + ip->proto = ODPH_IPPROTO_ICMPV4; ip->id = 0; ip->chksum = 0; @@ -806,7 +806,7 @@ static void print_pkts(int thr, thread_args_t *thr_args, thr_args->counters.ctr_udp_rcv++; /* icmp */ - if (ip->proto == ODPH_IPPROTO_ICMPv4) { + if (ip->proto == ODPH_IPPROTO_ICMPV4) { icmp = (odph_icmphdr_t *)(buf + offset); process_icmp_pkt(thr_args, icmp, msg); diff --git a/example/ipsec/odp_ipsec_stream.c b/example/ipsec/odp_ipsec_stream.c index c287282e8..3773ce525 100644 --- a/example/ipsec/odp_ipsec_stream.c +++ b/example/ipsec/odp_ipsec_stream.c @@ -217,7 +217,7 @@ odp_packet_t create_ipv4_packet(stream_db_entry_t *stream, ip->src_addr = odp_cpu_to_be_32(entry->tun_src_ip); ip->dst_addr = odp_cpu_to_be_32(entry->tun_dst_ip); } else { - ip->proto = ODPH_IPPROTO_ICMPv4; + ip->proto = ODPH_IPPROTO_ICMPV4; ip->src_addr = odp_cpu_to_be_32(stream->src_ip); ip->dst_addr = odp_cpu_to_be_32(stream->dst_ip); } @@ -260,7 +260,7 @@ odp_packet_t create_ipv4_packet(stream_db_entry_t *stream, inner_ip = (odph_ipv4hdr_t *)data; memset((char *)inner_ip, 0, sizeof(*inner_ip)); inner_ip->ver_ihl = 0x45; - inner_ip->proto = ODPH_IPPROTO_ICMPv4; + inner_ip->proto = ODPH_IPPROTO_ICMPV4; inner_ip->id = odp_cpu_to_be_16(stream->id); inner_ip->ttl = 64; inner_ip->tos = 0; @@ -518,7 +518,7 @@ odp_bool_t verify_ipv4_packet(stream_db_entry_t *stream, icmp = (odph_icmphdr_t *)(inner_ip + 1); data = (uint8_t *)icmp; } else { - if (ODPH_IPPROTO_ICMPv4 != ip->proto) + if (ODPH_IPPROTO_ICMPV4 != ip->proto) return FALSE; icmp = (odph_icmphdr_t *)data; } diff --git a/helper/include/odp/helper/ip.h b/helper/include/odp/helper/ip.h index b96aab280..7ef8dbc3d 100644 --- a/helper/include/odp/helper/ip.h +++ b/helper/include/odp/helper/ip.h @@ -251,14 +251,14 @@ typedef struct ODP_PACKED { * IP protocol values (IPv4:'proto' or IPv6:'next_hdr') * @{*/ #define ODPH_IPPROTO_HOPOPTS 0x00 /**< IPv6 hop-by-hop options */ -#define ODPH_IPPROTO_ICMPv4 0x01 /**< Internet Control Message Protocol (1) */ +#define ODPH_IPPROTO_ICMPV4 0x01 /**< Internet Control Message Protocol (1) */ #define ODPH_IPPROTO_TCP 0x06 /**< Transmission Control Protocol (6) */ #define ODPH_IPPROTO_UDP 0x11 /**< User Datagram Protocol (17) */ #define ODPH_IPPROTO_ROUTE 0x2B /**< IPv6 Routing header (43) */ #define ODPH_IPPROTO_FRAG 0x2C /**< IPv6 Fragment (44) */ #define ODPH_IPPROTO_AH 0x33 /**< Authentication Header (51) */ #define ODPH_IPPROTO_ESP 0x32 /**< Encapsulating Security Payload (50) */ -#define ODPH_IPPROTO_ICMPv6 0x3A /**< Internet Control Message Protocol (58) */ +#define ODPH_IPPROTO_ICMPV6 0x3A /**< Internet Control Message Protocol (58) */ #define ODPH_IPPROTO_INVALID 0xFF /**< Reserved invalid by IANA */ /**@}*/