* [dpdk-dev] [PATCH 1/5] test/table: remove duplicate macro
@ 2019-05-29 11:29 David Marchand
2019-05-29 11:29 ` [dpdk-dev] [PATCH 2/5] net/tap: revert changes on rte_ prefixing David Marchand
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: David Marchand @ 2019-05-29 11:29 UTC (permalink / raw)
To: dev
Cc: ferruh.yigit, thomas, olivier.matz, maxime.coquelin, stephen,
Cristian Dumitrescu
No need for this macro here, take it from librte_net.
Fixes: 24ac604ef746 ("net: add rte prefix to IP defines")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
app/test/test_table_acl.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/app/test/test_table_acl.c b/app/test/test_table_acl.c
index e01e1f9..cb039c0 100644
--- a/app/test/test_table_acl.c
+++ b/app/test/test_table_acl.c
@@ -2,16 +2,12 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include <rte_ip.h>
#include <rte_string_fns.h>
#include <rte_hexdump.h>
#include "test_table.h"
#include "test_table_acl.h"
-#define RTE_IPv4(a, b, c, d) ((uint32_t)(((a) & 0xff) << 24) | \
- (((b) & 0xff) << 16) | \
- (((c) & 0xff) << 8) | \
- ((d) & 0xff))
-
/*
* Rule and trace formats definitions.
**/
--
1.8.3.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH 2/5] net/tap: revert changes on rte_ prefixing
2019-05-29 11:29 [dpdk-dev] [PATCH 1/5] test/table: remove duplicate macro David Marchand
@ 2019-05-29 11:29 ` David Marchand
2019-05-29 13:36 ` Wiles, Keith
2019-05-29 14:26 ` Olivier Matz
2019-05-29 11:29 ` [dpdk-dev] [PATCH 3/5] replace RTE_IPv4 with uppercase RTE_IPV4 David Marchand
` (3 subsequent siblings)
4 siblings, 2 replies; 13+ messages in thread
From: David Marchand @ 2019-05-29 11:29 UTC (permalink / raw)
To: dev
Cc: ferruh.yigit, thomas, olivier.matz, maxime.coquelin, stephen,
Keith Wiles
This source is compiled as a bpf program out of dpdk.
Revert to structures/macros coming from libc.
Fixes: 6d13ea8e8e49 ("net: add rte prefix to ether structures")
Fixes: 24ac604ef746 ("net: add rte prefix to IP defines")
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/tap/tap_bpf_program.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/tap/tap_bpf_program.c b/drivers/net/tap/tap_bpf_program.c
index 531569b..532e883 100644
--- a/drivers/net/tap/tap_bpf_program.c
+++ b/drivers/net/tap/tap_bpf_program.c
@@ -19,7 +19,7 @@
#include "tap_rss.h"
/** Create IPv4 address */
-#define RTE_IPv4(a, b, c, d) ((__u32)(((a) & 0xff) << 24) | \
+#define IPv4(a, b, c, d) ((__u32)(((a) & 0xff) << 24) | \
(((b) & 0xff) << 16) | \
(((c) & 0xff) << 8) | \
((d) & 0xff))
@@ -37,7 +37,7 @@
#define KEY_IDX 0
#define BPF_MAP_ID_KEY 1
-struct rte_vlan_hdr {
+struct vlan_hdr {
__be16 proto;
__be16 tci;
};
@@ -141,12 +141,12 @@ static int __attribute__((always_inline))
/* Get correct proto for 802.1ad */
if (skb->vlan_present && skb->vlan_proto == htons(ETH_P_8021AD)) {
- if (data + ETH_ALEN * 2 + sizeof(struct rte_vlan_hdr) +
+ if (data + ETH_ALEN * 2 + sizeof(struct vlan_hdr) +
sizeof(proto) > data_end)
return TC_ACT_OK;
proto = *(__u16 *)(data + ETH_ALEN * 2 +
- sizeof(struct rte_vlan_hdr));
- off += sizeof(struct rte_vlan_hdr);
+ sizeof(struct vlan_hdr));
+ off += sizeof(struct vlan_hdr);
}
if (proto == htons(ETH_P_IP)) {
@@ -157,11 +157,11 @@ static int __attribute__((always_inline))
__u8 *src_dst_addr = data + off + offsetof(struct iphdr, saddr);
__u8 *src_dst_port = data + off + sizeof(struct iphdr);
struct ipv4_l3_l4_tuple v4_tuple = {
- .src_addr = RTE_IPv4(*(src_dst_addr + 0),
+ .src_addr = IPv4(*(src_dst_addr + 0),
*(src_dst_addr + 1),
*(src_dst_addr + 2),
*(src_dst_addr + 3)),
- .dst_addr = RTE_IPv4(*(src_dst_addr + 4),
+ .dst_addr = IPv4(*(src_dst_addr + 4),
*(src_dst_addr + 5),
*(src_dst_addr + 6),
*(src_dst_addr + 7)),
--
1.8.3.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH 3/5] replace RTE_IPv4 with uppercase RTE_IPV4
2019-05-29 11:29 [dpdk-dev] [PATCH 1/5] test/table: remove duplicate macro David Marchand
2019-05-29 11:29 ` [dpdk-dev] [PATCH 2/5] net/tap: revert changes on rte_ prefixing David Marchand
@ 2019-05-29 11:29 ` David Marchand
2019-05-29 14:26 ` Olivier Matz
2019-05-29 11:29 ` [dpdk-dev] [PATCH 4/5] replace RTE_ETHER_TYPE_IPv4 with uppercase RTE_ETHER_TYPE_IPV4 David Marchand
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: David Marchand @ 2019-05-29 11:29 UTC (permalink / raw)
To: dev
Cc: ferruh.yigit, thomas, olivier.matz, maxime.coquelin, stephen,
Konstantin Ananyev, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger,
Byron Marohn, Pablo de Lara Guarch, Yipeng Wang, Sameh Gobriel,
Bruce Richardson, Chas Williams, Vladimir Medvedkin,
Cristian Dumitrescu, John McNamara, Marko Kovacevic, Ori Kam,
Radu Nicolau, Akhil Goyal, Tomasz Kantecki, David Hunt,
Harry van Haaren, Xiaoyun Li
Since we change this macro, we might as well avoid triggering complaints
from checkpatch because of mixed case.
old=RTE_IPv4
new=RTE_IPV4
git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
app/test-acl/main.c | 2 +-
app/test-pmd/flowgen.c | 4 +-
app/test-pmd/testpmd.c | 8 +-
app/test/test_acl.c | 8 +-
app/test/test_acl.h | 122 ++++++++++-----------
app/test/test_efd.c | 20 ++--
app/test/test_flow_classify.c | 8 +-
app/test/test_hash.c | 20 ++--
app/test/test_ipsec.c | 4 +-
app/test/test_link_bonding_mode4.c | 4 +-
app/test/test_lpm.c | 76 ++++++-------
app/test/test_lpm_perf.c | 10 +-
app/test/test_member.c | 20 ++--
app/test/test_sched.c | 2 +-
app/test/test_table_acl.c | 6 +-
app/test/test_thash.c | 10 +-
.../prog_guide/packet_classif_access_ctrl.rst | 6 +-
doc/guides/sample_app_ug/ip_frag.rst | 16 +--
doc/guides/sample_app_ug/ip_reassembly.rst | 16 +--
examples/flow_classify/flow_classify.c | 2 +-
examples/ip_fragmentation/main.c | 16 +--
examples/ip_reassembly/main.c | 16 +--
examples/ipsec-secgw/sa.c | 2 +-
examples/ipv4_multicast/main.c | 30 ++---
examples/l3fwd-acl/main.c | 2 +-
examples/l3fwd-power/main.c | 24 ++--
examples/l3fwd-vf/main.c | 24 ++--
examples/l3fwd/l3fwd_em.c | 16 +--
examples/l3fwd/l3fwd_lpm.c | 16 +--
examples/performance-thread/l3fwd-thread/main.c | 32 +++---
lib/librte_net/rte_ip.h | 6 +-
31 files changed, 274 insertions(+), 274 deletions(-)
diff --git a/app/test-acl/main.c b/app/test-acl/main.c
index eb62943..57f2394 100644
--- a/app/test-acl/main.c
+++ b/app/test-acl/main.c
@@ -625,7 +625,7 @@ enum {
GET_CB_FIELD(in, d, 0, UINT8_MAX, '/');
GET_CB_FIELD(in, m, 0, sizeof(uint32_t) * CHAR_BIT, 0);
- addr[0] = RTE_IPv4(a, b, c, d);
+ addr[0] = RTE_IPV4(a, b, c, d);
mask_len[0] = m;
return 0;
diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index a970a27..1e424a1 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -72,8 +72,8 @@
/* hardcoded configuration (for now) */
static unsigned cfg_n_flows = 1024;
-static uint32_t cfg_ip_src = RTE_IPv4(10, 254, 0, 0);
-static uint32_t cfg_ip_dst = RTE_IPv4(10, 253, 0, 0);
+static uint32_t cfg_ip_src = RTE_IPV4(10, 254, 0, 0);
+static uint32_t cfg_ip_dst = RTE_IPV4(10, 253, 0, 0);
static uint16_t cfg_udp_src = 1000;
static uint16_t cfg_udp_dst = 1001;
static struct rte_ether_addr cfg_ether_src =
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 0148b0a..4f2a431 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -480,8 +480,8 @@ struct vxlan_encap_conf vxlan_encap_conf = {
.vni = "\x00\x00\x00",
.udp_src = 0,
.udp_dst = RTE_BE16(4789),
- .ipv4_src = RTE_IPv4(127, 0, 0, 1),
- .ipv4_dst = RTE_IPv4(255, 255, 255, 255),
+ .ipv4_src = RTE_IPV4(127, 0, 0, 1),
+ .ipv4_dst = RTE_IPV4(255, 255, 255, 255),
.ipv6_src = "\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x01",
.ipv6_dst = "\x00\x00\x00\x00\x00\x00\x00\x00"
@@ -497,8 +497,8 @@ struct nvgre_encap_conf nvgre_encap_conf = {
.select_ipv4 = 1,
.select_vlan = 0,
.tni = "\x00\x00\x00",
- .ipv4_src = RTE_IPv4(127, 0, 0, 1),
- .ipv4_dst = RTE_IPv4(255, 255, 255, 255),
+ .ipv4_src = RTE_IPV4(127, 0, 0, 1),
+ .ipv4_dst = RTE_IPV4(255, 255, 255, 255),
.ipv6_src = "\x00\x00\x00\x00\x00\x00\x00\x00"
"\x00\x00\x00\x00\x00\x00\x00\x01",
.ipv6_dst = "\x00\x00\x00\x00\x00\x00\x00\x00"
diff --git a/app/test/test_acl.c b/app/test/test_acl.c
index 8663ff0..9cd9e37 100644
--- a/app/test/test_acl.c
+++ b/app/test/test_acl.c
@@ -515,15 +515,15 @@ struct rte_acl_ipv4vlan_rule acl_rule = {
static struct ipv4_7tuple test_data[] = {
{
.proto = 6,
- .ip_src = RTE_IPv4(10, 1, 1, 1),
- .ip_dst = RTE_IPv4(192, 168, 0, 33),
+ .ip_src = RTE_IPV4(10, 1, 1, 1),
+ .ip_dst = RTE_IPV4(192, 168, 0, 33),
.port_dst = 53,
.allow = 1,
},
{
.proto = 6,
- .ip_src = RTE_IPv4(127, 84, 33, 1),
- .ip_dst = RTE_IPv4(1, 2, 3, 4),
+ .ip_src = RTE_IPV4(127, 84, 33, 1),
+ .ip_dst = RTE_IPV4(1, 2, 3, 4),
.port_dst = 65281,
.allow = 1,
},
diff --git a/app/test/test_acl.h b/app/test/test_acl.h
index b071f47..4f6e659 100644
--- a/app/test/test_acl.h
+++ b/app/test/test_acl.h
@@ -82,13 +82,13 @@ struct rte_acl_ipv4vlan_rule invalid_layout_rules[] = {
{
.data = {.userdata = 1, .category_mask = 1,
.priority = 1},
- .src_addr = RTE_IPv4(10,0,0,0),
+ .src_addr = RTE_IPV4(10,0,0,0),
.src_mask_len = 24,
},
{
.data = {.userdata = 2, .category_mask = 1,
.priority = 1},
- .dst_addr = RTE_IPv4(10,0,0,0),
+ .dst_addr = RTE_IPV4(10,0,0,0),
.dst_mask_len = 24,
},
/* test src and dst ports */
@@ -124,8 +124,8 @@ struct rte_acl_ipv4vlan_rule invalid_layout_rules[] = {
* results using the wrong data layout.
*/
struct ipv4_7tuple invalid_layout_data[] = {
- {.ip_src = RTE_IPv4(10,0,1,0)}, /* should not match */
- {.ip_src = RTE_IPv4(10,0,0,1), .allow = 2}, /* should match 2 */
+ {.ip_src = RTE_IPV4(10,0,1,0)}, /* should not match */
+ {.ip_src = RTE_IPV4(10,0,0,1), .allow = 2}, /* should match 2 */
{.port_src = 100, .allow = 4}, /* should match 4 */
{.port_dst = 0xf, .allow = 6}, /* should match 6 */
};
@@ -142,7 +142,7 @@ struct rte_acl_ipv4vlan_rule acl_test_rules[] = {
{
.data = {.userdata = 1, .category_mask = ACL_ALLOW_MASK,
.priority = 230},
- .dst_addr = RTE_IPv4(192,168,0,0),
+ .dst_addr = RTE_IPV4(192,168,0,0),
.dst_mask_len = 16,
.src_port_low = 0,
.src_port_high = 0xffff,
@@ -153,7 +153,7 @@ struct rte_acl_ipv4vlan_rule acl_test_rules[] = {
{
.data = {.userdata = 2, .category_mask = ACL_ALLOW_MASK,
.priority = 330},
- .dst_addr = RTE_IPv4(192,168,1,0),
+ .dst_addr = RTE_IPV4(192,168,1,0),
.dst_mask_len = 24,
.src_port_low = 0,
.src_port_high = 0xffff,
@@ -164,7 +164,7 @@ struct rte_acl_ipv4vlan_rule acl_test_rules[] = {
{
.data = {.userdata = 3, .category_mask = ACL_DENY_MASK,
.priority = 230},
- .dst_addr = RTE_IPv4(192,168,1,50),
+ .dst_addr = RTE_IPV4(192,168,1,50),
.dst_mask_len = 32,
.src_port_low = 0,
.src_port_high = 0xffff,
@@ -177,7 +177,7 @@ struct rte_acl_ipv4vlan_rule acl_test_rules[] = {
{
.data = {.userdata = 4, .category_mask = ACL_ALLOW_MASK,
.priority = 240},
- .src_addr = RTE_IPv4(10,0,0,0),
+ .src_addr = RTE_IPV4(10,0,0,0),
.src_mask_len = 8,
.src_port_low = 0,
.src_port_high = 0xffff,
@@ -188,7 +188,7 @@ struct rte_acl_ipv4vlan_rule acl_test_rules[] = {
{
.data = {.userdata = 5, .category_mask = ACL_ALLOW_MASK,
.priority = 340},
- .src_addr = RTE_IPv4(10,1,1,0),
+ .src_addr = RTE_IPV4(10,1,1,0),
.src_mask_len = 24,
.src_port_low = 0,
.src_port_high = 0xffff,
@@ -199,7 +199,7 @@ struct rte_acl_ipv4vlan_rule acl_test_rules[] = {
{
.data = {.userdata = 6, .category_mask = ACL_DENY_MASK,
.priority = 240},
- .src_addr = RTE_IPv4(10,1,1,1),
+ .src_addr = RTE_IPV4(10,1,1,1),
.src_mask_len = 32,
.src_port_low = 0,
.src_port_high = 0xffff,
@@ -393,9 +393,9 @@ struct rte_acl_ipv4vlan_rule acl_test_rules[] = {
.data = {.userdata = 24, .category_mask = ACL_ALLOW_MASK,
.priority = 400},
/** make sure that unmasked bytes don't fail! */
- .dst_addr = RTE_IPv4(1,2,3,4),
+ .dst_addr = RTE_IPV4(1,2,3,4),
.dst_mask_len = 16,
- .src_addr = RTE_IPv4(5,6,7,8),
+ .src_addr = RTE_IPV4(5,6,7,8),
.src_mask_len = 24,
.proto = 0x5,
.proto_mask = 0xff,
@@ -411,9 +411,9 @@ struct rte_acl_ipv4vlan_rule acl_test_rules[] = {
{
.data = {.userdata = 25, .category_mask = ACL_DENY_MASK,
.priority = 400},
- .dst_addr = RTE_IPv4(5,6,7,8),
+ .dst_addr = RTE_IPV4(5,6,7,8),
.dst_mask_len = 24,
- .src_addr = RTE_IPv4(1,2,3,4),
+ .src_addr = RTE_IPV4(1,2,3,4),
.src_mask_len = 16,
.proto = 0x5,
.proto_mask = 0xff,
@@ -429,9 +429,9 @@ struct rte_acl_ipv4vlan_rule acl_test_rules[] = {
{
.data = {.userdata = 26, .category_mask = ACL_ALLOW_MASK,
.priority = 500},
- .dst_addr = RTE_IPv4(1,2,3,4),
+ .dst_addr = RTE_IPV4(1,2,3,4),
.dst_mask_len = 8,
- .src_addr = RTE_IPv4(5,6,7,8),
+ .src_addr = RTE_IPV4(5,6,7,8),
.src_mask_len = 32,
.proto = 0x5,
.proto_mask = 0xff,
@@ -445,9 +445,9 @@ struct rte_acl_ipv4vlan_rule acl_test_rules[] = {
{
.data = {.userdata = 27, .category_mask = ACL_DENY_MASK,
.priority = 500},
- .dst_addr = RTE_IPv4(5,6,7,8),
+ .dst_addr = RTE_IPV4(5,6,7,8),
.dst_mask_len = 32,
- .src_addr = RTE_IPv4(1,2,3,4),
+ .src_addr = RTE_IPV4(1,2,3,4),
.src_mask_len = 8,
.proto = 0x5,
.proto_mask = 0xff,
@@ -463,20 +463,20 @@ struct rte_acl_ipv4vlan_rule acl_test_rules[] = {
/* data for ACL unit test */
struct ipv4_7tuple acl_test_data[] = {
/* testing single rule aspects */
- {.ip_src = RTE_IPv4(10,0,0,0), .allow = 4}, /* should match 4 */
- {.ip_src = RTE_IPv4(10,1,1,2), .allow = 5}, /* should match 5 */
- {.ip_src = RTE_IPv4(10,1,1,1), .allow = 5,
+ {.ip_src = RTE_IPV4(10,0,0,0), .allow = 4}, /* should match 4 */
+ {.ip_src = RTE_IPV4(10,1,1,2), .allow = 5}, /* should match 5 */
+ {.ip_src = RTE_IPV4(10,1,1,1), .allow = 5,
.deny = 6}, /* should match 5, 6 */
- {.ip_dst = RTE_IPv4(10,0,0,0)}, /* should not match */
- {.ip_dst = RTE_IPv4(10,1,1,2)}, /* should not match */
- {.ip_dst = RTE_IPv4(10,1,1,1)}, /* should not match */
+ {.ip_dst = RTE_IPV4(10,0,0,0)}, /* should not match */
+ {.ip_dst = RTE_IPV4(10,1,1,2)}, /* should not match */
+ {.ip_dst = RTE_IPV4(10,1,1,1)}, /* should not match */
- {.ip_src = RTE_IPv4(192,168,2,50)}, /* should not match */
- {.ip_src = RTE_IPv4(192,168,1,2)}, /* should not match */
- {.ip_src = RTE_IPv4(192,168,1,50)}, /* should not match */
- {.ip_dst = RTE_IPv4(192,168,2,50), .allow = 1}, /* should match 1 */
- {.ip_dst = RTE_IPv4(192,168,1,49), .allow = 2}, /* should match 2 */
- {.ip_dst = RTE_IPv4(192,168,1,50), .allow = 2,
+ {.ip_src = RTE_IPV4(192,168,2,50)}, /* should not match */
+ {.ip_src = RTE_IPV4(192,168,1,2)}, /* should not match */
+ {.ip_src = RTE_IPV4(192,168,1,50)}, /* should not match */
+ {.ip_dst = RTE_IPV4(192,168,2,50), .allow = 1}, /* should match 1 */
+ {.ip_dst = RTE_IPV4(192,168,1,49), .allow = 2}, /* should match 2 */
+ {.ip_dst = RTE_IPV4(192,168,1,50), .allow = 2,
.deny = 3}, /* should match 2, 3 */
{.vlan = 0x64, .allow = 7}, /* should match 7 */
@@ -515,20 +515,20 @@ struct ipv4_7tuple acl_test_data[] = {
{.proto = 0x5, .allow = 22, .deny = 23}, /* should match 22, 23 */
/* testing matching multiple rules at once */
- {.vlan = 0x5, .ip_src = RTE_IPv4(10,1,1,1),
+ {.vlan = 0x5, .ip_src = RTE_IPV4(10,1,1,1),
.allow = 5, .deny = 9}, /* should match 5, 9 */
- {.vlan = 0x5, .ip_src = RTE_IPv4(192,168,2,50),
+ {.vlan = 0x5, .ip_src = RTE_IPV4(192,168,2,50),
.allow = 8, .deny = 9}, /* should match 8, 9 */
- {.vlan = 0x55, .ip_src = RTE_IPv4(192,168,1,49),
+ {.vlan = 0x55, .ip_src = RTE_IPV4(192,168,1,49),
.allow = 8}, /* should match 8 */
{.port_dst = 80, .port_src = 1024,
.allow = 13, .deny = 20}, /* should match 13,20 */
{.port_dst = 79, .port_src = 1024,
.allow = 14, .deny = 20}, /* should match 14,20 */
- {.proto = 0x5, .ip_dst = RTE_IPv4(192,168,2,50),
+ {.proto = 0x5, .ip_dst = RTE_IPV4(192,168,2,50),
.allow = 1, .deny = 23}, /* should match 1, 23 */
- {.proto = 0x5, .ip_dst = RTE_IPv4(192,168,1,50),
+ {.proto = 0x5, .ip_dst = RTE_IPV4(192,168,1,50),
.allow = 2, .deny = 23}, /* should match 2, 23 */
{.vlan = 0x64, .domain = 0x5,
.allow = 11, .deny = 12}, /* should match 11, 12 */
@@ -537,16 +537,16 @@ struct ipv4_7tuple acl_test_data[] = {
{.proto = 0x5, .port_dst = 80,
.allow = 13, .deny = 23}, /* should match 13, 23 */
{.proto = 0x51, .port_src = 5000}, /* should not match */
- {.ip_src = RTE_IPv4(192,168,1,50),
- .ip_dst = RTE_IPv4(10,0,0,0),
+ {.ip_src = RTE_IPV4(192,168,1,50),
+ .ip_dst = RTE_IPV4(10,0,0,0),
.proto = 0x51,
.port_src = 5000,
.port_dst = 5000}, /* should not match */
/* test full packet rules */
{
- .ip_dst = RTE_IPv4(1,2,100,200),
- .ip_src = RTE_IPv4(5,6,7,254),
+ .ip_dst = RTE_IPV4(1,2,100,200),
+ .ip_src = RTE_IPV4(5,6,7,254),
.proto = 0x5,
.vlan = 0x8100,
.domain = 0x64,
@@ -556,8 +556,8 @@ struct ipv4_7tuple acl_test_data[] = {
.deny = 23
}, /* should match 23, 24 */
{
- .ip_dst = RTE_IPv4(5,6,7,254),
- .ip_src = RTE_IPv4(1,2,100,200),
+ .ip_dst = RTE_IPV4(5,6,7,254),
+ .ip_src = RTE_IPV4(1,2,100,200),
.proto = 0x5,
.vlan = 0x8100,
.domain = 0x64,
@@ -567,8 +567,8 @@ struct ipv4_7tuple acl_test_data[] = {
.deny = 25
}, /* should match 13, 25 */
{
- .ip_dst = RTE_IPv4(1,10,20,30),
- .ip_src = RTE_IPv4(5,6,7,8),
+ .ip_dst = RTE_IPV4(1,10,20,30),
+ .ip_src = RTE_IPV4(5,6,7,8),
.proto = 0x5,
.vlan = 0x64,
.port_src = 12345,
@@ -577,8 +577,8 @@ struct ipv4_7tuple acl_test_data[] = {
.deny = 23
}, /* should match 23, 26 */
{
- .ip_dst = RTE_IPv4(5,6,7,8),
- .ip_src = RTE_IPv4(1,10,20,30),
+ .ip_dst = RTE_IPV4(5,6,7,8),
+ .ip_src = RTE_IPV4(1,10,20,30),
.proto = 0x5,
.vlan = 0x64,
.port_src = 12345,
@@ -587,8 +587,8 @@ struct ipv4_7tuple acl_test_data[] = {
.deny = 27
}, /* should match 13, 27 */
{
- .ip_dst = RTE_IPv4(2,2,3,4),
- .ip_src = RTE_IPv4(4,6,7,8),
+ .ip_dst = RTE_IPV4(2,2,3,4),
+ .ip_src = RTE_IPV4(4,6,7,8),
.proto = 0x5,
.vlan = 0x64,
.port_src = 12345,
@@ -597,8 +597,8 @@ struct ipv4_7tuple acl_test_data[] = {
.deny = 23
}, /* should match 13, 23 */
{
- .ip_dst = RTE_IPv4(1,2,3,4),
- .ip_src = RTE_IPv4(4,6,7,8),
+ .ip_dst = RTE_IPV4(1,2,3,4),
+ .ip_src = RTE_IPV4(4,6,7,8),
.proto = 0x5,
.vlan = 0x64,
.port_src = 12345,
@@ -610,8 +610,8 @@ struct ipv4_7tuple acl_test_data[] = {
/* visual separator! */
{
- .ip_dst = RTE_IPv4(1,2,100,200),
- .ip_src = RTE_IPv4(5,6,7,254),
+ .ip_dst = RTE_IPV4(1,2,100,200),
+ .ip_src = RTE_IPV4(5,6,7,254),
.proto = 0x55,
.vlan = 0x8000,
.domain = 0x6464,
@@ -620,8 +620,8 @@ struct ipv4_7tuple acl_test_data[] = {
.allow = 10
}, /* should match 10 */
{
- .ip_dst = RTE_IPv4(5,6,7,254),
- .ip_src = RTE_IPv4(1,2,100,200),
+ .ip_dst = RTE_IPV4(5,6,7,254),
+ .ip_src = RTE_IPV4(1,2,100,200),
.proto = 0x55,
.vlan = 0x8100,
.domain = 0x6464,
@@ -630,8 +630,8 @@ struct ipv4_7tuple acl_test_data[] = {
.allow = 10
}, /* should match 10 */
{
- .ip_dst = RTE_IPv4(1,10,20,30),
- .ip_src = RTE_IPv4(5,6,7,8),
+ .ip_dst = RTE_IPV4(1,10,20,30),
+ .ip_src = RTE_IPV4(5,6,7,8),
.proto = 0x55,
.vlan = 0x64,
.port_src = 12345,
@@ -639,8 +639,8 @@ struct ipv4_7tuple acl_test_data[] = {
.allow = 7
}, /* should match 7 */
{
- .ip_dst = RTE_IPv4(5,6,7,8),
- .ip_src = RTE_IPv4(1,10,20,30),
+ .ip_dst = RTE_IPV4(5,6,7,8),
+ .ip_src = RTE_IPV4(1,10,20,30),
.proto = 0x55,
.vlan = 0x64,
.port_src = 12345,
@@ -648,8 +648,8 @@ struct ipv4_7tuple acl_test_data[] = {
.allow = 7
}, /* should match 7 */
{
- .ip_dst = RTE_IPv4(2,2,3,4),
- .ip_src = RTE_IPv4(4,6,7,8),
+ .ip_dst = RTE_IPV4(2,2,3,4),
+ .ip_src = RTE_IPV4(4,6,7,8),
.proto = 0x55,
.vlan = 0x64,
.port_src = 12345,
@@ -657,8 +657,8 @@ struct ipv4_7tuple acl_test_data[] = {
.allow = 7
}, /* should match 7 */
{
- .ip_dst = RTE_IPv4(1,2,3,4),
- .ip_src = RTE_IPv4(4,6,7,8),
+ .ip_dst = RTE_IPV4(1,2,3,4),
+ .ip_src = RTE_IPV4(4,6,7,8),
.proto = 0x50,
.vlan = 0x6466,
.port_src = 12345,
diff --git a/app/test/test_efd.c b/app/test/test_efd.c
index 2868712..73b3044 100644
--- a/app/test/test_efd.c
+++ b/app/test/test_efd.c
@@ -58,36 +58,36 @@ static void print_key_info(const char *msg, const struct flow_key *key,
/* Keys used by unit test functions */
static struct flow_key keys[5] = {
{
- .ip_src = RTE_IPv4(0x03, 0x02, 0x01, 0x00),
- .ip_dst = RTE_IPv4(0x07, 0x06, 0x05, 0x04),
+ .ip_src = RTE_IPV4(0x03, 0x02, 0x01, 0x00),
+ .ip_dst = RTE_IPV4(0x07, 0x06, 0x05, 0x04),
.port_src = 0x0908,
.port_dst = 0x0b0a,
.proto = 0x0c,
},
{
- .ip_src = RTE_IPv4(0x13, 0x12, 0x11, 0x10),
- .ip_dst = RTE_IPv4(0x17, 0x16, 0x15, 0x14),
+ .ip_src = RTE_IPV4(0x13, 0x12, 0x11, 0x10),
+ .ip_dst = RTE_IPV4(0x17, 0x16, 0x15, 0x14),
.port_src = 0x1918,
.port_dst = 0x1b1a,
.proto = 0x1c,
},
{
- .ip_src = RTE_IPv4(0x23, 0x22, 0x21, 0x20),
- .ip_dst = RTE_IPv4(0x27, 0x26, 0x25, 0x24),
+ .ip_src = RTE_IPV4(0x23, 0x22, 0x21, 0x20),
+ .ip_dst = RTE_IPV4(0x27, 0x26, 0x25, 0x24),
.port_src = 0x2928,
.port_dst = 0x2b2a,
.proto = 0x2c,
},
{
- .ip_src = RTE_IPv4(0x33, 0x32, 0x31, 0x30),
- .ip_dst = RTE_IPv4(0x37, 0x36, 0x35, 0x34),
+ .ip_src = RTE_IPV4(0x33, 0x32, 0x31, 0x30),
+ .ip_dst = RTE_IPV4(0x37, 0x36, 0x35, 0x34),
.port_src = 0x3938,
.port_dst = 0x3b3a,
.proto = 0x3c,
},
{
- .ip_src = RTE_IPv4(0x43, 0x42, 0x41, 0x40),
- .ip_dst = RTE_IPv4(0x47, 0x46, 0x45, 0x44),
+ .ip_src = RTE_IPV4(0x43, 0x42, 0x41, 0x40),
+ .ip_dst = RTE_IPV4(0x47, 0x46, 0x45, 0x44),
.port_src = 0x4948,
.port_dst = 0x4b4a,
.proto = 0x4c,
diff --git a/app/test/test_flow_classify.c b/app/test/test_flow_classify.c
index f4d2fdc..cbbff31 100644
--- a/app/test/test_flow_classify.c
+++ b/app/test/test_flow_classify.c
@@ -96,7 +96,7 @@
*/
static struct rte_flow_item_ipv4 ipv4_udp_spec_1 = {
{ 0, 0, 0, 0, 0, 0, IPPROTO_UDP, 0,
- RTE_IPv4(2, 2, 2, 3), RTE_IPv4(2, 2, 2, 7)}
+ RTE_IPV4(2, 2, 2, 3), RTE_IPV4(2, 2, 2, 7)}
};
static const struct rte_flow_item_ipv4 ipv4_mask_24 = {
.hdr = {
@@ -133,7 +133,7 @@
*/
static struct rte_flow_item_ipv4 ipv4_tcp_spec_1 = {
{ 0, 0, 0, 0, 0, 0, IPPROTO_TCP, 0,
- RTE_IPv4(1, 2, 3, 4), RTE_IPv4(5, 6, 7, 8)}
+ RTE_IPV4(1, 2, 3, 4), RTE_IPV4(5, 6, 7, 8)}
};
static struct rte_flow_item_tcp tcp_spec_1 = {
@@ -151,8 +151,8 @@
* dst mask 255.255.255.00 / sctp src is 16 dst is 17/ end"
*/
static struct rte_flow_item_ipv4 ipv4_sctp_spec_1 = {
- { 0, 0, 0, 0, 0, 0, IPPROTO_SCTP, 0, RTE_IPv4(11, 12, 13, 14),
- RTE_IPv4(15, 16, 17, 18)}
+ { 0, 0, 0, 0, 0, 0, IPPROTO_SCTP, 0, RTE_IPV4(11, 12, 13, 14),
+ RTE_IPV4(15, 16, 17, 18)}
};
static struct rte_flow_item_sctp sctp_spec_1 = {
diff --git a/app/test/test_hash.c b/app/test/test_hash.c
index 8271ba7..0052dce 100644
--- a/app/test/test_hash.c
+++ b/app/test/test_hash.c
@@ -104,32 +104,32 @@ static void print_key_info(const char *msg, const struct flow_key *key,
/* Keys used by unit test functions */
static struct flow_key keys[5] = { {
- .ip_src = RTE_IPv4(0x03, 0x02, 0x01, 0x00),
- .ip_dst = RTE_IPv4(0x07, 0x06, 0x05, 0x04),
+ .ip_src = RTE_IPV4(0x03, 0x02, 0x01, 0x00),
+ .ip_dst = RTE_IPV4(0x07, 0x06, 0x05, 0x04),
.port_src = 0x0908,
.port_dst = 0x0b0a,
.proto = 0x0c,
}, {
- .ip_src = RTE_IPv4(0x13, 0x12, 0x11, 0x10),
- .ip_dst = RTE_IPv4(0x17, 0x16, 0x15, 0x14),
+ .ip_src = RTE_IPV4(0x13, 0x12, 0x11, 0x10),
+ .ip_dst = RTE_IPV4(0x17, 0x16, 0x15, 0x14),
.port_src = 0x1918,
.port_dst = 0x1b1a,
.proto = 0x1c,
}, {
- .ip_src = RTE_IPv4(0x23, 0x22, 0x21, 0x20),
- .ip_dst = RTE_IPv4(0x27, 0x26, 0x25, 0x24),
+ .ip_src = RTE_IPV4(0x23, 0x22, 0x21, 0x20),
+ .ip_dst = RTE_IPV4(0x27, 0x26, 0x25, 0x24),
.port_src = 0x2928,
.port_dst = 0x2b2a,
.proto = 0x2c,
}, {
- .ip_src = RTE_IPv4(0x33, 0x32, 0x31, 0x30),
- .ip_dst = RTE_IPv4(0x37, 0x36, 0x35, 0x34),
+ .ip_src = RTE_IPV4(0x33, 0x32, 0x31, 0x30),
+ .ip_dst = RTE_IPV4(0x37, 0x36, 0x35, 0x34),
.port_src = 0x3938,
.port_dst = 0x3b3a,
.proto = 0x3c,
}, {
- .ip_src = RTE_IPv4(0x43, 0x42, 0x41, 0x40),
- .ip_dst = RTE_IPv4(0x47, 0x46, 0x45, 0x44),
+ .ip_src = RTE_IPV4(0x43, 0x42, 0x41, 0x40),
+ .ip_dst = RTE_IPV4(0x47, 0x46, 0x45, 0x44),
.port_src = 0x4948,
.port_dst = 0x4b4a,
.proto = 0x4c,
diff --git a/app/test/test_ipsec.c b/app/test/test_ipsec.c
index 606e319..3993ff4 100644
--- a/app/test/test_ipsec.c
+++ b/app/test/test_ipsec.c
@@ -536,8 +536,8 @@ struct rte_ipv4_hdr ipv4_outer = {
sizeof(ipv4_outer) / RTE_IPV4_IHL_MULTIPLIER,
.time_to_live = IPDEFTTL,
.next_proto_id = IPPROTO_ESP,
- .src_addr = RTE_IPv4(192, 168, 1, 100),
- .dst_addr = RTE_IPv4(192, 168, 2, 100),
+ .src_addr = RTE_IPV4(192, 168, 1, 100),
+ .dst_addr = RTE_IPV4(192, 168, 2, 100),
};
static struct rte_mbuf *
diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c
index 784501a..bbb4e9c 100644
--- a/app/test/test_link_bonding_mode4.c
+++ b/app/test/test_link_bonding_mode4.c
@@ -729,8 +729,8 @@ struct link_bonding_unittest_params {
uint16_t src_port = 10, dst_port = 20;
- uint32_t ip_src[4] = { [0 ... 2] = 0xDEADBEEF, [3] = RTE_IPv4(192, 168, 0, 1) };
- uint32_t ip_dst[4] = { [0 ... 2] = 0xFEEDFACE, [3] = RTE_IPv4(192, 168, 0, 2) };
+ uint32_t ip_src[4] = { [0 ... 2] = 0xDEADBEEF, [3] = RTE_IPV4(192, 168, 0, 1) };
+ uint32_t ip_dst[4] = { [0 ... 2] = 0xFEEDFACE, [3] = RTE_IPV4(192, 168, 0, 2) };
struct rte_ether_hdr pkt_eth_hdr;
struct rte_udp_hdr pkt_udp_hdr;
diff --git a/app/test/test_lpm.c b/app/test/test_lpm.c
index 0f24631..e969fe0 100644
--- a/app/test/test_lpm.c
+++ b/app/test/test_lpm.c
@@ -165,7 +165,7 @@
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
- uint32_t ip = RTE_IPv4(0, 0, 0, 0), next_hop = 100;
+ uint32_t ip = RTE_IPV4(0, 0, 0, 0), next_hop = 100;
uint8_t depth = 24;
int32_t status = 0;
@@ -203,7 +203,7 @@
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
- uint32_t ip = RTE_IPv4(0, 0, 0, 0);
+ uint32_t ip = RTE_IPV4(0, 0, 0, 0);
uint8_t depth = 24;
int32_t status = 0;
@@ -242,7 +242,7 @@
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
- uint32_t ip = RTE_IPv4(0, 0, 0, 0), next_hop_return = 0;
+ uint32_t ip = RTE_IPV4(0, 0, 0, 0), next_hop_return = 0;
int32_t status = 0;
/* rte_lpm_lookup: lpm == NULL */
@@ -276,7 +276,7 @@
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
- uint32_t ip = RTE_IPv4(0, 0, 0, 0), next_hop_add = 100, next_hop_return = 0;
+ uint32_t ip = RTE_IPV4(0, 0, 0, 0), next_hop_add = 100, next_hop_return = 0;
uint8_t depth = 24;
int32_t status = 0;
@@ -315,7 +315,7 @@
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
- uint32_t ip = RTE_IPv4(0, 0, 0, 0), next_hop_add = 100, next_hop_return = 0;
+ uint32_t ip = RTE_IPV4(0, 0, 0, 0), next_hop_add = 100, next_hop_return = 0;
uint8_t depth = 32;
int32_t status = 0;
@@ -366,7 +366,7 @@
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
- uint32_t ip1 = RTE_IPv4(127, 255, 255, 255), ip2 = RTE_IPv4(128, 0, 0, 0);
+ uint32_t ip1 = RTE_IPV4(127, 255, 255, 255), ip2 = RTE_IPV4(128, 0, 0, 0);
uint32_t next_hop_add, next_hop_return;
uint8_t depth;
int32_t status = 0;
@@ -457,7 +457,7 @@
int32_t status = 0;
/* Add & lookup to hit invalid TBL24 entry */
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 24;
next_hop_add = 100;
@@ -479,7 +479,7 @@
rte_lpm_delete_all(lpm);
/* Add & lookup to hit valid TBL24 entry not extended */
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 23;
next_hop_add = 100;
@@ -515,7 +515,7 @@
/* Add & lookup to hit valid extended TBL24 entry with invalid TBL8
* entry */
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 32;
next_hop_add = 100;
@@ -525,7 +525,7 @@
status = rte_lpm_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add));
- ip = RTE_IPv4(128, 0, 0, 5);
+ ip = RTE_IPV4(128, 0, 0, 5);
depth = 32;
next_hop_add = 101;
@@ -541,7 +541,7 @@
status = rte_lpm_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT(status == -ENOENT);
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 32;
next_hop_add = 100;
@@ -558,11 +558,11 @@
/* Add & lookup to hit valid extended TBL24 entry with valid TBL8
* entry */
- ip_1 = RTE_IPv4(128, 0, 0, 0);
+ ip_1 = RTE_IPV4(128, 0, 0, 0);
depth_1 = 25;
next_hop_add_1 = 101;
- ip_2 = RTE_IPv4(128, 0, 0, 5);
+ ip_2 = RTE_IPV4(128, 0, 0, 5);
depth_2 = 32;
next_hop_add_2 = 102;
@@ -629,7 +629,7 @@
lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 16;
next_hop_add = 100;
@@ -647,7 +647,7 @@
rte_lpm_delete_all(lpm);
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 25;
next_hop_add = 100;
@@ -665,14 +665,14 @@
/* Add rule that extends a TBL24 valid entry & lookup for both rules
* (& delete & lookup) */
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 24;
next_hop_add = 100;
status = rte_lpm_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
- ip = RTE_IPv4(128, 0, 0, 10);
+ ip = RTE_IPV4(128, 0, 0, 10);
depth = 32;
next_hop_add = 101;
@@ -682,13 +682,13 @@
status = rte_lpm_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add));
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
next_hop_add = 100;
status = rte_lpm_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add));
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 24;
status = rte_lpm_delete(lpm, ip, depth);
@@ -697,7 +697,7 @@
status = rte_lpm_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT(status == -ENOENT);
- ip = RTE_IPv4(128, 0, 0, 10);
+ ip = RTE_IPV4(128, 0, 0, 10);
depth = 32;
status = rte_lpm_delete(lpm, ip, depth);
@@ -711,7 +711,7 @@
/* Add rule that updates the next hop in TBL24 & lookup
* (& delete & lookup) */
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 24;
next_hop_add = 100;
@@ -740,7 +740,7 @@
/* Add rule that updates the next hop in TBL8 & lookup
* (& delete & lookup) */
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 32;
next_hop_add = 100;
@@ -768,7 +768,7 @@
/* Delete a rule that is not present in the TBL24 & lookup */
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 24;
status = rte_lpm_delete(lpm, ip, depth);
@@ -781,7 +781,7 @@
/* Delete a rule that is not present in the TBL8 & lookup */
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 32;
status = rte_lpm_delete(lpm, ip, depth);
@@ -818,14 +818,14 @@
lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 24;
next_hop_add = 100;
status = rte_lpm_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
- ip = RTE_IPv4(128, 0, 0, 10);
+ ip = RTE_IPV4(128, 0, 0, 10);
depth = 32;
next_hop_add = 101;
@@ -835,13 +835,13 @@
status = rte_lpm_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add));
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
next_hop_add = 100;
status = rte_lpm_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT((status == 0) && (next_hop_return == next_hop_add));
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 24;
status = rte_lpm_delete(lpm, ip, depth);
@@ -850,7 +850,7 @@
status = rte_lpm_lookup(lpm, ip, &next_hop_return);
TEST_LPM_ASSERT(status == -ENOENT);
- ip = RTE_IPv4(128, 0, 0, 10);
+ ip = RTE_IPV4(128, 0, 0, 10);
depth = 32;
status = rte_lpm_delete(lpm, ip, depth);
@@ -889,7 +889,7 @@
lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 32;
next_hop_add = 100;
@@ -944,7 +944,7 @@
lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
- ip = RTE_IPv4(128, 0, 0, 0);
+ ip = RTE_IPV4(128, 0, 0, 0);
depth = 24;
next_hop_add_1 = 100;
@@ -1014,10 +1014,10 @@
depth = 32;
next_hop_add = 100;
- ip = RTE_IPv4(0, 0, 0, 0);
+ ip = RTE_IPV4(0, 0, 0, 0);
/* Add 256 rules that require a tbl8 extension */
- for (; ip <= RTE_IPv4(0, 0, 255, 0); ip += 256) {
+ for (; ip <= RTE_IPV4(0, 0, 255, 0); ip += 256) {
status = rte_lpm_add(lpm, ip, depth, next_hop_add);
TEST_LPM_ASSERT(status == 0);
@@ -1028,7 +1028,7 @@
/* All tbl8 extensions have been used above. Try to add one more and
* we get a fail */
- ip = RTE_IPv4(1, 0, 0, 0);
+ ip = RTE_IPV4(1, 0, 0, 0);
depth = 32;
status = rte_lpm_add(lpm, ip, depth, next_hop_add);
@@ -1125,9 +1125,9 @@
config.max_rules = MAX_RULES;
config.number_tbl8s = NUMBER_TBL8S;
config.flags = 0;
- const uint32_t ip_10_32 = RTE_IPv4(10, 10, 10, 2);
- const uint32_t ip_10_24 = RTE_IPv4(10, 10, 10, 0);
- const uint32_t ip_20_25 = RTE_IPv4(10, 10, 20, 2);
+ const uint32_t ip_10_32 = RTE_IPV4(10, 10, 10, 2);
+ const uint32_t ip_10_24 = RTE_IPV4(10, 10, 10, 0);
+ const uint32_t ip_20_25 = RTE_IPV4(10, 10, 20, 2);
const uint8_t d_ip_10_32 = 32,
d_ip_10_24 = 24,
d_ip_20_25 = 25;
@@ -1221,7 +1221,7 @@
lpm = rte_lpm_create(__func__, SOCKET_ID_ANY, &config);
TEST_LPM_ASSERT(lpm != NULL);
- ip = RTE_IPv4(192, 168, 100, 100);
+ ip = RTE_IPV4(192, 168, 100, 100);
depth = 28;
next_hop = 1;
rte_lpm_add(lpm, ip, depth, next_hop);
diff --git a/app/test/test_lpm_perf.c b/app/test/test_lpm_perf.c
index b546503..77eea66 100644
--- a/app/test/test_lpm_perf.c
+++ b/app/test/test_lpm_perf.c
@@ -285,11 +285,11 @@ static void generate_large_route_rule_table(void)
* they are 4 rules with private local IP address and 1 all-zeros prefix
* with depth = 8.
*/
- insert_rule_in_random_pos(RTE_IPv4(0, 0, 0, 0), 8);
- insert_rule_in_random_pos(RTE_IPv4(10, 2, 23, 147), 32);
- insert_rule_in_random_pos(RTE_IPv4(192, 168, 100, 10), 24);
- insert_rule_in_random_pos(RTE_IPv4(192, 168, 25, 100), 24);
- insert_rule_in_random_pos(RTE_IPv4(192, 168, 129, 124), 32);
+ insert_rule_in_random_pos(RTE_IPV4(0, 0, 0, 0), 8);
+ insert_rule_in_random_pos(RTE_IPV4(10, 2, 23, 147), 32);
+ insert_rule_in_random_pos(RTE_IPV4(192, 168, 100, 10), 24);
+ insert_rule_in_random_pos(RTE_IPV4(192, 168, 25, 100), 24);
+ insert_rule_in_random_pos(RTE_IPV4(192, 168, 129, 124), 32);
}
static void
diff --git a/app/test/test_member.c b/app/test/test_member.c
index 53287fc..748ddcc 100644
--- a/app/test/test_member.c
+++ b/app/test/test_member.c
@@ -41,36 +41,36 @@ struct flow_key {
/* Keys used by unit test functions */
static struct flow_key keys[NUM_SAMPLES] = {
{
- .ip_src = RTE_IPv4(0x03, 0x02, 0x01, 0x00),
- .ip_dst = RTE_IPv4(0x07, 0x06, 0x05, 0x04),
+ .ip_src = RTE_IPV4(0x03, 0x02, 0x01, 0x00),
+ .ip_dst = RTE_IPV4(0x07, 0x06, 0x05, 0x04),
.port_src = 0x0908,
.port_dst = 0x0b0a,
.proto = 0x0c,
},
{
- .ip_src = RTE_IPv4(0x13, 0x12, 0x11, 0x10),
- .ip_dst = RTE_IPv4(0x17, 0x16, 0x15, 0x14),
+ .ip_src = RTE_IPV4(0x13, 0x12, 0x11, 0x10),
+ .ip_dst = RTE_IPV4(0x17, 0x16, 0x15, 0x14),
.port_src = 0x1918,
.port_dst = 0x1b1a,
.proto = 0x1c,
},
{
- .ip_src = RTE_IPv4(0x23, 0x22, 0x21, 0x20),
- .ip_dst = RTE_IPv4(0x27, 0x26, 0x25, 0x24),
+ .ip_src = RTE_IPV4(0x23, 0x22, 0x21, 0x20),
+ .ip_dst = RTE_IPV4(0x27, 0x26, 0x25, 0x24),
.port_src = 0x2928,
.port_dst = 0x2b2a,
.proto = 0x2c,
},
{
- .ip_src = RTE_IPv4(0x33, 0x32, 0x31, 0x30),
- .ip_dst = RTE_IPv4(0x37, 0x36, 0x35, 0x34),
+ .ip_src = RTE_IPV4(0x33, 0x32, 0x31, 0x30),
+ .ip_dst = RTE_IPV4(0x37, 0x36, 0x35, 0x34),
.port_src = 0x3938,
.port_dst = 0x3b3a,
.proto = 0x3c,
},
{
- .ip_src = RTE_IPv4(0x43, 0x42, 0x41, 0x40),
- .ip_dst = RTE_IPv4(0x47, 0x46, 0x45, 0x44),
+ .ip_src = RTE_IPV4(0x43, 0x42, 0x41, 0x40),
+ .ip_dst = RTE_IPV4(0x47, 0x46, 0x45, 0x44),
.port_src = 0x4948,
.port_dst = 0x4b4a,
.proto = 0x4c,
diff --git a/app/test/test_sched.c b/app/test/test_sched.c
index 10d54c5..5873ee4 100644
--- a/app/test/test_sched.c
+++ b/app/test/test_sched.c
@@ -96,7 +96,7 @@
vlan1->vlan_tci = rte_cpu_to_be_16(SUBPORT);
vlan2->vlan_tci = rte_cpu_to_be_16(PIPE);
eth_hdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
- ip_hdr->dst_addr = RTE_IPv4(0,0,TC,QUEUE);
+ ip_hdr->dst_addr = RTE_IPV4(0,0,TC,QUEUE);
rte_sched_port_pkt_write(port, mbuf, SUBPORT, PIPE, TC, QUEUE,
diff --git a/app/test/test_table_acl.c b/app/test/test_table_acl.c
index cb039c0..0bdf76a 100644
--- a/app/test/test_table_acl.c
+++ b/app/test/test_table_acl.c
@@ -112,7 +112,7 @@ enum {
GET_CB_FIELD(in, d, 0, UINT8_MAX, '/');
GET_CB_FIELD(in, m, 0, sizeof(uint32_t) * CHAR_BIT, 0);
- addr[0] = RTE_IPv4(a, b, c, d);
+ addr[0] = RTE_IPV4(a, b, c, d);
mask_len[0] = m;
return 0;
@@ -658,8 +658,8 @@ enum {
sizeof(struct ipv4_5tuple));
five_tuple.proto = j;
- five_tuple.ip_src = rte_bswap32(RTE_IPv4(192, 168, j, 1));
- five_tuple.ip_dst = rte_bswap32(RTE_IPv4(10, 4, j, 1));
+ five_tuple.ip_src = rte_bswap32(RTE_IPV4(192, 168, j, 1));
+ five_tuple.ip_dst = rte_bswap32(RTE_IPV4(10, 4, j, 1));
five_tuple.port_src = rte_bswap16(100 + j);
five_tuple.port_dst = rte_bswap16(200 + j);
diff --git a/app/test/test_thash.c b/app/test/test_thash.c
index 3724ea5..5a6912c 100644
--- a/app/test/test_thash.c
+++ b/app/test/test_thash.c
@@ -59,15 +59,15 @@ struct test_thash_v6 {
/*From 82599 Datasheet 7.1.2.8.3 RSS Verification Suite*/
struct test_thash_v4 v4_tbl[] = {
-{RTE_IPv4(161, 142, 100, 80), RTE_IPv4(66, 9, 149, 187),
+{RTE_IPV4(161, 142, 100, 80), RTE_IPV4(66, 9, 149, 187),
1766, 2794, 0x323e8fc2, 0x51ccc178},
-{RTE_IPv4(65, 69, 140, 83), RTE_IPv4(199, 92, 111, 2),
+{RTE_IPV4(65, 69, 140, 83), RTE_IPV4(199, 92, 111, 2),
4739, 14230, 0xd718262a, 0xc626b0ea},
-{RTE_IPv4(12, 22, 207, 184), RTE_IPv4(24, 19, 198, 95),
+{RTE_IPV4(12, 22, 207, 184), RTE_IPV4(24, 19, 198, 95),
38024, 12898, 0xd2d0a5de, 0x5c2b394a},
-{RTE_IPv4(209, 142, 163, 6), RTE_IPv4(38, 27, 205, 30),
+{RTE_IPV4(209, 142, 163, 6), RTE_IPV4(38, 27, 205, 30),
2217, 48228, 0x82989176, 0xafc7327f},
-{RTE_IPv4(202, 188, 127, 2), RTE_IPv4(153, 39, 163, 191),
+{RTE_IPV4(202, 188, 127, 2), RTE_IPV4(153, 39, 163, 191),
1303, 44251, 0x5d1809c5, 0x10e828a2},
};
diff --git a/doc/guides/prog_guide/packet_classif_access_ctrl.rst b/doc/guides/prog_guide/packet_classif_access_ctrl.rst
index 010ec04..c16b11a 100644
--- a/doc/guides/prog_guide/packet_classif_access_ctrl.rst
+++ b/doc/guides/prog_guide/packet_classif_access_ctrl.rst
@@ -419,7 +419,7 @@ Classify with Multiple Categories
.data = {.userdata = 1, .category_mask = 3, .priority = 1},
/* destination IPv4 */
- .field[2] = {.value.u32 = RTE_IPv4(192,168,0,0),. mask_range.u32 = 16,},
+ .field[2] = {.value.u32 = RTE_IPV4(192,168,0,0),. mask_range.u32 = 16,},
/* source port */
.field[3] = {.value.u16 = 0, .mask_range.u16 = 0xffff,},
@@ -433,7 +433,7 @@ Classify with Multiple Categories
.data = {.userdata = 2, .category_mask = 1, .priority = 2},
/* destination IPv4 */
- .field[2] = {.value.u32 = RTE_IPv4(192,168,1,0),. mask_range.u32 = 24,},
+ .field[2] = {.value.u32 = RTE_IPV4(192,168,1,0),. mask_range.u32 = 24,},
/* source port */
.field[3] = {.value.u16 = 0, .mask_range.u16 = 0xffff,},
@@ -447,7 +447,7 @@ Classify with Multiple Categories
.data = {.userdata = 3, .category_mask = 2, .priority = 3},
/* source IPv4 */
- .field[1] = {.value.u32 = RTE_IPv4(10,1,1,1),. mask_range.u32 = 32,},
+ .field[1] = {.value.u32 = RTE_IPV4(10,1,1,1),. mask_range.u32 = 32,},
/* source port */
.field[3] = {.value.u16 = 0, .mask_range.u16 = 0xffff,},
diff --git a/doc/guides/sample_app_ug/ip_frag.rst b/doc/guides/sample_app_ug/ip_frag.rst
index 49ba0d8..afeaff3 100644
--- a/doc/guides/sample_app_ug/ip_frag.rst
+++ b/doc/guides/sample_app_ug/ip_frag.rst
@@ -104,14 +104,14 @@ The default l3fwd_ipv4_route_array table is:
.. code-block:: c
struct l3fwd_ipv4_route l3fwd_ipv4_route_array[] = {
- {RTE_IPv4(100, 10, 0, 0), 16, 0},
- {RTE_IPv4(100, 20, 0, 0), 16, 1},
- {RTE_IPv4(100, 30, 0, 0), 16, 2},
- {RTE_IPv4(100, 40, 0, 0), 16, 3},
- {RTE_IPv4(100, 50, 0, 0), 16, 4},
- {RTE_IPv4(100, 60, 0, 0), 16, 5},
- {RTE_IPv4(100, 70, 0, 0), 16, 6},
- {RTE_IPv4(100, 80, 0, 0), 16, 7},
+ {RTE_IPV4(100, 10, 0, 0), 16, 0},
+ {RTE_IPV4(100, 20, 0, 0), 16, 1},
+ {RTE_IPV4(100, 30, 0, 0), 16, 2},
+ {RTE_IPV4(100, 40, 0, 0), 16, 3},
+ {RTE_IPV4(100, 50, 0, 0), 16, 4},
+ {RTE_IPV4(100, 60, 0, 0), 16, 5},
+ {RTE_IPV4(100, 70, 0, 0), 16, 6},
+ {RTE_IPV4(100, 80, 0, 0), 16, 7},
};
The default l3fwd_ipv6_route_array table is:
diff --git a/doc/guides/sample_app_ug/ip_reassembly.rst b/doc/guides/sample_app_ug/ip_reassembly.rst
index 99dcd95..f34b9d0 100644
--- a/doc/guides/sample_app_ug/ip_reassembly.rst
+++ b/doc/guides/sample_app_ug/ip_reassembly.rst
@@ -107,14 +107,14 @@ The default l3fwd_ipv4_route_array table is:
.. code-block:: c
struct l3fwd_ipv4_route l3fwd_ipv4_route_array[] = {
- {RTE_IPv4(100, 10, 0, 0), 16, 0},
- {RTE_IPv4(100, 20, 0, 0), 16, 1},
- {RTE_IPv4(100, 30, 0, 0), 16, 2},
- {RTE_IPv4(100, 40, 0, 0), 16, 3},
- {RTE_IPv4(100, 50, 0, 0), 16, 4},
- {RTE_IPv4(100, 60, 0, 0), 16, 5},
- {RTE_IPv4(100, 70, 0, 0), 16, 6},
- {RTE_IPv4(100, 80, 0, 0), 16, 7},
+ {RTE_IPV4(100, 10, 0, 0), 16, 0},
+ {RTE_IPV4(100, 20, 0, 0), 16, 1},
+ {RTE_IPV4(100, 30, 0, 0), 16, 2},
+ {RTE_IPV4(100, 40, 0, 0), 16, 3},
+ {RTE_IPV4(100, 50, 0, 0), 16, 4},
+ {RTE_IPV4(100, 60, 0, 0), 16, 5},
+ {RTE_IPV4(100, 70, 0, 0), 16, 6},
+ {RTE_IPV4(100, 80, 0, 0), 16, 7},
};
The default l3fwd_ipv6_route_array table is:
diff --git a/examples/flow_classify/flow_classify.c b/examples/flow_classify/flow_classify.c
index 75a66fd..bc7f43e 100644
--- a/examples/flow_classify/flow_classify.c
+++ b/examples/flow_classify/flow_classify.c
@@ -379,7 +379,7 @@ static __attribute__((noreturn)) void
if (get_cb_field(&in, &m, 0, sizeof(uint32_t) * CHAR_BIT, 0))
return -EINVAL;
- addr[0] = RTE_IPv4(a, b, c, d);
+ addr[0] = RTE_IPV4(a, b, c, d);
mask_len[0] = m;
return 0;
}
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index f8b3033..4f94129 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -169,14 +169,14 @@ struct l3fwd_ipv4_route {
};
struct l3fwd_ipv4_route l3fwd_ipv4_route_array[] = {
- {RTE_IPv4(100,10,0,0), 16, 0},
- {RTE_IPv4(100,20,0,0), 16, 1},
- {RTE_IPv4(100,30,0,0), 16, 2},
- {RTE_IPv4(100,40,0,0), 16, 3},
- {RTE_IPv4(100,50,0,0), 16, 4},
- {RTE_IPv4(100,60,0,0), 16, 5},
- {RTE_IPv4(100,70,0,0), 16, 6},
- {RTE_IPv4(100,80,0,0), 16, 7},
+ {RTE_IPV4(100,10,0,0), 16, 0},
+ {RTE_IPV4(100,20,0,0), 16, 1},
+ {RTE_IPV4(100,30,0,0), 16, 2},
+ {RTE_IPV4(100,40,0,0), 16, 3},
+ {RTE_IPV4(100,50,0,0), 16, 4},
+ {RTE_IPV4(100,60,0,0), 16, 5},
+ {RTE_IPV4(100,70,0,0), 16, 6},
+ {RTE_IPV4(100,80,0,0), 16, 7},
};
/*
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 8351270..6624b19 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -190,14 +190,14 @@ struct l3fwd_ipv4_route {
};
struct l3fwd_ipv4_route l3fwd_ipv4_route_array[] = {
- {RTE_IPv4(100,10,0,0), 16, 0},
- {RTE_IPv4(100,20,0,0), 16, 1},
- {RTE_IPv4(100,30,0,0), 16, 2},
- {RTE_IPv4(100,40,0,0), 16, 3},
- {RTE_IPv4(100,50,0,0), 16, 4},
- {RTE_IPv4(100,60,0,0), 16, 5},
- {RTE_IPv4(100,70,0,0), 16, 6},
- {RTE_IPv4(100,80,0,0), 16, 7},
+ {RTE_IPV4(100,10,0,0), 16, 0},
+ {RTE_IPV4(100,20,0,0), 16, 1},
+ {RTE_IPV4(100,30,0,0), 16, 2},
+ {RTE_IPV4(100,40,0,0), 16, 3},
+ {RTE_IPV4(100,50,0,0), 16, 4},
+ {RTE_IPV4(100,60,0,0), 16, 5},
+ {RTE_IPV4(100,70,0,0), 16, 6},
+ {RTE_IPV4(100,80,0,0), 16, 7},
};
/*
diff --git a/examples/ipsec-secgw/sa.c b/examples/ipsec-secgw/sa.c
index 8a3d894..8d47d1d 100644
--- a/examples/ipsec-secgw/sa.c
+++ b/examples/ipsec-secgw/sa.c
@@ -951,7 +951,7 @@ struct sa_ctx {
if (rc6 >= 0) {
RTE_LOG(ERR, IPSEC,
"%s: SPI %u used simultaeously by "
- "RTE_IPv4(%d) and IPv6 (%d) SP rules\n",
+ "RTE_IPV4(%d) and IPv6 (%d) SP rules\n",
__func__, spi, rc4, rc6);
return -EINVAL;
} else
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index 15f2b4b..e4410f5 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -138,21 +138,21 @@ struct mcast_group_params {
};
static struct mcast_group_params mcast_group_table[] = {
- {RTE_IPv4(224,0,0,101), 0x1},
- {RTE_IPv4(224,0,0,102), 0x2},
- {RTE_IPv4(224,0,0,103), 0x3},
- {RTE_IPv4(224,0,0,104), 0x4},
- {RTE_IPv4(224,0,0,105), 0x5},
- {RTE_IPv4(224,0,0,106), 0x6},
- {RTE_IPv4(224,0,0,107), 0x7},
- {RTE_IPv4(224,0,0,108), 0x8},
- {RTE_IPv4(224,0,0,109), 0x9},
- {RTE_IPv4(224,0,0,110), 0xA},
- {RTE_IPv4(224,0,0,111), 0xB},
- {RTE_IPv4(224,0,0,112), 0xC},
- {RTE_IPv4(224,0,0,113), 0xD},
- {RTE_IPv4(224,0,0,114), 0xE},
- {RTE_IPv4(224,0,0,115), 0xF},
+ {RTE_IPV4(224,0,0,101), 0x1},
+ {RTE_IPV4(224,0,0,102), 0x2},
+ {RTE_IPV4(224,0,0,103), 0x3},
+ {RTE_IPV4(224,0,0,104), 0x4},
+ {RTE_IPV4(224,0,0,105), 0x5},
+ {RTE_IPV4(224,0,0,106), 0x6},
+ {RTE_IPV4(224,0,0,107), 0x7},
+ {RTE_IPV4(224,0,0,108), 0x8},
+ {RTE_IPV4(224,0,0,109), 0x9},
+ {RTE_IPV4(224,0,0,110), 0xA},
+ {RTE_IPV4(224,0,0,111), 0xB},
+ {RTE_IPV4(224,0,0,112), 0xC},
+ {RTE_IPV4(224,0,0,113), 0xD},
+ {RTE_IPV4(224,0,0,114), 0xE},
+ {RTE_IPV4(224,0,0,115), 0xF},
};
#define N_MCAST_GROUPS \
diff --git a/examples/l3fwd-acl/main.c b/examples/l3fwd-acl/main.c
index 40ab5a5..09b7c38 100644
--- a/examples/l3fwd-acl/main.c
+++ b/examples/l3fwd-acl/main.c
@@ -901,7 +901,7 @@ struct acl_search_t {
GET_CB_FIELD(in, d, 0, UINT8_MAX, '/');
GET_CB_FIELD(in, m, 0, sizeof(uint32_t) * CHAR_BIT, 0);
- addr[0] = RTE_IPv4(a, b, c, d);
+ addr[0] = RTE_IPV4(a, b, c, d);
mask_len[0] = m;
return 0;
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index d72a01e..641d402 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -258,10 +258,10 @@ struct ipv6_l3fwd_route {
};
static struct ipv4_l3fwd_route ipv4_l3fwd_route_array[] = {
- {{RTE_IPv4(100,10,0,1), RTE_IPv4(200,10,0,1), 101, 11, IPPROTO_TCP}, 0},
- {{RTE_IPv4(100,20,0,2), RTE_IPv4(200,20,0,2), 102, 12, IPPROTO_TCP}, 1},
- {{RTE_IPv4(100,30,0,3), RTE_IPv4(200,30,0,3), 103, 13, IPPROTO_TCP}, 2},
- {{RTE_IPv4(100,40,0,4), RTE_IPv4(200,40,0,4), 104, 14, IPPROTO_TCP}, 3},
+ {{RTE_IPV4(100,10,0,1), RTE_IPV4(200,10,0,1), 101, 11, IPPROTO_TCP}, 0},
+ {{RTE_IPV4(100,20,0,2), RTE_IPV4(200,20,0,2), 102, 12, IPPROTO_TCP}, 1},
+ {{RTE_IPV4(100,30,0,3), RTE_IPV4(200,30,0,3), 103, 13, IPPROTO_TCP}, 2},
+ {{RTE_IPV4(100,40,0,4), RTE_IPV4(200,40,0,4), 104, 14, IPPROTO_TCP}, 3},
};
static struct ipv6_l3fwd_route ipv6_l3fwd_route_array[] = {
@@ -300,14 +300,14 @@ struct ipv4_l3fwd_route {
};
static struct ipv4_l3fwd_route ipv4_l3fwd_route_array[] = {
- {RTE_IPv4(1,1,1,0), 24, 0},
- {RTE_IPv4(2,1,1,0), 24, 1},
- {RTE_IPv4(3,1,1,0), 24, 2},
- {RTE_IPv4(4,1,1,0), 24, 3},
- {RTE_IPv4(5,1,1,0), 24, 4},
- {RTE_IPv4(6,1,1,0), 24, 5},
- {RTE_IPv4(7,1,1,0), 24, 6},
- {RTE_IPv4(8,1,1,0), 24, 7},
+ {RTE_IPV4(1,1,1,0), 24, 0},
+ {RTE_IPV4(2,1,1,0), 24, 1},
+ {RTE_IPV4(3,1,1,0), 24, 2},
+ {RTE_IPV4(4,1,1,0), 24, 3},
+ {RTE_IPV4(5,1,1,0), 24, 4},
+ {RTE_IPV4(6,1,1,0), 24, 5},
+ {RTE_IPV4(7,1,1,0), 24, 6},
+ {RTE_IPV4(8,1,1,0), 24, 7},
};
#define IPV4_L3FWD_NUM_ROUTES \
diff --git a/examples/l3fwd-vf/main.c b/examples/l3fwd-vf/main.c
index 0ef469c..9594867 100644
--- a/examples/l3fwd-vf/main.c
+++ b/examples/l3fwd-vf/main.c
@@ -201,10 +201,10 @@ struct l3fwd_route {
};
static struct l3fwd_route l3fwd_route_array[] = {
- {{RTE_IPv4(100,10,0,1), RTE_IPv4(200,10,0,1), 101, 11, IPPROTO_TCP}, 0},
- {{RTE_IPv4(100,20,0,2), RTE_IPv4(200,20,0,2), 102, 12, IPPROTO_TCP}, 1},
- {{RTE_IPv4(100,30,0,3), RTE_IPv4(200,30,0,3), 103, 13, IPPROTO_TCP}, 2},
- {{RTE_IPv4(100,40,0,4), RTE_IPv4(200,40,0,4), 104, 14, IPPROTO_TCP}, 3},
+ {{RTE_IPV4(100,10,0,1), RTE_IPV4(200,10,0,1), 101, 11, IPPROTO_TCP}, 0},
+ {{RTE_IPV4(100,20,0,2), RTE_IPV4(200,20,0,2), 102, 12, IPPROTO_TCP}, 1},
+ {{RTE_IPV4(100,30,0,3), RTE_IPV4(200,30,0,3), 103, 13, IPPROTO_TCP}, 2},
+ {{RTE_IPV4(100,40,0,4), RTE_IPV4(200,40,0,4), 104, 14, IPPROTO_TCP}, 3},
};
typedef struct rte_hash lookup_struct_t;
@@ -234,14 +234,14 @@ struct l3fwd_route {
};
static struct l3fwd_route l3fwd_route_array[] = {
- {RTE_IPv4(1,1,1,0), 24, 0},
- {RTE_IPv4(2,1,1,0), 24, 1},
- {RTE_IPv4(3,1,1,0), 24, 2},
- {RTE_IPv4(4,1,1,0), 24, 3},
- {RTE_IPv4(5,1,1,0), 24, 4},
- {RTE_IPv4(6,1,1,0), 24, 5},
- {RTE_IPv4(7,1,1,0), 24, 6},
- {RTE_IPv4(8,1,1,0), 24, 7},
+ {RTE_IPV4(1,1,1,0), 24, 0},
+ {RTE_IPV4(2,1,1,0), 24, 1},
+ {RTE_IPV4(3,1,1,0), 24, 2},
+ {RTE_IPV4(4,1,1,0), 24, 3},
+ {RTE_IPV4(5,1,1,0), 24, 4},
+ {RTE_IPV4(6,1,1,0), 24, 5},
+ {RTE_IPV4(7,1,1,0), 24, 6},
+ {RTE_IPV4(8,1,1,0), 24, 7},
};
#define L3FWD_NUM_ROUTES \
diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index 2911bbe..6d3c6cd 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -99,10 +99,10 @@ struct ipv6_l3fwd_em_route {
};
static struct ipv4_l3fwd_em_route ipv4_l3fwd_em_route_array[] = {
- {{RTE_IPv4(101, 0, 0, 0), RTE_IPv4(100, 10, 0, 1), 101, 11, IPPROTO_TCP}, 0},
- {{RTE_IPv4(201, 0, 0, 0), RTE_IPv4(200, 20, 0, 1), 102, 12, IPPROTO_TCP}, 1},
- {{RTE_IPv4(111, 0, 0, 0), RTE_IPv4(100, 30, 0, 1), 101, 11, IPPROTO_TCP}, 2},
- {{RTE_IPv4(211, 0, 0, 0), RTE_IPv4(200, 40, 0, 1), 102, 12, IPPROTO_TCP}, 3},
+ {{RTE_IPV4(101, 0, 0, 0), RTE_IPV4(100, 10, 0, 1), 101, 11, IPPROTO_TCP}, 0},
+ {{RTE_IPV4(201, 0, 0, 0), RTE_IPV4(200, 20, 0, 1), 102, 12, IPPROTO_TCP}, 1},
+ {{RTE_IPV4(111, 0, 0, 0), RTE_IPV4(100, 30, 0, 1), 101, 11, IPPROTO_TCP}, 2},
+ {{RTE_IPV4(211, 0, 0, 0), RTE_IPV4(200, 40, 0, 1), 102, 12, IPPROTO_TCP}, 3},
};
static struct ipv6_l3fwd_em_route ipv6_l3fwd_em_route_array[] = {
@@ -426,19 +426,19 @@ struct ipv6_l3fwd_em_route {
switch (i & (NUMBER_PORT_USED - 1)) {
case 0:
entry = ipv4_l3fwd_em_route_array[0];
- entry.key.ip_dst = RTE_IPv4(101, c, b, a);
+ entry.key.ip_dst = RTE_IPV4(101, c, b, a);
break;
case 1:
entry = ipv4_l3fwd_em_route_array[1];
- entry.key.ip_dst = RTE_IPv4(201, c, b, a);
+ entry.key.ip_dst = RTE_IPV4(201, c, b, a);
break;
case 2:
entry = ipv4_l3fwd_em_route_array[2];
- entry.key.ip_dst = RTE_IPv4(111, c, b, a);
+ entry.key.ip_dst = RTE_IPV4(111, c, b, a);
break;
case 3:
entry = ipv4_l3fwd_em_route_array[3];
- entry.key.ip_dst = RTE_IPv4(211, c, b, a);
+ entry.key.ip_dst = RTE_IPV4(211, c, b, a);
break;
};
convert_ipv4_5tuple(&entry.key, &newkey);
diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index 6bfc3be..b5ffd6a 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -43,14 +43,14 @@ struct ipv6_l3fwd_lpm_route {
/* 192.18.0.0/16 are set aside for RFC2544 benchmarking. */
static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
- {RTE_IPv4(192, 18, 0, 0), 24, 0},
- {RTE_IPv4(192, 18, 1, 0), 24, 1},
- {RTE_IPv4(192, 18, 2, 0), 24, 2},
- {RTE_IPv4(192, 18, 3, 0), 24, 3},
- {RTE_IPv4(192, 18, 4, 0), 24, 4},
- {RTE_IPv4(192, 18, 5, 0), 24, 5},
- {RTE_IPv4(192, 18, 6, 0), 24, 6},
- {RTE_IPv4(192, 18, 7, 0), 24, 7},
+ {RTE_IPV4(192, 18, 0, 0), 24, 0},
+ {RTE_IPV4(192, 18, 1, 0), 24, 1},
+ {RTE_IPV4(192, 18, 2, 0), 24, 2},
+ {RTE_IPV4(192, 18, 3, 0), 24, 3},
+ {RTE_IPV4(192, 18, 4, 0), 24, 4},
+ {RTE_IPV4(192, 18, 5, 0), 24, 5},
+ {RTE_IPV4(192, 18, 6, 0), 24, 6},
+ {RTE_IPV4(192, 18, 7, 0), 24, 7},
};
/* 2001:0200::/48 is IANA reserved range for IPv6 benchmarking (RFC5180) */
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 3640579..19b826e 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -380,10 +380,10 @@ struct ipv6_l3fwd_route {
};
static struct ipv4_l3fwd_route ipv4_l3fwd_route_array[] = {
- {{RTE_IPv4(101, 0, 0, 0), RTE_IPv4(100, 10, 0, 1), 101, 11, IPPROTO_TCP}, 0},
- {{RTE_IPv4(201, 0, 0, 0), RTE_IPv4(200, 20, 0, 1), 102, 12, IPPROTO_TCP}, 1},
- {{RTE_IPv4(111, 0, 0, 0), RTE_IPv4(100, 30, 0, 1), 101, 11, IPPROTO_TCP}, 2},
- {{RTE_IPv4(211, 0, 0, 0), RTE_IPv4(200, 40, 0, 1), 102, 12, IPPROTO_TCP}, 3},
+ {{RTE_IPV4(101, 0, 0, 0), RTE_IPV4(100, 10, 0, 1), 101, 11, IPPROTO_TCP}, 0},
+ {{RTE_IPV4(201, 0, 0, 0), RTE_IPV4(200, 20, 0, 1), 102, 12, IPPROTO_TCP}, 1},
+ {{RTE_IPV4(111, 0, 0, 0), RTE_IPV4(100, 30, 0, 1), 101, 11, IPPROTO_TCP}, 2},
+ {{RTE_IPV4(211, 0, 0, 0), RTE_IPV4(200, 40, 0, 1), 102, 12, IPPROTO_TCP}, 3},
};
static struct ipv6_l3fwd_route ipv6_l3fwd_route_array[] = {
@@ -503,14 +503,14 @@ struct ipv6_l3fwd_route {
};
static struct ipv4_l3fwd_route ipv4_l3fwd_route_array[] = {
- {RTE_IPv4(1, 1, 1, 0), 24, 0},
- {RTE_IPv4(2, 1, 1, 0), 24, 1},
- {RTE_IPv4(3, 1, 1, 0), 24, 2},
- {RTE_IPv4(4, 1, 1, 0), 24, 3},
- {RTE_IPv4(5, 1, 1, 0), 24, 4},
- {RTE_IPv4(6, 1, 1, 0), 24, 5},
- {RTE_IPv4(7, 1, 1, 0), 24, 6},
- {RTE_IPv4(8, 1, 1, 0), 24, 7},
+ {RTE_IPV4(1, 1, 1, 0), 24, 0},
+ {RTE_IPV4(2, 1, 1, 0), 24, 1},
+ {RTE_IPV4(3, 1, 1, 0), 24, 2},
+ {RTE_IPV4(4, 1, 1, 0), 24, 3},
+ {RTE_IPV4(5, 1, 1, 0), 24, 4},
+ {RTE_IPV4(6, 1, 1, 0), 24, 5},
+ {RTE_IPV4(7, 1, 1, 0), 24, 6},
+ {RTE_IPV4(8, 1, 1, 0), 24, 7},
};
static struct ipv6_l3fwd_route ipv6_l3fwd_route_array[] = {
@@ -3145,19 +3145,19 @@ static void convert_ipv6_5tuple(struct ipv6_5tuple *key1,
switch (i & (NUMBER_PORT_USED - 1)) {
case 0:
entry = ipv4_l3fwd_route_array[0];
- entry.key.ip_dst = RTE_IPv4(101, c, b, a);
+ entry.key.ip_dst = RTE_IPV4(101, c, b, a);
break;
case 1:
entry = ipv4_l3fwd_route_array[1];
- entry.key.ip_dst = RTE_IPv4(201, c, b, a);
+ entry.key.ip_dst = RTE_IPV4(201, c, b, a);
break;
case 2:
entry = ipv4_l3fwd_route_array[2];
- entry.key.ip_dst = RTE_IPv4(111, c, b, a);
+ entry.key.ip_dst = RTE_IPV4(111, c, b, a);
break;
case 3:
entry = ipv4_l3fwd_route_array[3];
- entry.key.ip_dst = RTE_IPv4(211, c, b, a);
+ entry.key.ip_dst = RTE_IPV4(211, c, b, a);
break;
};
convert_ipv4_5tuple(&entry.key, &newkey);
diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h
index 9b1944b..ae3b7e7 100644
--- a/lib/librte_net/rte_ip.h
+++ b/lib/librte_net/rte_ip.h
@@ -42,7 +42,7 @@ struct rte_ipv4_hdr {
} __attribute__((__packed__));
/** Create IPv4 address */
-#define RTE_IPv4(a, b, c, d) ((uint32_t)(((a) & 0xff) << 24) | \
+#define RTE_IPV4(a, b, c, d) ((uint32_t)(((a) & 0xff) << 24) | \
(((b) & 0xff) << 16) | \
(((c) & 0xff) << 8) | \
((d) & 0xff))
@@ -84,9 +84,9 @@ struct rte_ipv4_hdr {
* IPv4 Multicast-related macros
*/
#define RTE_IPV4_MIN_MCAST \
- RTE_IPv4(224, 0, 0, 0) /**< Minimal IPv4-multicast address */
+ RTE_IPV4(224, 0, 0, 0) /**< Minimal IPv4-multicast address */
#define RTE_IPV4_MAX_MCAST \
- RTE_IPv4(239, 255, 255, 255) /**< Maximum IPv4 multicast address */
+ RTE_IPV4(239, 255, 255, 255) /**< Maximum IPv4 multicast address */
#define RTE_IS_IPV4_MCAST(x) \
((x) >= RTE_IPV4_MIN_MCAST && (x) <= RTE_IPV4_MAX_MCAST)
--
1.8.3.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH 4/5] replace RTE_ETHER_TYPE_IPv4 with uppercase RTE_ETHER_TYPE_IPV4
2019-05-29 11:29 [dpdk-dev] [PATCH 1/5] test/table: remove duplicate macro David Marchand
2019-05-29 11:29 ` [dpdk-dev] [PATCH 2/5] net/tap: revert changes on rte_ prefixing David Marchand
2019-05-29 11:29 ` [dpdk-dev] [PATCH 3/5] replace RTE_IPv4 with uppercase RTE_IPV4 David Marchand
@ 2019-05-29 11:29 ` David Marchand
2019-05-29 14:26 ` Olivier Matz
2019-05-29 11:29 ` [dpdk-dev] [PATCH 5/5] replace RTE_ETHER_TYPE_IPv6 with uppercase RTE_ETHER_TYPE_IPV6 David Marchand
2019-05-29 14:25 ` [dpdk-dev] [PATCH 1/5] test/table: remove duplicate macro Olivier Matz
4 siblings, 1 reply; 13+ messages in thread
From: David Marchand @ 2019-05-29 11:29 UTC (permalink / raw)
To: dev
Cc: ferruh.yigit, thomas, olivier.matz, maxime.coquelin, stephen,
Adrien Mazarguil, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger,
Chas Williams, Cristian Dumitrescu, Marko Kovacevic, Ori Kam,
Bruce Richardson, Pablo de Lara, Radu Nicolau, Akhil Goyal,
Tomasz Kantecki, John McNamara, Ajit Khaparde, Somnath Kotur,
Rahul Lakkireddy, Hemant Agrawal, Shreyansh Jain, John Daley,
Hyong Youb Kim, Beilei Xing, Qi Zhang, Konstantin Ananyev,
Shahaf Shuler, Yongseok Koh, Rasesh Mody, Shahed Shaikh,
Keith Wiles, Declan Doherty, David Hunt, Harry van Haaren,
Xiaoyun Li, Nikhil Rao, Jerin Jacob, Tiwei Bie, Zhihong Wang
Since we change this macro, we might as well avoid triggering complaints
from checkpatch because of mixed case.
old=RTE_ETHER_TYPE_IPv4
new=RTE_ETHER_TYPE_IPV4
git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
app/test-pmd/cmdline_flow.c | 20 ++++++++++----------
app/test-pmd/csumonly.c | 18 +++++++++---------
app/test-pmd/flowgen.c | 2 +-
app/test-pmd/icmpecho.c | 4 ++--
app/test-pmd/txonly.c | 2 +-
app/test/packet_burst_generator.c | 6 +++---
app/test/test_flow_classify.c | 6 +++---
app/test/test_link_bonding.c | 14 +++++++-------
app/test/test_pmd_perf.c | 2 +-
app/test/test_sched.c | 2 +-
doc/guides/sample_app_ug/ipv4_multicast.rst | 2 +-
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bonding/rte_eth_bond_alb.c | 2 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 8 ++++----
drivers/net/cxgbe/cxgbe_flow.c | 2 +-
drivers/net/dpaa/dpaa_rxtx.c | 4 ++--
drivers/net/e1000/igb_ethdev.c | 2 +-
drivers/net/e1000/igb_flow.c | 2 +-
drivers/net/enic/enic_flow.c | 2 +-
drivers/net/i40e/i40e_ethdev.c | 2 +-
drivers/net/i40e/i40e_fdir.c | 4 ++--
drivers/net/i40e/i40e_flow.c | 6 +++---
drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
drivers/net/qede/qede_filter.c | 6 +++---
drivers/net/qede/qede_rxtx.c | 2 +-
drivers/net/tap/rte_eth_tap.c | 2 +-
examples/bond/main.c | 4 ++--
examples/ip_fragmentation/main.c | 4 ++--
examples/ip_reassembly/main.c | 2 +-
examples/ipsec-secgw/ipsec-secgw.c | 4 ++--
examples/ipv4_multicast/main.c | 2 +-
examples/l2fwd-crypto/main.c | 2 +-
examples/l3fwd-power/main.c | 2 +-
examples/l3fwd/l3fwd_em.c | 2 +-
examples/l3fwd/l3fwd_lpm.c | 2 +-
examples/performance-thread/l3fwd-thread/main.c | 2 +-
examples/tep_termination/vxlan.c | 6 +++---
examples/tep_termination/vxlan_setup.c | 2 +-
lib/librte_eventdev/rte_event_eth_rx_adapter.c | 4 ++--
lib/librte_net/rte_arp.c | 2 +-
lib/librte_net/rte_ether.h | 2 +-
lib/librte_net/rte_net.c | 8 ++++----
lib/librte_pipeline/rte_table_action.c | 10 +++++-----
lib/librte_vhost/virtio_net.c | 2 +-
46 files changed, 97 insertions(+), 97 deletions(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index a3bbadd..a0fa748 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3682,7 +3682,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
if (l2_encap_conf.select_vlan)
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
else if (l2_encap_conf.select_ipv4)
- eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(eth.dst.addr_bytes,
@@ -3693,7 +3693,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
header += sizeof(eth);
if (l2_encap_conf.select_vlan) {
if (l2_encap_conf.select_ipv4)
- vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(header, &vlan, sizeof(vlan));
@@ -3817,7 +3817,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
if (mplsogre_encap_conf.select_vlan)
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
else if (mplsogre_encap_conf.select_ipv4)
- eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(eth.dst.addr_bytes,
@@ -3828,7 +3828,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
header += sizeof(eth);
if (mplsogre_encap_conf.select_vlan) {
if (mplsogre_encap_conf.select_ipv4)
- vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(header, &vlan, sizeof(vlan));
@@ -3912,7 +3912,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
if (mplsogre_decap_conf.select_vlan)
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
else if (mplsogre_encap_conf.select_ipv4)
- eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(eth.dst.addr_bytes,
@@ -3923,7 +3923,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
header += sizeof(eth);
if (mplsogre_encap_conf.select_vlan) {
if (mplsogre_encap_conf.select_ipv4)
- vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(header, &vlan, sizeof(vlan));
@@ -4008,7 +4008,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
if (mplsoudp_encap_conf.select_vlan)
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
else if (mplsoudp_encap_conf.select_ipv4)
- eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(eth.dst.addr_bytes,
@@ -4019,7 +4019,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
header += sizeof(eth);
if (mplsoudp_encap_conf.select_vlan) {
if (mplsoudp_encap_conf.select_ipv4)
- vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(header, &vlan, sizeof(vlan));
@@ -4105,7 +4105,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
if (mplsoudp_decap_conf.select_vlan)
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
else if (mplsoudp_encap_conf.select_ipv4)
- eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(eth.dst.addr_bytes,
@@ -4116,7 +4116,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
header += sizeof(eth);
if (mplsoudp_encap_conf.select_vlan) {
if (mplsoudp_encap_conf.select_ipv4)
- vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(header, &vlan, sizeof(vlan));
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 105c7f2..3732fd1 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -92,7 +92,7 @@ struct simple_gre_hdr {
static uint16_t
get_udptcp_checksum(void *l3_hdr, void *l4_hdr, uint16_t ethertype)
{
- if (ethertype == _htons(RTE_ETHER_TYPE_IPv4))
+ if (ethertype == _htons(RTE_ETHER_TYPE_IPV4))
return rte_ipv4_udptcp_cksum(l3_hdr, l4_hdr);
else /* assume ethertype == RTE_ETHER_TYPE_IPv6 */
return rte_ipv6_udptcp_cksum(l3_hdr, l4_hdr);
@@ -161,7 +161,7 @@ struct simple_gre_hdr {
}
switch (info->ethertype) {
- case _htons(RTE_ETHER_TYPE_IPv4):
+ case _htons(RTE_ETHER_TYPE_IPV4):
ipv4_hdr = (struct rte_ipv4_hdr *)
((char *)eth_hdr + info->l2_len);
parse_ipv4(ipv4_hdr, info);
@@ -238,7 +238,7 @@ struct simple_gre_hdr {
vxlan_gpe_len);
parse_ipv4(ipv4_hdr, info);
- info->ethertype = _htons(RTE_ETHER_TYPE_IPv4);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IPV4);
info->l2_len = 0;
} else if (vxlan_gpe_hdr->proto == RTE_VXLAN_GPE_TYPE_IPV6) {
@@ -290,7 +290,7 @@ struct simple_gre_hdr {
if (gre_hdr->flags & _htons(GRE_CHECKSUM_PRESENT))
gre_len += GRE_EXT_LEN;
- if (gre_hdr->proto == _htons(RTE_ETHER_TYPE_IPv4)) {
+ if (gre_hdr->proto == _htons(RTE_ETHER_TYPE_IPV4)) {
info->is_tunnel = 1;
info->outer_ethertype = info->ethertype;
info->outer_l2_len = info->l2_len;
@@ -300,7 +300,7 @@ struct simple_gre_hdr {
ipv4_hdr = (struct rte_ipv4_hdr *)((char *)gre_hdr + gre_len);
parse_ipv4(ipv4_hdr, info);
- info->ethertype = _htons(RTE_ETHER_TYPE_IPv4);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IPV4);
info->l2_len = 0;
} else if (gre_hdr->proto == _htons(RTE_ETHER_TYPE_IPv6)) {
@@ -353,7 +353,7 @@ struct simple_gre_hdr {
if (ip_version == 4) {
parse_ipv4(ipv4_hdr, info);
- info->ethertype = _htons(RTE_ETHER_TYPE_IPv4);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IPV4);
} else {
parse_ipv6(ipv6_hdr, info);
info->ethertype = _htons(RTE_ETHER_TYPE_IPv6);
@@ -388,7 +388,7 @@ struct simple_gre_hdr {
tso_segsz = info->tunnel_tso_segsz;
}
- if (info->ethertype == _htons(RTE_ETHER_TYPE_IPv4)) {
+ if (info->ethertype == _htons(RTE_ETHER_TYPE_IPV4)) {
ipv4_hdr = l3_hdr;
ipv4_hdr->hdr_checksum = 0;
@@ -464,7 +464,7 @@ struct simple_gre_hdr {
struct rte_udp_hdr *udp_hdr;
uint64_t ol_flags = 0;
- if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPv4)) {
+ if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPV4)) {
ipv4_hdr->hdr_checksum = 0;
ol_flags |= PKT_TX_OUTER_IPV4;
@@ -501,7 +501,7 @@ struct simple_gre_hdr {
/* do not recalculate udp cksum if it was 0 */
if (udp_hdr->dgram_cksum != 0) {
udp_hdr->dgram_cksum = 0;
- if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPv4))
+ if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPV4))
udp_hdr->dgram_cksum =
rte_ipv4_udptcp_cksum(ipv4_hdr, udp_hdr);
else
diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index 1e424a1..ade6fe5 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -173,7 +173,7 @@
eth_hdr = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
rte_ether_addr_copy(&cfg_ether_dst, ð_hdr->d_addr);
rte_ether_addr_copy(&cfg_ether_src, ð_hdr->s_addr);
- eth_hdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ eth_hdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
/* Initialize IP header. */
ip_hdr = (struct rte_ipv4_hdr *)(eth_hdr + 1);
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index c055fc9..2d359c9 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -360,7 +360,7 @@
}
if ((RTE_BE_TO_CPU_16(arp_h->arp_hardware) !=
RTE_ARP_HRD_ETHER) ||
- (arp_pro != RTE_ETHER_TYPE_IPv4) ||
+ (arp_pro != RTE_ETHER_TYPE_IPV4) ||
(arp_h->arp_hlen != 6) ||
(arp_h->arp_plen != 4)
) {
@@ -414,7 +414,7 @@
continue;
}
- if (eth_type != RTE_ETHER_TYPE_IPv4) {
+ if (eth_type != RTE_ETHER_TYPE_IPV4) {
rte_pktmbuf_free(pkt);
continue;
}
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index a37aa5a..10d641a 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -268,7 +268,7 @@
*/
rte_ether_addr_copy(&peer_eth_addrs[fs->peer_addr], ð_hdr.d_addr);
rte_ether_addr_copy(&ports[fs->tx_port].eth_addr, ð_hdr.s_addr);
- eth_hdr.ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ eth_hdr.ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
if (rte_mempool_get_bulk(mbp, (void **)pkts_burst,
nb_pkt_per_burst) == 0) {
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index 445c1df..cf22d18 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -82,7 +82,7 @@
uint32_t opcode)
{
arp_hdr->arp_hardware = rte_cpu_to_be_16(RTE_ARP_HRD_ETHER);
- arp_hdr->arp_protocol = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ arp_hdr->arp_protocol = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
arp_hdr->arp_hlen = RTE_ETHER_ADDR_LEN;
arp_hdr->arp_plen = sizeof(uint32_t);
arp_hdr->arp_opcode = rte_cpu_to_be_16(opcode);
@@ -324,7 +324,7 @@
pkt->l2_len = eth_hdr_size;
if (ipv4) {
- pkt->vlan_tci = RTE_ETHER_TYPE_IPv4;
+ pkt->vlan_tci = RTE_ETHER_TYPE_IPV4;
pkt->l3_len = sizeof(struct rte_ipv4_hdr);
} else {
pkt->vlan_tci = RTE_ETHER_TYPE_IPv6;
@@ -445,7 +445,7 @@
pkt->l2_len = eth_hdr_size;
if (ipv4) {
- pkt->vlan_tci = RTE_ETHER_TYPE_IPv4;
+ pkt->vlan_tci = RTE_ETHER_TYPE_IPV4;
pkt->l3_len = sizeof(struct rte_ipv4_hdr);
} else {
pkt->vlan_tci = RTE_ETHER_TYPE_IPv6;
diff --git a/app/test/test_flow_classify.c b/app/test/test_flow_classify.c
index cbbff31..6bbaad3 100644
--- a/app/test/test_flow_classify.c
+++ b/app/test/test_flow_classify.c
@@ -506,7 +506,7 @@ struct flow_classifier_acl {
printf("Set up IPv4 UDP traffic\n");
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
- (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPv4, 0, 0);
+ (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPV4, 0, 0);
pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
printf("ETH pktlen %u\n", pktlen);
@@ -543,7 +543,7 @@ struct flow_classifier_acl {
printf("Set up IPv4 TCP traffic\n");
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
- (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPv4, 0, 0);
+ (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPV4, 0, 0);
pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
printf("ETH pktlen %u\n", pktlen);
@@ -580,7 +580,7 @@ struct flow_classifier_acl {
printf("Set up IPv4 SCTP traffic\n");
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
- (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPv4, 0, 0);
+ (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPV4, 0, 0);
pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
printf("ETH pktlen %u\n", pktlen);
diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index a4d52a7..a180899 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -1272,7 +1272,7 @@ struct link_bonding_unittest_params {
void *ip_hdr;
if (ipv4)
- ether_type = RTE_ETHER_TYPE_IPv4;
+ ether_type = RTE_ETHER_TYPE_IPV4;
else
ether_type = RTE_ETHER_TYPE_IPv6;
@@ -2047,7 +2047,7 @@ struct link_bonding_unittest_params {
initialize_eth_header(test_params->pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
(struct rte_ether_addr *)dst_mac_0,
- RTE_ETHER_TYPE_IPv4, 0, 0);
+ RTE_ETHER_TYPE_IPV4, 0, 0);
pktlen = initialize_udp_header(test_params->pkt_udp_hdr, src_port,
dst_port_0, 16);
pktlen = initialize_ipv4_header(test_params->pkt_ipv4_hdr, src_addr,
@@ -2584,7 +2584,7 @@ struct link_bonding_unittest_params {
initialize_eth_header(test_params->pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
(struct rte_ether_addr *)dst_mac_0,
- RTE_ETHER_TYPE_IPv4, 0, 0);
+ RTE_ETHER_TYPE_IPV4, 0, 0);
pktlen = initialize_udp_header(test_params->pkt_udp_hdr, src_port,
dst_port_0, 16);
pktlen = initialize_ipv4_header(test_params->pkt_ipv4_hdr, src_addr,
@@ -2600,7 +2600,7 @@ struct link_bonding_unittest_params {
initialize_eth_header(test_params->pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
(struct rte_ether_addr *)dst_mac_1,
- RTE_ETHER_TYPE_IPv4, 0, 0);
+ RTE_ETHER_TYPE_IPV4, 0, 0);
/* Generate a burst 2 of packets to transmit */
TEST_ASSERT_EQUAL(generate_packet_burst(test_params->mbuf_pool, &pkts_burst[1][0],
@@ -3426,7 +3426,7 @@ struct link_bonding_unittest_params {
initialize_eth_header(test_params->pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
(struct rte_ether_addr *)dst_mac_0,
- RTE_ETHER_TYPE_IPv4, 0, 0);
+ RTE_ETHER_TYPE_IPV4, 0, 0);
pktlen = initialize_udp_header(test_params->pkt_udp_hdr, src_port,
dst_port_0, 16);
@@ -4012,12 +4012,12 @@ struct link_bonding_unittest_params {
initialize_eth_header(test_params->pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
(struct rte_ether_addr *)dst_mac_0,
- RTE_ETHER_TYPE_IPv4, 0, 0);
+ RTE_ETHER_TYPE_IPV4, 0, 0);
} else {
initialize_eth_header(test_params->pkt_eth_hdr,
(struct rte_ether_addr *)test_params->default_slave_mac,
(struct rte_ether_addr *)dst_mac_0,
- RTE_ETHER_TYPE_IPv4, 0, 0);
+ RTE_ETHER_TYPE_IPV4, 0, 0);
}
pktlen = initialize_udp_header(test_params->pkt_udp_hdr, src_port,
dst_port_0, 16);
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index 5e2dad9..4f9fc0d 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -192,7 +192,7 @@ enum {
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
- (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPv4, 0, 0);
+ (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPV4, 0, 0);
pktlen = initialize_ipv4_header(&pkt_ipv4_hdr,
IPV4_ADDR(10, 0, 0, 1),
diff --git a/app/test/test_sched.c b/app/test/test_sched.c
index 5873ee4..49bb9ea 100644
--- a/app/test/test_sched.c
+++ b/app/test/test_sched.c
@@ -95,7 +95,7 @@
vlan1->vlan_tci = rte_cpu_to_be_16(SUBPORT);
vlan2->vlan_tci = rte_cpu_to_be_16(PIPE);
- eth_hdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ eth_hdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
ip_hdr->dst_addr = RTE_IPV4(0,0,TC,QUEUE);
diff --git a/doc/guides/sample_app_ug/ipv4_multicast.rst b/doc/guides/sample_app_ug/ipv4_multicast.rst
index ea7902b..8923a7f 100644
--- a/doc/guides/sample_app_ug/ipv4_multicast.rst
+++ b/doc/guides/sample_app_ug/ipv4_multicast.rst
@@ -229,7 +229,7 @@ The actual packet transmission is done in the mcast_send_pkt() function:
rte_ether_addr_copy(dest_addr, ðdr->d_addr);
rte_ether_addr_copy(&ports_eth_addr[port], ðdr->s_addr);
- ethdr->ether_type = rte_be_to_cpu_16(RTE_ETHER_TYPE_IPv4);
+ ethdr->ether_type = rte_be_to_cpu_16(RTE_ETHER_TYPE_IPV4);
/* Put new packet into the output queue */
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index b0244d6..42738b8 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1796,7 +1796,7 @@ static int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
int match = 0;
*ret = 0;
- if (efilter->ether_type == RTE_ETHER_TYPE_IPv4 ||
+ if (efilter->ether_type == RTE_ETHER_TYPE_IPV4 ||
efilter->ether_type == RTE_ETHER_TYPE_IPv6) {
PMD_DRV_LOG(ERR, "invalid ether_type(0x%04x) in"
" ethertype filter.", efilter->ether_type);
diff --git a/drivers/net/bonding/rte_eth_bond_alb.c b/drivers/net/bonding/rte_eth_bond_alb.c
index a1c577b..712c3c4 100644
--- a/drivers/net/bonding/rte_eth_bond_alb.c
+++ b/drivers/net/bonding/rte_eth_bond_alb.c
@@ -233,7 +233,7 @@ void bond_mode_alb_arp_recv(struct rte_ether_hdr *eth_h, uint16_t offset,
arp_h->arp_data.arp_tip = client_info->cli_ip;
arp_h->arp_hardware = rte_cpu_to_be_16(RTE_ARP_HRD_ETHER);
- arp_h->arp_protocol = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ arp_h->arp_protocol = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
arp_h->arp_hlen = RTE_ETHER_ADDR_LEN;
arp_h->arp_plen = sizeof(uint32_t);
arp_h->arp_opcode = rte_cpu_to_be_16(RTE_ARP_OP_REPLY);
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index 7087bc0..dbed185 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -607,7 +607,7 @@ struct client_stats_t {
strlcpy(buf, info, 16);
#endif
- if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4)) {
+ if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4)) {
ipv4_h = (struct rte_ipv4_hdr *)((char *)(eth_h + 1) + offset);
ipv4_addr_to_dot(ipv4_h->src_addr, src_ip, MaxIPv4String);
#ifdef RTE_LIBRTE_BOND_DEBUG_ALB
@@ -653,7 +653,7 @@ struct client_stats_t {
bond_mode_alb_arp_recv(eth_h, offset, internals);
}
#if defined(RTE_LIBRTE_BOND_DEBUG_ALB) || defined(RTE_LIBRTE_BOND_DEBUG_ALB_L1)
- else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4))
+ else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4))
mode6_debug("RX IPv4:", eth_h, bufs[i]->port, &burstnumberRX);
#endif
}
@@ -811,7 +811,7 @@ struct client_stats_t {
vlan_offset = get_vlan_offset(eth_hdr, &proto);
- if (rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4) == proto) {
+ if (rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4) == proto) {
struct rte_ipv4_hdr *ipv4_hdr = (struct rte_ipv4_hdr *)
((char *)(eth_hdr + 1) + vlan_offset);
l3hash = ipv4_hash(ipv4_hdr);
@@ -851,7 +851,7 @@ struct client_stats_t {
l3hash = 0;
l4hash = 0;
- if (rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4) == proto) {
+ if (rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4) == proto) {
struct rte_ipv4_hdr *ipv4_hdr = (struct rte_ipv4_hdr *)
((char *)(eth_hdr + 1) + vlan_offset);
size_t ip_hdr_offset;
diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index 4f23468..07960fd 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -233,7 +233,7 @@
item, "ttl/tos are not supported");
fs->type = FILTER_TYPE_IPV4;
- CXGBE_FILL_FS(RTE_ETHER_TYPE_IPv4, 0xffff, ethtype);
+ CXGBE_FILL_FS(RTE_ETHER_TYPE_IPV4, 0xffff, ethtype);
if (!val)
return 0; /* ipv4 wild card */
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 828b3b5..441a3dd 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -222,7 +222,7 @@ static inline void dpaa_checksum(struct rte_mbuf *mbuf)
struct rte_tcp_hdr *tcp_hdr = (struct rte_tcp_hdr *)(l3_hdr +
mbuf->l3_len);
tcp_hdr->cksum = 0;
- if (eth_hdr->ether_type == htons(RTE_ETHER_TYPE_IPv4))
+ if (eth_hdr->ether_type == htons(RTE_ETHER_TYPE_IPV4))
tcp_hdr->cksum = rte_ipv4_udptcp_cksum(ipv4_hdr,
tcp_hdr);
else /* assume ethertype == RTE_ETHER_TYPE_IPv6 */
@@ -233,7 +233,7 @@ static inline void dpaa_checksum(struct rte_mbuf *mbuf)
struct rte_udp_hdr *udp_hdr = (struct rte_udp_hdr *)(l3_hdr +
mbuf->l3_len);
udp_hdr->dgram_cksum = 0;
- if (eth_hdr->ether_type == htons(RTE_ETHER_TYPE_IPv4))
+ if (eth_hdr->ether_type == htons(RTE_ETHER_TYPE_IPV4))
udp_hdr->dgram_cksum = rte_ipv4_udptcp_cksum(ipv4_hdr,
udp_hdr);
else /* assume ethertype == RTE_ETHER_TYPE_IPv6 */
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index bd1c64c..064d676 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -4746,7 +4746,7 @@ static void igbvf_set_vfta_all(struct rte_eth_dev *dev, bool on)
uint32_t etqf = 0;
int ret;
- if (filter->ether_type == RTE_ETHER_TYPE_IPv4 ||
+ if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
filter->ether_type == RTE_ETHER_TYPE_IPv6) {
PMD_DRV_LOG(ERR, "unsupported ether_type(0x%04x) in"
" ethertype filter.", filter->ether_type);
diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c
index 3429861..c34e25d 100644
--- a/drivers/net/e1000/igb_flow.c
+++ b/drivers/net/e1000/igb_flow.c
@@ -700,7 +700,7 @@
}
}
- if (filter->ether_type == RTE_ETHER_TYPE_IPv4 ||
+ if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
filter->ether_type == RTE_ETHER_TYPE_IPv6) {
memset(filter, 0, sizeof(struct rte_eth_ethertype_filter));
rte_flow_error_set(error, EINVAL,
diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index d188e58..7b015ee 100644
--- a/drivers/net/enic/enic_flow.c
+++ b/drivers/net/enic/enic_flow.c
@@ -609,7 +609,7 @@ struct enic_action_cap {
arg->l3_proto_off = *off + offsetof(struct rte_ipv4_hdr, next_proto_id);
return copy_inner_common(&arg->filter->u.generic_1, off,
arg->item->spec, mask, sizeof(struct rte_ipv4_hdr),
- arg->l2_proto_off, rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4), 2);
+ arg->l2_proto_off, rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4), 2);
}
static int
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f4d778e..162858a 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -9997,7 +9997,7 @@ struct i40e_ethertype_filter *
PMD_DRV_LOG(ERR, "Invalid queue ID");
return -EINVAL;
}
- if (filter->ether_type == RTE_ETHER_TYPE_IPv4 ||
+ if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
filter->ether_type == RTE_ETHER_TYPE_IPv6) {
PMD_DRV_LOG(ERR,
"unsupported ether_type(0x%04x) in control packet filter.",
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index 3044e9d..f809f92 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -725,7 +725,7 @@ static int i40e_sw_fdir_filter_insert(struct i40e_pf *pf,
case RTE_ETH_FLOW_FRAG_IPV4:
ip = (struct rte_ipv4_hdr *)raw_pkt;
- *ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ *ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
ip->version_ihl = I40E_FDIR_IP_DEFAULT_VERSION_IHL;
/* set len to by default */
ip->total_length = rte_cpu_to_be_16(I40E_FDIR_IP_DEFAULT_LEN);
@@ -1009,7 +1009,7 @@ static int i40e_sw_fdir_filter_insert(struct i40e_pf *pf,
is_customized_pctype) {
ip = (struct rte_ipv4_hdr *)raw_pkt;
- *ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ *ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
ip->version_ihl = I40E_FDIR_IP_DEFAULT_VERSION_IHL;
/* set len to by default */
ip->total_length = rte_cpu_to_be_16(I40E_FDIR_IP_DEFAULT_LEN);
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index 8b2e297..f8ab046 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2035,7 +2035,7 @@ static int i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,
}
filter->ether_type = rte_be_to_cpu_16(eth_spec->type);
- if (filter->ether_type == RTE_ETHER_TYPE_IPv4 ||
+ if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
filter->ether_type == RTE_ETHER_TYPE_IPv6 ||
filter->ether_type == RTE_ETHER_TYPE_LLDP ||
filter->ether_type == outer_tpid) {
@@ -2507,7 +2507,7 @@ static int i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,
ether_type = rte_be_to_cpu_16(eth_spec->type);
if (next == RTE_FLOW_ITEM_TYPE_VLAN ||
- ether_type == RTE_ETHER_TYPE_IPv4 ||
+ ether_type == RTE_ETHER_TYPE_IPV4 ||
ether_type == RTE_ETHER_TYPE_IPv6 ||
ether_type == RTE_ETHER_TYPE_ARP ||
ether_type == outer_tpid) {
@@ -2552,7 +2552,7 @@ static int i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,
ether_type =
rte_be_to_cpu_16(vlan_spec->inner_type);
- if (ether_type == RTE_ETHER_TYPE_IPv4 ||
+ if (ether_type == RTE_ETHER_TYPE_IPV4 ||
ether_type == RTE_ETHER_TYPE_IPv6 ||
ether_type == RTE_ETHER_TYPE_ARP ||
ether_type == outer_tpid) {
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index fae93bb..b46d39a 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -6667,7 +6667,7 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
if (filter->queue >= IXGBE_MAX_RX_QUEUE_NUM)
return -EINVAL;
- if (filter->ether_type == RTE_ETHER_TYPE_IPv4 ||
+ if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
filter->ether_type == RTE_ETHER_TYPE_IPv6) {
PMD_DRV_LOG(ERR, "unsupported ether_type(0x%04x) in"
" ethertype filter.", filter->ether_type);
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index 23aba0a..def6283 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -887,7 +887,7 @@ const struct rte_flow_action *next_no_void_action(
return -rte_errno;
}
- if (filter->ether_type == RTE_ETHER_TYPE_IPv4 ||
+ if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
filter->ether_type == RTE_ETHER_TYPE_IPv6) {
memset(filter, 0, sizeof(struct rte_eth_ethertype_filter));
rte_flow_error_set(error, EINVAL,
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index d096b02..ffa2696 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1258,9 +1258,9 @@ struct field_modify_info modify_tcp[] = {
"neither eth nor vlan"
" header found");
if (vlan && !vlan->eth_proto)
- vlan->eth_proto = RTE_BE16(RTE_ETHER_TYPE_IPv4);
+ vlan->eth_proto = RTE_BE16(RTE_ETHER_TYPE_IPV4);
else if (eth && !eth->ether_type)
- eth->ether_type = RTE_BE16(RTE_ETHER_TYPE_IPv4);
+ eth->ether_type = RTE_BE16(RTE_ETHER_TYPE_IPV4);
if (!ipv4->version_ihl)
ipv4->version_ihl = MLX5_ENCAP_IPV4_VERSION |
MLX5_ENCAP_IPV4_IHL_MIN;
diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c
index 7bdc302..d01d675 100644
--- a/drivers/net/qede/qede_filter.c
+++ b/drivers/net/qede/qede_filter.c
@@ -221,7 +221,7 @@ void qede_fdir_dealloc_resc(struct rte_eth_dev *eth_dev)
case RTE_ETH_FLOW_NONFRAG_IPV4_TCP:
case RTE_ETH_FLOW_NONFRAG_IPV4_UDP:
/* fill the common ip header */
- arfs->tuple.eth_proto = RTE_ETHER_TYPE_IPv4;
+ arfs->tuple.eth_proto = RTE_ETHER_TYPE_IPV4;
arfs->tuple.dst_ipv4 = input->flow.ip4_flow.dst_ip;
arfs->tuple.src_ipv4 = input->flow.ip4_flow.src_ip;
arfs->tuple.ip_proto = next_proto[input->flow_type];
@@ -473,7 +473,7 @@ void qede_fdir_dealloc_resc(struct rte_eth_dev *eth_dev)
*ether_type = rte_cpu_to_be_16(arfs->tuple.eth_proto);
switch (arfs->tuple.eth_proto) {
- case RTE_ETHER_TYPE_IPv4:
+ case RTE_ETHER_TYPE_IPV4:
ip = (struct rte_ipv4_hdr *)raw_pkt;
ip->version_ihl = QEDE_FDIR_IP_DEFAULT_VERSION_IHL;
ip->total_length = sizeof(struct rte_ipv4_hdr);
@@ -1267,7 +1267,7 @@ static void qede_get_ecore_tunn_params(uint32_t filter, uint32_t *type,
flow->entry.tuple.src_ipv4 = spec->hdr.src_addr;
flow->entry.tuple.dst_ipv4 = spec->hdr.dst_addr;
flow->entry.tuple.eth_proto =
- RTE_ETHER_TYPE_IPv4;
+ RTE_ETHER_TYPE_IPV4;
}
break;
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index bb5f57d..a59e224 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -970,7 +970,7 @@ static inline uint32_t qede_rx_cqe_to_pkt_type_outer(struct rte_mbuf *m)
ethertype = rte_cpu_to_be_16(vlan_hdr->eth_proto);
}
- if (ethertype == RTE_ETHER_TYPE_IPv4) {
+ if (ethertype == RTE_ETHER_TYPE_IPV4) {
packet_type |= RTE_PTYPE_L3_IPV4;
ipv4_hdr = rte_pktmbuf_mtod_offset(m,
struct rte_ipv4_hdr *, len);
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index 896aae5..f535a3a 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -565,7 +565,7 @@ struct ipc_queues {
char *buff_data = rte_pktmbuf_mtod(seg, void *);
proto = (*buff_data & 0xf0);
pi.proto = (proto == 0x40) ?
- rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4) :
+ rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4) :
((proto == 0x60) ?
rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6) :
0x00);
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 9b9ed56..2e95ce4 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -404,7 +404,7 @@ static int lcore_main(__attribute__((unused)) void *arg1)
rte_eth_tx_burst(BOND_PORT, 0, NULL, 0);
}
}
- } else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4)) {
+ } else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4)) {
if (rte_spinlock_trylock(&global_flag_stru_p->lock) == 1) {
global_flag_stru_p->port_packets[2]++;
rte_spinlock_unlock(&global_flag_stru_p->lock);
@@ -485,7 +485,7 @@ static void cmd_obj_send_parsed(void *parsed_result,
arp_hdr = (struct rte_arp_hdr *)(
(char *)eth_hdr + sizeof(struct rte_ether_hdr));
arp_hdr->arp_hardware = rte_cpu_to_be_16(RTE_ARP_HRD_ETHER);
- arp_hdr->arp_protocol = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ arp_hdr->arp_protocol = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
arp_hdr->arp_hlen = RTE_ETHER_ADDR_LEN;
arp_hdr->arp_plen = sizeof(uint32_t);
arp_hdr->arp_opcode = rte_cpu_to_be_16(RTE_ARP_OP_REQUEST);
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 4f94129..01c30ee 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -362,7 +362,7 @@ struct rte_lpm6_config lpm6_config = {
rte_be_to_cpu_16(RTE_ETHER_TYPE_IPv6);
else
eth_hdr->ether_type =
- rte_be_to_cpu_16(RTE_ETHER_TYPE_IPv4);
+ rte_be_to_cpu_16(RTE_ETHER_TYPE_IPV4);
}
len += len2;
@@ -680,7 +680,7 @@ struct rte_lpm6_config lpm6_config = {
eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
ether_type = eth_hdr->ether_type;
- if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4))
+ if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4))
packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6))
packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 6624b19..10a3af6 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -362,7 +362,7 @@ struct rte_lpm6_config lpm6_config = {
dst_port = next_hop;
}
- eth_hdr->ether_type = rte_be_to_cpu_16(RTE_ETHER_TYPE_IPv4);
+ eth_hdr->ether_type = rte_be_to_cpu_16(RTE_ETHER_TYPE_IPV4);
} else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) {
/* if packet is IPv6 */
struct ipv6_extension_fragment *frag_hdr;
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index fd81b6c..601d45d 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -236,7 +236,7 @@ struct lcore_conf {
struct rte_ether_hdr *eth;
eth = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
- if (eth->ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4)) {
+ if (eth->ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4)) {
nlp = (uint8_t *)rte_pktmbuf_adj(pkt, RTE_ETHER_HDR_LEN);
nlp = RTE_PTR_ADD(nlp, offsetof(struct ip, ip_p));
if (*nlp == IPPROTO_ESP)
@@ -343,7 +343,7 @@ struct lcore_conf {
if ((pkt->ol_flags & PKT_TX_IP_CKSUM) == 0)
ip->ip_sum = rte_ipv4_cksum((struct rte_ipv4_hdr *)ip);
- ethhdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ ethhdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
} else {
pkt->ol_flags |= qconf->outbound.ipv6_offloads;
pkt->l3_len = sizeof(struct ip6_hdr);
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index e4410f5..72eaadc 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -280,7 +280,7 @@ struct mcast_group_params {
rte_ether_addr_copy(dest_addr, ðdr->d_addr);
rte_ether_addr_copy(&ports_eth_addr[port], ðdr->s_addr);
- ethdr->ether_type = rte_be_to_cpu_16(RTE_ETHER_TYPE_IPv4);
+ ethdr->ether_type = rte_be_to_cpu_16(RTE_ETHER_TYPE_IPV4);
/* Put new packet into the output queue */
len = qconf->tx_mbufs[port].len;
diff --git a/examples/l2fwd-crypto/main.c b/examples/l2fwd-crypto/main.c
index afc658e..e282cb7 100644
--- a/examples/l2fwd-crypto/main.c
+++ b/examples/l2fwd-crypto/main.c
@@ -396,7 +396,7 @@ struct l2fwd_crypto_statistics {
eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
- if (eth_hdr->ether_type != rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4))
+ if (eth_hdr->ether_type != rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4))
return -1;
ipdata_offset = sizeof(struct rte_ether_hdr);
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 641d402..1162f7e 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -624,7 +624,7 @@ static int is_done(void)
eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
ether_type = eth_hdr->ether_type;
- if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4))
+ if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4))
packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6))
packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index 6d3c6cd..f45a430 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -574,7 +574,7 @@ struct ipv6_l3fwd_em_route {
eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
ether_type = eth_hdr->ether_type;
l3 = (uint8_t *)eth_hdr + sizeof(struct rte_ether_hdr);
- if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4)) {
+ if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4)) {
ipv4_hdr = (struct rte_ipv4_hdr *)l3;
hdr_len = (ipv4_hdr->version_ihl & RTE_IPV4_HDR_IHL_MASK) *
RTE_IPV4_IHL_MULTIPLIER;
diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index b5ffd6a..c6491f6 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -386,7 +386,7 @@ struct ipv6_l3fwd_lpm_route {
eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
ether_type = eth_hdr->ether_type;
- if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4))
+ if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4))
packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6))
packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 19b826e..9d879b6 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -98,7 +98,7 @@
eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
ether_type = eth_hdr->ether_type;
- if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4))
+ if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4))
packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6))
packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
diff --git a/examples/tep_termination/vxlan.c b/examples/tep_termination/vxlan.c
index 44a39a4..c14ee94 100644
--- a/examples/tep_termination/vxlan.c
+++ b/examples/tep_termination/vxlan.c
@@ -16,7 +16,7 @@
static uint16_t
get_psd_sum(void *l3_hdr, uint16_t ethertype, uint64_t ol_flags)
{
- if (ethertype == RTE_ETHER_TYPE_IPv4)
+ if (ethertype == RTE_ETHER_TYPE_IPV4)
return rte_ipv4_phdr_cksum(l3_hdr, ol_flags);
else /* assume ethertype == RTE_ETHER_TYPE_IPv6 */
return rte_ipv6_phdr_cksum(l3_hdr, ol_flags);
@@ -46,7 +46,7 @@
}
switch (ethertype) {
- case RTE_ETHER_TYPE_IPv4:
+ case RTE_ETHER_TYPE_IPV4:
ipv4_hdr = (struct rte_ipv4_hdr *)
((char *)eth_hdr + info->outer_l2_len);
info->outer_l3_len = sizeof(struct rte_ipv4_hdr);
@@ -94,7 +94,7 @@
l3_hdr = (char *)eth_hdr + info->l2_len;
- if (ethertype == RTE_ETHER_TYPE_IPv4) {
+ if (ethertype == RTE_ETHER_TYPE_IPV4) {
ipv4_hdr = (struct rte_ipv4_hdr *)l3_hdr;
ipv4_hdr->hdr_checksum = 0;
ol_flags |= PKT_TX_IPV4;
diff --git a/examples/tep_termination/vxlan_setup.c b/examples/tep_termination/vxlan_setup.c
index ce7c2e5..9a08800 100644
--- a/examples/tep_termination/vxlan_setup.c
+++ b/examples/tep_termination/vxlan_setup.c
@@ -313,7 +313,7 @@
&app_l2_hdr[portid].d_addr);
rte_ether_addr_copy(&ports_eth_addr[0],
&app_l2_hdr[portid].s_addr);
- app_l2_hdr[portid].ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ app_l2_hdr[portid].ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
ip = &app_ip_hdr[portid];
ip->version_ihl = IP_VHL_DEF;
diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index 94e8547..f82be19 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -622,7 +622,7 @@ static uint16_t rxa_gcd_u16(uint16_t a, uint16_t b)
*ipv6_hdr = NULL;
switch (eth_hdr->ether_type) {
- case RTE_BE16(RTE_ETHER_TYPE_IPv4):
+ case RTE_BE16(RTE_ETHER_TYPE_IPV4):
*ipv4_hdr = (struct rte_ipv4_hdr *)(eth_hdr + 1);
break;
@@ -633,7 +633,7 @@ static uint16_t rxa_gcd_u16(uint16_t a, uint16_t b)
case RTE_BE16(RTE_ETHER_TYPE_VLAN):
vlan_hdr = (struct rte_vlan_hdr *)(eth_hdr + 1);
switch (vlan_hdr->eth_proto) {
- case RTE_BE16(RTE_ETHER_TYPE_IPv4):
+ case RTE_BE16(RTE_ETHER_TYPE_IPV4):
*ipv4_hdr = (struct rte_ipv4_hdr *)(vlan_hdr + 1);
break;
case RTE_BE16(RTE_ETHER_TYPE_IPv6):
diff --git a/lib/librte_net/rte_arp.c b/lib/librte_net/rte_arp.c
index 35a743c..cfd6e03 100644
--- a/lib/librte_net/rte_arp.c
+++ b/lib/librte_net/rte_arp.c
@@ -37,7 +37,7 @@ struct rte_mbuf * __rte_experimental
/* RARP header. */
rarp = (struct rte_arp_hdr *)(eth_hdr + 1);
rarp->arp_hardware = htons(RTE_ARP_HRD_ETHER);
- rarp->arp_protocol = htons(RTE_ETHER_TYPE_IPv4);
+ rarp->arp_protocol = htons(RTE_ETHER_TYPE_IPV4);
rarp->arp_hlen = RTE_ETHER_ADDR_LEN;
rarp->arp_plen = 4;
rarp->arp_opcode = htons(RTE_ARP_OP_REVREQUEST);
diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h
index 3404bdd..4873af6 100644
--- a/lib/librte_net/rte_ether.h
+++ b/lib/librte_net/rte_ether.h
@@ -298,7 +298,7 @@ struct rte_vxlan_hdr {
} __attribute__((__packed__));
/* Ethernet frame types */
-#define RTE_ETHER_TYPE_IPv4 0x0800 /**< IPv4 Protocol. */
+#define RTE_ETHER_TYPE_IPV4 0x0800 /**< IPv4 Protocol. */
#define RTE_ETHER_TYPE_IPv6 0x86DD /**< IPv6 Protocol. */
#define RTE_ETHER_TYPE_ARP 0x0806 /**< Arp Protocol. */
#define RTE_ETHER_TYPE_RARP 0x8035 /**< Reverse Arp Protocol. */
diff --git a/lib/librte_net/rte_net.c b/lib/librte_net/rte_net.c
index e1868f7..0196d70 100644
--- a/lib/librte_net/rte_net.c
+++ b/lib/librte_net/rte_net.c
@@ -161,7 +161,7 @@
return RTE_PTYPE_TUNNEL_GRE;
}
case IPPROTO_IPIP:
- *proto = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ *proto = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
return RTE_PTYPE_TUNNEL_IP;
case IPPROTO_IPV6:
*proto = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
@@ -249,7 +249,7 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
if ((layers & RTE_PTYPE_L2_MASK) == 0)
return 0;
- if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4))
+ if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4))
goto l3; /* fast path if packet is IPv4 */
if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN)) {
@@ -299,7 +299,7 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
if ((layers & RTE_PTYPE_L3_MASK) == 0)
return pkt_type;
- if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4)) {
+ if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4)) {
const struct rte_ipv4_hdr *ip4h;
struct rte_ipv4_hdr ip4h_copy;
@@ -431,7 +431,7 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
if ((layers & RTE_PTYPE_INNER_L3_MASK) == 0)
return pkt_type;
- if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4)) {
+ if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4)) {
const struct rte_ipv4_hdr *ip4h;
struct rte_ipv4_hdr ip4h_copy;
diff --git a/lib/librte_pipeline/rte_table_action.c b/lib/librte_pipeline/rte_table_action.c
index b3c8603..9002278 100644
--- a/lib/librte_pipeline/rte_table_action.c
+++ b/lib/librte_pipeline/rte_table_action.c
@@ -611,7 +611,7 @@ struct encap_qinq_pppoe_data {
{
struct encap_ether_data *d = data;
uint16_t ethertype = (common_cfg->ip_version) ?
- RTE_ETHER_TYPE_IPv4 :
+ RTE_ETHER_TYPE_IPV4 :
RTE_ETHER_TYPE_IPv6;
/* Ethernet */
@@ -629,7 +629,7 @@ struct encap_qinq_pppoe_data {
{
struct encap_vlan_data *d = data;
uint16_t ethertype = (common_cfg->ip_version) ?
- RTE_ETHER_TYPE_IPv4 :
+ RTE_ETHER_TYPE_IPV4 :
RTE_ETHER_TYPE_IPv6;
/* Ethernet */
@@ -653,7 +653,7 @@ struct encap_qinq_pppoe_data {
{
struct encap_qinq_data *d = data;
uint16_t ethertype = (common_cfg->ip_version) ?
- RTE_ETHER_TYPE_IPv4 :
+ RTE_ETHER_TYPE_IPV4 :
RTE_ETHER_TYPE_IPv6;
/* Ethernet */
@@ -786,7 +786,7 @@ struct encap_qinq_pppoe_data {
d->vlan.vlan_tci = rte_htons(VLAN(p->vxlan.vlan.pcp,
p->vxlan.vlan.dei,
p->vxlan.vlan.vid));
- d->vlan.eth_proto = rte_htons(RTE_ETHER_TYPE_IPv4);
+ d->vlan.eth_proto = rte_htons(RTE_ETHER_TYPE_IPV4);
/* IPv4*/
d->ipv4.version_ihl = 0x45;
@@ -821,7 +821,7 @@ struct encap_qinq_pppoe_data {
&d->ether.d_addr);
rte_ether_addr_copy(&p->vxlan.ether.sa,
&d->ether.s_addr);
- d->ether.ether_type = rte_htons(RTE_ETHER_TYPE_IPv4);
+ d->ether.ether_type = rte_htons(RTE_ETHER_TYPE_IPV4);
/* IPv4*/
d->ipv4.version_ihl = 0x45;
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index fe99116..a608a0d 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -988,7 +988,7 @@
l3_hdr = (char *)eth_hdr + m->l2_len;
switch (ethertype) {
- case RTE_ETHER_TYPE_IPv4:
+ case RTE_ETHER_TYPE_IPV4:
ipv4_hdr = l3_hdr;
*l4_proto = ipv4_hdr->next_proto_id;
m->l3_len = (ipv4_hdr->version_ihl & 0x0f) * 4;
--
1.8.3.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [dpdk-dev] [PATCH 5/5] replace RTE_ETHER_TYPE_IPv6 with uppercase RTE_ETHER_TYPE_IPV6
2019-05-29 11:29 [dpdk-dev] [PATCH 1/5] test/table: remove duplicate macro David Marchand
` (2 preceding siblings ...)
2019-05-29 11:29 ` [dpdk-dev] [PATCH 4/5] replace RTE_ETHER_TYPE_IPv4 with uppercase RTE_ETHER_TYPE_IPV4 David Marchand
@ 2019-05-29 11:29 ` David Marchand
2019-05-29 14:27 ` Olivier Matz
2019-05-29 14:25 ` [dpdk-dev] [PATCH 1/5] test/table: remove duplicate macro Olivier Matz
4 siblings, 1 reply; 13+ messages in thread
From: David Marchand @ 2019-05-29 11:29 UTC (permalink / raw)
To: dev
Cc: ferruh.yigit, thomas, olivier.matz, maxime.coquelin, stephen,
Adrien Mazarguil, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger,
Chas Williams, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy,
Hemant Agrawal, Shreyansh Jain, John Daley, Hyong Youb Kim,
Beilei Xing, Qi Zhang, Konstantin Ananyev, Shahaf Shuler,
Yongseok Koh, Rasesh Mody, Shahed Shaikh, Keith Wiles,
Marko Kovacevic, Ori Kam, Bruce Richardson, Pablo de Lara,
Radu Nicolau, Akhil Goyal, Tomasz Kantecki, David Hunt,
John McNamara, Harry van Haaren, Xiaoyun Li, Tiwei Bie,
Zhihong Wang, Nikhil Rao, Jerin Jacob, Cristian Dumitrescu
Since we change this macro, we might as well avoid triggering complaints
from checkpatch because of mixed case.
old=RTE_ETHER_TYPE_IPv6
new=RTE_ETHER_TYPE_IPV6
git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
app/test-pmd/cmdline_flow.c | 20 ++++++++++----------
app/test-pmd/csumonly.c | 14 +++++++-------
app/test/packet_burst_generator.c | 4 ++--
app/test/test_link_bonding.c | 2 +-
drivers/net/bnxt/bnxt_ethdev.c | 2 +-
drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++--
drivers/net/cxgbe/cxgbe_flow.c | 2 +-
drivers/net/dpaa/dpaa_rxtx.c | 4 ++--
drivers/net/e1000/igb_ethdev.c | 2 +-
drivers/net/e1000/igb_flow.c | 2 +-
drivers/net/enic/enic_flow.c | 2 +-
drivers/net/i40e/i40e_ethdev.c | 2 +-
drivers/net/i40e/i40e_fdir.c | 4 ++--
drivers/net/i40e/i40e_flow.c | 6 +++---
drivers/net/ixgbe/ixgbe_ethdev.c | 2 +-
drivers/net/ixgbe/ixgbe_flow.c | 2 +-
drivers/net/mlx5/mlx5_flow_dv.c | 4 ++--
drivers/net/qede/qede_filter.c | 6 +++---
drivers/net/qede/qede_rxtx.c | 2 +-
drivers/net/tap/rte_eth_tap.c | 2 +-
examples/ip_fragmentation/main.c | 4 ++--
examples/ip_reassembly/main.c | 2 +-
examples/ipsec-secgw/ipsec-secgw.c | 4 ++--
examples/l3fwd-power/main.c | 2 +-
examples/l3fwd/l3fwd_em.c | 2 +-
examples/l3fwd/l3fwd_lpm.c | 2 +-
examples/performance-thread/l3fwd-thread/main.c | 2 +-
examples/tep_termination/vxlan.c | 6 +++---
examples/vhost/main.c | 2 +-
lib/librte_eventdev/rte_event_eth_rx_adapter.c | 4 ++--
lib/librte_net/rte_ether.h | 2 +-
lib/librte_net/rte_net.c | 6 +++---
lib/librte_pipeline/rte_table_action.c | 10 +++++-----
lib/librte_vhost/virtio_net.c | 2 +-
34 files changed, 69 insertions(+), 69 deletions(-)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index a0fa748..201bd9d 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3684,7 +3684,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
else if (l2_encap_conf.select_ipv4)
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
- eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
memcpy(eth.dst.addr_bytes,
l2_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
memcpy(eth.src.addr_bytes,
@@ -3695,7 +3695,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
if (l2_encap_conf.select_ipv4)
vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
- vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
memcpy(header, &vlan, sizeof(vlan));
header += sizeof(vlan);
}
@@ -3819,7 +3819,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
else if (mplsogre_encap_conf.select_ipv4)
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
- eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
memcpy(eth.dst.addr_bytes,
mplsogre_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
memcpy(eth.src.addr_bytes,
@@ -3830,7 +3830,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
if (mplsogre_encap_conf.select_ipv4)
vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
- vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
memcpy(header, &vlan, sizeof(vlan));
header += sizeof(vlan);
}
@@ -3914,7 +3914,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
else if (mplsogre_encap_conf.select_ipv4)
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
- eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
memcpy(eth.dst.addr_bytes,
mplsogre_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
memcpy(eth.src.addr_bytes,
@@ -3925,7 +3925,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
if (mplsogre_encap_conf.select_ipv4)
vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
- vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
memcpy(header, &vlan, sizeof(vlan));
header += sizeof(vlan);
}
@@ -4010,7 +4010,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
else if (mplsoudp_encap_conf.select_ipv4)
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
- eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
memcpy(eth.dst.addr_bytes,
mplsoudp_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
memcpy(eth.src.addr_bytes,
@@ -4021,7 +4021,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
if (mplsoudp_encap_conf.select_ipv4)
vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
- vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
memcpy(header, &vlan, sizeof(vlan));
header += sizeof(vlan);
}
@@ -4107,7 +4107,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
else if (mplsoudp_encap_conf.select_ipv4)
eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
- eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
memcpy(eth.dst.addr_bytes,
mplsoudp_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
memcpy(eth.src.addr_bytes,
@@ -4118,7 +4118,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
if (mplsoudp_encap_conf.select_ipv4)
vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
else
- vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
memcpy(header, &vlan, sizeof(vlan));
header += sizeof(vlan);
}
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 3732fd1..e1cb7fb 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -94,7 +94,7 @@ struct simple_gre_hdr {
{
if (ethertype == _htons(RTE_ETHER_TYPE_IPV4))
return rte_ipv4_udptcp_cksum(l3_hdr, l4_hdr);
- else /* assume ethertype == RTE_ETHER_TYPE_IPv6 */
+ else /* assume ethertype == RTE_ETHER_TYPE_IPV6 */
return rte_ipv6_udptcp_cksum(l3_hdr, l4_hdr);
}
@@ -166,7 +166,7 @@ struct simple_gre_hdr {
((char *)eth_hdr + info->l2_len);
parse_ipv4(ipv4_hdr, info);
break;
- case _htons(RTE_ETHER_TYPE_IPv6):
+ case _htons(RTE_ETHER_TYPE_IPV6):
ipv6_hdr = (struct rte_ipv6_hdr *)
((char *)eth_hdr + info->l2_len);
parse_ipv6(ipv6_hdr, info);
@@ -251,7 +251,7 @@ struct simple_gre_hdr {
ipv6_hdr = (struct rte_ipv6_hdr *)((char *)vxlan_gpe_hdr +
vxlan_gpe_len);
- info->ethertype = _htons(RTE_ETHER_TYPE_IPv6);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IPV6);
parse_ipv6(ipv6_hdr, info);
info->l2_len = 0;
@@ -303,7 +303,7 @@ struct simple_gre_hdr {
info->ethertype = _htons(RTE_ETHER_TYPE_IPV4);
info->l2_len = 0;
- } else if (gre_hdr->proto == _htons(RTE_ETHER_TYPE_IPv6)) {
+ } else if (gre_hdr->proto == _htons(RTE_ETHER_TYPE_IPV6)) {
info->is_tunnel = 1;
info->outer_ethertype = info->ethertype;
info->outer_l2_len = info->l2_len;
@@ -312,7 +312,7 @@ struct simple_gre_hdr {
ipv6_hdr = (struct rte_ipv6_hdr *)((char *)gre_hdr + gre_len);
- info->ethertype = _htons(RTE_ETHER_TYPE_IPv6);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IPV6);
parse_ipv6(ipv6_hdr, info);
info->l2_len = 0;
@@ -356,7 +356,7 @@ struct simple_gre_hdr {
info->ethertype = _htons(RTE_ETHER_TYPE_IPV4);
} else {
parse_ipv6(ipv6_hdr, info);
- info->ethertype = _htons(RTE_ETHER_TYPE_IPv6);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IPV6);
}
info->l2_len = 0;
}
@@ -402,7 +402,7 @@ struct simple_gre_hdr {
ipv4_hdr->hdr_checksum =
rte_ipv4_cksum(ipv4_hdr);
}
- } else if (info->ethertype == _htons(RTE_ETHER_TYPE_IPv6))
+ } else if (info->ethertype == _htons(RTE_ETHER_TYPE_IPV6))
ol_flags |= PKT_TX_IPV6;
else
return 0; /* packet type not supported, nothing to do */
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index cf22d18..9776d58 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -327,7 +327,7 @@
pkt->vlan_tci = RTE_ETHER_TYPE_IPV4;
pkt->l3_len = sizeof(struct rte_ipv4_hdr);
} else {
- pkt->vlan_tci = RTE_ETHER_TYPE_IPv6;
+ pkt->vlan_tci = RTE_ETHER_TYPE_IPV6;
pkt->l3_len = sizeof(struct rte_ipv6_hdr);
}
@@ -448,7 +448,7 @@
pkt->vlan_tci = RTE_ETHER_TYPE_IPV4;
pkt->l3_len = sizeof(struct rte_ipv4_hdr);
} else {
- pkt->vlan_tci = RTE_ETHER_TYPE_IPv6;
+ pkt->vlan_tci = RTE_ETHER_TYPE_IPV6;
pkt->l3_len = sizeof(struct rte_ipv6_hdr);
}
diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index a180899..938fafc 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -1274,7 +1274,7 @@ struct link_bonding_unittest_params {
if (ipv4)
ether_type = RTE_ETHER_TYPE_IPV4;
else
- ether_type = RTE_ETHER_TYPE_IPv6;
+ ether_type = RTE_ETHER_TYPE_IPV6;
if (toggle_dst_mac)
initialize_eth_header(test_params->pkt_eth_hdr,
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 42738b8..6d2a672 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1797,7 +1797,7 @@ static int bnxt_mtu_set_op(struct rte_eth_dev *eth_dev, uint16_t new_mtu)
*ret = 0;
if (efilter->ether_type == RTE_ETHER_TYPE_IPV4 ||
- efilter->ether_type == RTE_ETHER_TYPE_IPv6) {
+ efilter->ether_type == RTE_ETHER_TYPE_IPV6) {
PMD_DRV_LOG(ERR, "invalid ether_type(0x%04x) in"
" ethertype filter.", efilter->ether_type);
*ret = -EINVAL;
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index dbed185..ca34945 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -816,7 +816,7 @@ struct client_stats_t {
((char *)(eth_hdr + 1) + vlan_offset);
l3hash = ipv4_hash(ipv4_hdr);
- } else if (rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6) == proto) {
+ } else if (rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6) == proto) {
struct rte_ipv6_hdr *ipv6_hdr = (struct rte_ipv6_hdr *)
((char *)(eth_hdr + 1) + vlan_offset);
l3hash = ipv6_hash(ipv6_hdr);
@@ -882,7 +882,7 @@ struct client_stats_t {
l4hash = HASH_L4_PORTS(udp_hdr);
}
}
- } else if (rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6) == proto) {
+ } else if (rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6) == proto) {
struct rte_ipv6_hdr *ipv6_hdr = (struct rte_ipv6_hdr *)
((char *)(eth_hdr + 1) + vlan_offset);
l3hash = ipv6_hash(ipv6_hdr);
diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c
index 07960fd..d3de689 100644
--- a/drivers/net/cxgbe/cxgbe_flow.c
+++ b/drivers/net/cxgbe/cxgbe_flow.c
@@ -262,7 +262,7 @@
"tc/flow/hop are not supported");
fs->type = FILTER_TYPE_IPV6;
- CXGBE_FILL_FS(RTE_ETHER_TYPE_IPv6, 0xffff, ethtype);
+ CXGBE_FILL_FS(RTE_ETHER_TYPE_IPV6, 0xffff, ethtype);
if (!val)
return 0; /* ipv6 wild card */
diff --git a/drivers/net/dpaa/dpaa_rxtx.c b/drivers/net/dpaa/dpaa_rxtx.c
index 441a3dd..f16b7e0 100644
--- a/drivers/net/dpaa/dpaa_rxtx.c
+++ b/drivers/net/dpaa/dpaa_rxtx.c
@@ -225,7 +225,7 @@ static inline void dpaa_checksum(struct rte_mbuf *mbuf)
if (eth_hdr->ether_type == htons(RTE_ETHER_TYPE_IPV4))
tcp_hdr->cksum = rte_ipv4_udptcp_cksum(ipv4_hdr,
tcp_hdr);
- else /* assume ethertype == RTE_ETHER_TYPE_IPv6 */
+ else /* assume ethertype == RTE_ETHER_TYPE_IPV6 */
tcp_hdr->cksum = rte_ipv6_udptcp_cksum(ipv6_hdr,
tcp_hdr);
} else if ((mbuf->packet_type & RTE_PTYPE_L4_MASK) ==
@@ -236,7 +236,7 @@ static inline void dpaa_checksum(struct rte_mbuf *mbuf)
if (eth_hdr->ether_type == htons(RTE_ETHER_TYPE_IPV4))
udp_hdr->dgram_cksum = rte_ipv4_udptcp_cksum(ipv4_hdr,
udp_hdr);
- else /* assume ethertype == RTE_ETHER_TYPE_IPv6 */
+ else /* assume ethertype == RTE_ETHER_TYPE_IPV6 */
udp_hdr->dgram_cksum = rte_ipv6_udptcp_cksum(ipv6_hdr,
udp_hdr);
}
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 064d676..29c5500 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -4747,7 +4747,7 @@ static void igbvf_set_vfta_all(struct rte_eth_dev *dev, bool on)
int ret;
if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
- filter->ether_type == RTE_ETHER_TYPE_IPv6) {
+ filter->ether_type == RTE_ETHER_TYPE_IPV6) {
PMD_DRV_LOG(ERR, "unsupported ether_type(0x%04x) in"
" ethertype filter.", filter->ether_type);
return -EINVAL;
diff --git a/drivers/net/e1000/igb_flow.c b/drivers/net/e1000/igb_flow.c
index c34e25d..9f002de 100644
--- a/drivers/net/e1000/igb_flow.c
+++ b/drivers/net/e1000/igb_flow.c
@@ -701,7 +701,7 @@
}
if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
- filter->ether_type == RTE_ETHER_TYPE_IPv6) {
+ filter->ether_type == RTE_ETHER_TYPE_IPV6) {
memset(filter, 0, sizeof(struct rte_eth_ethertype_filter));
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c
index 7b015ee..cbc212e 100644
--- a/drivers/net/enic/enic_flow.c
+++ b/drivers/net/enic/enic_flow.c
@@ -625,7 +625,7 @@ struct enic_action_cap {
arg->l3_proto_off = *off + offsetof(struct rte_ipv6_hdr, proto);
return copy_inner_common(&arg->filter->u.generic_1, off,
arg->item->spec, mask, sizeof(struct rte_ipv6_hdr),
- arg->l2_proto_off, rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6), 2);
+ arg->l2_proto_off, rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6), 2);
}
static int
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 162858a..7fa9e1b 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -9998,7 +9998,7 @@ struct i40e_ethertype_filter *
return -EINVAL;
}
if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
- filter->ether_type == RTE_ETHER_TYPE_IPv6) {
+ filter->ether_type == RTE_ETHER_TYPE_IPV6) {
PMD_DRV_LOG(ERR,
"unsupported ether_type(0x%04x) in control packet filter.",
filter->ether_type);
diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c
index f809f92..b3e893a 100644
--- a/drivers/net/i40e/i40e_fdir.c
+++ b/drivers/net/i40e/i40e_fdir.c
@@ -752,7 +752,7 @@ static int i40e_sw_fdir_filter_insert(struct i40e_pf *pf,
case RTE_ETH_FLOW_FRAG_IPV6:
ip6 = (struct rte_ipv6_hdr *)raw_pkt;
- *ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ *ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
ip6->vtc_flow =
rte_cpu_to_be_32(I40E_FDIR_IPv6_DEFAULT_VTC_FLOW |
(fdir_input->flow.ipv6_flow.tc <<
@@ -1042,7 +1042,7 @@ static int i40e_sw_fdir_filter_insert(struct i40e_pf *pf,
pctype == I40E_FILTER_PCTYPE_FRAG_IPV6) {
ip6 = (struct rte_ipv6_hdr *)raw_pkt;
- *ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ *ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
ip6->vtc_flow =
rte_cpu_to_be_32(I40E_FDIR_IPv6_DEFAULT_VTC_FLOW |
(fdir_input->flow.ipv6_flow.tc <<
diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
index f8ab046..9bfbea2 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -2036,7 +2036,7 @@ static int i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,
filter->ether_type = rte_be_to_cpu_16(eth_spec->type);
if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
- filter->ether_type == RTE_ETHER_TYPE_IPv6 ||
+ filter->ether_type == RTE_ETHER_TYPE_IPV6 ||
filter->ether_type == RTE_ETHER_TYPE_LLDP ||
filter->ether_type == outer_tpid) {
rte_flow_error_set(error, EINVAL,
@@ -2508,7 +2508,7 @@ static int i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,
if (next == RTE_FLOW_ITEM_TYPE_VLAN ||
ether_type == RTE_ETHER_TYPE_IPV4 ||
- ether_type == RTE_ETHER_TYPE_IPv6 ||
+ ether_type == RTE_ETHER_TYPE_IPV6 ||
ether_type == RTE_ETHER_TYPE_ARP ||
ether_type == outer_tpid) {
rte_flow_error_set(error, EINVAL,
@@ -2553,7 +2553,7 @@ static int i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,
rte_be_to_cpu_16(vlan_spec->inner_type);
if (ether_type == RTE_ETHER_TYPE_IPV4 ||
- ether_type == RTE_ETHER_TYPE_IPv6 ||
+ ether_type == RTE_ETHER_TYPE_IPV6 ||
ether_type == RTE_ETHER_TYPE_ARP ||
ether_type == outer_tpid) {
rte_flow_error_set(error, EINVAL,
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index b46d39a..3636b50 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -6668,7 +6668,7 @@ static void ixgbevf_set_vfta_all(struct rte_eth_dev *dev, bool on)
return -EINVAL;
if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
- filter->ether_type == RTE_ETHER_TYPE_IPv6) {
+ filter->ether_type == RTE_ETHER_TYPE_IPV6) {
PMD_DRV_LOG(ERR, "unsupported ether_type(0x%04x) in"
" ethertype filter.", filter->ether_type);
return -EINVAL;
diff --git a/drivers/net/ixgbe/ixgbe_flow.c b/drivers/net/ixgbe/ixgbe_flow.c
index def6283..2b8529f 100644
--- a/drivers/net/ixgbe/ixgbe_flow.c
+++ b/drivers/net/ixgbe/ixgbe_flow.c
@@ -888,7 +888,7 @@ const struct rte_flow_action *next_no_void_action(
}
if (filter->ether_type == RTE_ETHER_TYPE_IPV4 ||
- filter->ether_type == RTE_ETHER_TYPE_IPv6) {
+ filter->ether_type == RTE_ETHER_TYPE_IPV6) {
memset(filter, 0, sizeof(struct rte_eth_ethertype_filter));
rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM,
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index ffa2696..933ad0b 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -1276,9 +1276,9 @@ struct field_modify_info modify_tcp[] = {
"neither eth nor vlan"
" header found");
if (vlan && !vlan->eth_proto)
- vlan->eth_proto = RTE_BE16(RTE_ETHER_TYPE_IPv6);
+ vlan->eth_proto = RTE_BE16(RTE_ETHER_TYPE_IPV6);
else if (eth && !eth->ether_type)
- eth->ether_type = RTE_BE16(RTE_ETHER_TYPE_IPv6);
+ eth->ether_type = RTE_BE16(RTE_ETHER_TYPE_IPV6);
if (!ipv6->vtc_flow)
ipv6->vtc_flow =
RTE_BE32(MLX5_ENCAP_IPV6_VTC_FLOW);
diff --git a/drivers/net/qede/qede_filter.c b/drivers/net/qede/qede_filter.c
index d01d675..a958e8a 100644
--- a/drivers/net/qede/qede_filter.c
+++ b/drivers/net/qede/qede_filter.c
@@ -237,7 +237,7 @@ void qede_fdir_dealloc_resc(struct rte_eth_dev *eth_dev)
break;
case RTE_ETH_FLOW_NONFRAG_IPV6_TCP:
case RTE_ETH_FLOW_NONFRAG_IPV6_UDP:
- arfs->tuple.eth_proto = RTE_ETHER_TYPE_IPv6;
+ arfs->tuple.eth_proto = RTE_ETHER_TYPE_IPV6;
arfs->tuple.ip_proto = next_proto[input->flow_type];
rte_memcpy(arfs->tuple.dst_ipv6,
&input->flow.ipv6_flow.dst_ip,
@@ -506,7 +506,7 @@ void qede_fdir_dealloc_resc(struct rte_eth_dev *eth_dev)
params->tcp = true;
}
break;
- case RTE_ETHER_TYPE_IPv6:
+ case RTE_ETHER_TYPE_IPV6:
ip6 = (struct rte_ipv6_hdr *)raw_pkt;
ip6->proto = arfs->tuple.ip_proto;
ip6->vtc_flow =
@@ -1285,7 +1285,7 @@ static void qede_get_ecore_tunn_params(uint32_t filter, uint32_t *type,
spec->hdr.dst_addr,
IPV6_ADDR_LEN);
flow->entry.tuple.eth_proto =
- RTE_ETHER_TYPE_IPv6;
+ RTE_ETHER_TYPE_IPV6;
}
break;
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index a59e224..bae26ce 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -978,7 +978,7 @@ static inline uint32_t qede_rx_cqe_to_pkt_type_outer(struct rte_mbuf *m)
packet_type |= RTE_PTYPE_L4_TCP;
else if (ipv4_hdr->next_proto_id == IPPROTO_UDP)
packet_type |= RTE_PTYPE_L4_UDP;
- } else if (ethertype == RTE_ETHER_TYPE_IPv6) {
+ } else if (ethertype == RTE_ETHER_TYPE_IPV6) {
packet_type |= RTE_PTYPE_L3_IPV6;
ipv6_hdr = rte_pktmbuf_mtod_offset(m,
struct rte_ipv6_hdr *, len);
diff --git a/drivers/net/tap/rte_eth_tap.c b/drivers/net/tap/rte_eth_tap.c
index f535a3a..074b3e8 100644
--- a/drivers/net/tap/rte_eth_tap.c
+++ b/drivers/net/tap/rte_eth_tap.c
@@ -567,7 +567,7 @@ struct ipc_queues {
pi.proto = (proto == 0x40) ?
rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4) :
((proto == 0x60) ?
- rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6) :
+ rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6) :
0x00);
}
diff --git a/examples/ip_fragmentation/main.c b/examples/ip_fragmentation/main.c
index 01c30ee..a5101fa 100644
--- a/examples/ip_fragmentation/main.c
+++ b/examples/ip_fragmentation/main.c
@@ -359,7 +359,7 @@ struct rte_lpm6_config lpm6_config = {
ð_hdr->s_addr);
if (ipv6)
eth_hdr->ether_type =
- rte_be_to_cpu_16(RTE_ETHER_TYPE_IPv6);
+ rte_be_to_cpu_16(RTE_ETHER_TYPE_IPV6);
else
eth_hdr->ether_type =
rte_be_to_cpu_16(RTE_ETHER_TYPE_IPV4);
@@ -682,7 +682,7 @@ struct rte_lpm6_config lpm6_config = {
ether_type = eth_hdr->ether_type;
if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4))
packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
- else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6))
+ else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6))
packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
m->packet_type = packet_type;
diff --git a/examples/ip_reassembly/main.c b/examples/ip_reassembly/main.c
index 10a3af6..fbd0934 100644
--- a/examples/ip_reassembly/main.c
+++ b/examples/ip_reassembly/main.c
@@ -401,7 +401,7 @@ struct rte_lpm6_config lpm6_config = {
dst_port = next_hop;
}
- eth_hdr->ether_type = rte_be_to_cpu_16(RTE_ETHER_TYPE_IPv6);
+ eth_hdr->ether_type = rte_be_to_cpu_16(RTE_ETHER_TYPE_IPV6);
}
/* if packet wasn't IPv4 or IPv6, it's forwarded to the port it came from */
diff --git a/examples/ipsec-secgw/ipsec-secgw.c b/examples/ipsec-secgw/ipsec-secgw.c
index 601d45d..6c626fa 100644
--- a/examples/ipsec-secgw/ipsec-secgw.c
+++ b/examples/ipsec-secgw/ipsec-secgw.c
@@ -247,7 +247,7 @@ struct lcore_conf {
}
pkt->l2_len = 0;
pkt->l3_len = sizeof(struct ip);
- } else if (eth->ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6)) {
+ } else if (eth->ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6)) {
nlp = (uint8_t *)rte_pktmbuf_adj(pkt, RTE_ETHER_HDR_LEN);
nlp = RTE_PTR_ADD(nlp, offsetof(struct ip6_hdr, ip6_nxt));
if (*nlp == IPPROTO_ESP)
@@ -349,7 +349,7 @@ struct lcore_conf {
pkt->l3_len = sizeof(struct ip6_hdr);
pkt->l2_len = RTE_ETHER_HDR_LEN;
- ethhdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ ethhdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
}
memcpy(ðhdr->s_addr, ðaddr_tbl[port].src,
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 1162f7e..66ad105 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -626,7 +626,7 @@ static int is_done(void)
ether_type = eth_hdr->ether_type;
if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4))
packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
- else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6))
+ else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6))
packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
m->packet_type = packet_type;
diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index f45a430..5f499e0 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -586,7 +586,7 @@ struct ipv6_l3fwd_em_route {
packet_type |= RTE_PTYPE_L4_UDP;
} else
packet_type |= RTE_PTYPE_L3_IPV4_EXT;
- } else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6)) {
+ } else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6)) {
ipv6_hdr = (struct rte_ipv6_hdr *)l3;
if (ipv6_hdr->proto == IPPROTO_TCP)
packet_type |= RTE_PTYPE_L3_IPV6 | RTE_PTYPE_L4_TCP;
diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index c6491f6..4143683 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -388,7 +388,7 @@ struct ipv6_l3fwd_lpm_route {
ether_type = eth_hdr->ether_type;
if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4))
packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
- else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6))
+ else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6))
packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
m->packet_type = packet_type;
diff --git a/examples/performance-thread/l3fwd-thread/main.c b/examples/performance-thread/l3fwd-thread/main.c
index 9d879b6..dd46895 100644
--- a/examples/performance-thread/l3fwd-thread/main.c
+++ b/examples/performance-thread/l3fwd-thread/main.c
@@ -100,7 +100,7 @@
ether_type = eth_hdr->ether_type;
if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4))
packet_type |= RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
- else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6))
+ else if (ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6))
packet_type |= RTE_PTYPE_L3_IPV6_EXT_UNKNOWN;
m->packet_type = packet_type;
diff --git a/examples/tep_termination/vxlan.c b/examples/tep_termination/vxlan.c
index c14ee94..52c35a7 100644
--- a/examples/tep_termination/vxlan.c
+++ b/examples/tep_termination/vxlan.c
@@ -18,7 +18,7 @@
{
if (ethertype == RTE_ETHER_TYPE_IPV4)
return rte_ipv4_phdr_cksum(l3_hdr, ol_flags);
- else /* assume ethertype == RTE_ETHER_TYPE_IPv6 */
+ else /* assume ethertype == RTE_ETHER_TYPE_IPV6 */
return rte_ipv6_phdr_cksum(l3_hdr, ol_flags);
}
@@ -52,7 +52,7 @@
info->outer_l3_len = sizeof(struct rte_ipv4_hdr);
*l4_proto = ipv4_hdr->next_proto_id;
break;
- case RTE_ETHER_TYPE_IPv6:
+ case RTE_ETHER_TYPE_IPV6:
ipv6_hdr = (struct rte_ipv6_hdr *)
((char *)eth_hdr + info->outer_l2_len);
info->outer_l3_len = sizeof(struct rte_ipv6_hdr);
@@ -101,7 +101,7 @@
ol_flags |= PKT_TX_IP_CKSUM;
info->l3_len = sizeof(struct rte_ipv4_hdr);
l4_proto = ipv4_hdr->next_proto_id;
- } else if (ethertype == RTE_ETHER_TYPE_IPv6) {
+ } else if (ethertype == RTE_ETHER_TYPE_IPV6) {
ipv6_hdr = (struct rte_ipv6_hdr *)l3_hdr;
info->l3_len = sizeof(struct rte_ipv6_hdr);
l4_proto = ipv6_hdr->proto;
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index 9427d59..0961db0 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -858,7 +858,7 @@ static unsigned check_ports_num(unsigned nb_ports)
{
if (ol_flags & PKT_TX_IPV4)
return rte_ipv4_phdr_cksum(l3_hdr, ol_flags);
- else /* assume ethertype == RTE_ETHER_TYPE_IPv6 */
+ else /* assume ethertype == RTE_ETHER_TYPE_IPV6 */
return rte_ipv6_phdr_cksum(l3_hdr, ol_flags);
}
diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index f82be19..a97d198 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -626,7 +626,7 @@ static uint16_t rxa_gcd_u16(uint16_t a, uint16_t b)
*ipv4_hdr = (struct rte_ipv4_hdr *)(eth_hdr + 1);
break;
- case RTE_BE16(RTE_ETHER_TYPE_IPv6):
+ case RTE_BE16(RTE_ETHER_TYPE_IPV6):
*ipv6_hdr = (struct rte_ipv6_hdr *)(eth_hdr + 1);
break;
@@ -636,7 +636,7 @@ static uint16_t rxa_gcd_u16(uint16_t a, uint16_t b)
case RTE_BE16(RTE_ETHER_TYPE_IPV4):
*ipv4_hdr = (struct rte_ipv4_hdr *)(vlan_hdr + 1);
break;
- case RTE_BE16(RTE_ETHER_TYPE_IPv6):
+ case RTE_BE16(RTE_ETHER_TYPE_IPV6):
*ipv6_hdr = (struct rte_ipv6_hdr *)(vlan_hdr + 1);
break;
default:
diff --git a/lib/librte_net/rte_ether.h b/lib/librte_net/rte_ether.h
index 4873af6..7be9b48 100644
--- a/lib/librte_net/rte_ether.h
+++ b/lib/librte_net/rte_ether.h
@@ -299,7 +299,7 @@ struct rte_vxlan_hdr {
/* Ethernet frame types */
#define RTE_ETHER_TYPE_IPV4 0x0800 /**< IPv4 Protocol. */
-#define RTE_ETHER_TYPE_IPv6 0x86DD /**< IPv6 Protocol. */
+#define RTE_ETHER_TYPE_IPV6 0x86DD /**< IPv6 Protocol. */
#define RTE_ETHER_TYPE_ARP 0x0806 /**< Arp Protocol. */
#define RTE_ETHER_TYPE_RARP 0x8035 /**< Reverse Arp Protocol. */
#define RTE_ETHER_TYPE_VLAN 0x8100 /**< IEEE 802.1Q VLAN tagging. */
diff --git a/lib/librte_net/rte_net.c b/lib/librte_net/rte_net.c
index 0196d70..6515909 100644
--- a/lib/librte_net/rte_net.c
+++ b/lib/librte_net/rte_net.c
@@ -164,7 +164,7 @@
*proto = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV4);
return RTE_PTYPE_TUNNEL_IP;
case IPPROTO_IPV6:
- *proto = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
+ *proto = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6);
return RTE_PTYPE_TUNNEL_IP; /* IP is also valid for IPv6 */
default:
return 0;
@@ -322,7 +322,7 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
}
proto = ip4h->next_proto_id;
pkt_type |= ptype_l4(proto);
- } else if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6)) {
+ } else if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6)) {
const struct rte_ipv6_hdr *ip6h;
struct rte_ipv6_hdr ip6h_copy;
int frag = 0;
@@ -454,7 +454,7 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
}
proto = ip4h->next_proto_id;
pkt_type |= ptype_inner_l4(proto);
- } else if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6)) {
+ } else if (proto == rte_cpu_to_be_16(RTE_ETHER_TYPE_IPV6)) {
const struct rte_ipv6_hdr *ip6h;
struct rte_ipv6_hdr ip6h_copy;
int frag = 0;
diff --git a/lib/librte_pipeline/rte_table_action.c b/lib/librte_pipeline/rte_table_action.c
index 9002278..a54ec46 100644
--- a/lib/librte_pipeline/rte_table_action.c
+++ b/lib/librte_pipeline/rte_table_action.c
@@ -612,7 +612,7 @@ struct encap_qinq_pppoe_data {
struct encap_ether_data *d = data;
uint16_t ethertype = (common_cfg->ip_version) ?
RTE_ETHER_TYPE_IPV4 :
- RTE_ETHER_TYPE_IPv6;
+ RTE_ETHER_TYPE_IPV6;
/* Ethernet */
rte_ether_addr_copy(&p->ether.ether.da, &d->ether.d_addr);
@@ -630,7 +630,7 @@ struct encap_qinq_pppoe_data {
struct encap_vlan_data *d = data;
uint16_t ethertype = (common_cfg->ip_version) ?
RTE_ETHER_TYPE_IPV4 :
- RTE_ETHER_TYPE_IPv6;
+ RTE_ETHER_TYPE_IPV6;
/* Ethernet */
rte_ether_addr_copy(&p->vlan.ether.da, &d->ether.d_addr);
@@ -654,7 +654,7 @@ struct encap_qinq_pppoe_data {
struct encap_qinq_data *d = data;
uint16_t ethertype = (common_cfg->ip_version) ?
RTE_ETHER_TYPE_IPV4 :
- RTE_ETHER_TYPE_IPv6;
+ RTE_ETHER_TYPE_IPV6;
/* Ethernet */
rte_ether_addr_copy(&p->qinq.ether.da, &d->ether.d_addr);
@@ -864,7 +864,7 @@ struct encap_qinq_pppoe_data {
d->vlan.vlan_tci = rte_htons(VLAN(p->vxlan.vlan.pcp,
p->vxlan.vlan.dei,
p->vxlan.vlan.vid));
- d->vlan.eth_proto = rte_htons(RTE_ETHER_TYPE_IPv6);
+ d->vlan.eth_proto = rte_htons(RTE_ETHER_TYPE_IPV6);
/* IPv6*/
d->ipv6.vtc_flow = rte_htonl((6 << 28) |
@@ -899,7 +899,7 @@ struct encap_qinq_pppoe_data {
&d->ether.d_addr);
rte_ether_addr_copy(&p->vxlan.ether.sa,
&d->ether.s_addr);
- d->ether.ether_type = rte_htons(RTE_ETHER_TYPE_IPv6);
+ d->ether.ether_type = rte_htons(RTE_ETHER_TYPE_IPV6);
/* IPv6*/
d->ipv6.vtc_flow = rte_htonl((6 << 28) |
diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c
index a608a0d..bd6635c 100644
--- a/lib/librte_vhost/virtio_net.c
+++ b/lib/librte_vhost/virtio_net.c
@@ -995,7 +995,7 @@
*l4_hdr = (char *)l3_hdr + m->l3_len;
m->ol_flags |= PKT_TX_IPV4;
break;
- case RTE_ETHER_TYPE_IPv6:
+ case RTE_ETHER_TYPE_IPV6:
ipv6_hdr = l3_hdr;
*l4_proto = ipv6_hdr->proto;
m->l3_len = sizeof(struct rte_ipv6_hdr);
--
1.8.3.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH 2/5] net/tap: revert changes on rte_ prefixing
2019-05-29 11:29 ` [dpdk-dev] [PATCH 2/5] net/tap: revert changes on rte_ prefixing David Marchand
@ 2019-05-29 13:36 ` Wiles, Keith
2019-05-29 14:26 ` Olivier Matz
1 sibling, 0 replies; 13+ messages in thread
From: Wiles, Keith @ 2019-05-29 13:36 UTC (permalink / raw)
To: David Marchand
Cc: dpdk-dev, Yigit, Ferruh, Thomas Monjalon, Olivier Matz,
Maxime Coquelin, stephen
> On May 29, 2019, at 6:29 AM, David Marchand <david.marchand@redhat.com> wrote:
>
> This source is compiled as a bpf program out of dpdk.
> Revert to structures/macros coming from libc.
>
> Fixes: 6d13ea8e8e49 ("net: add rte prefix to ether structures")
> Fixes: 24ac604ef746 ("net: add rte prefix to IP defines")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> drivers/net/tap/tap_bpf_program.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/tap/tap_bpf_program.c b/drivers/net/tap/tap_bpf_program.c
Did not test the whole patch, but the changes to TAP PMD seem reasonable.
Ack just the TAP PMD changes.
Acked-by Keith.Wiles<keith.wiles@intel.com>
Regards,
Keith
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH 1/5] test/table: remove duplicate macro
2019-05-29 11:29 [dpdk-dev] [PATCH 1/5] test/table: remove duplicate macro David Marchand
` (3 preceding siblings ...)
2019-05-29 11:29 ` [dpdk-dev] [PATCH 5/5] replace RTE_ETHER_TYPE_IPv6 with uppercase RTE_ETHER_TYPE_IPV6 David Marchand
@ 2019-05-29 14:25 ` Olivier Matz
4 siblings, 0 replies; 13+ messages in thread
From: Olivier Matz @ 2019-05-29 14:25 UTC (permalink / raw)
To: David Marchand
Cc: dev, ferruh.yigit, thomas, maxime.coquelin, stephen, Cristian Dumitrescu
On Wed, May 29, 2019 at 01:29:14PM +0200, David Marchand wrote:
> No need for this macro here, take it from librte_net.
>
> Fixes: 24ac604ef746 ("net: add rte prefix to IP defines")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH 2/5] net/tap: revert changes on rte_ prefixing
2019-05-29 11:29 ` [dpdk-dev] [PATCH 2/5] net/tap: revert changes on rte_ prefixing David Marchand
2019-05-29 13:36 ` Wiles, Keith
@ 2019-05-29 14:26 ` Olivier Matz
1 sibling, 0 replies; 13+ messages in thread
From: Olivier Matz @ 2019-05-29 14:26 UTC (permalink / raw)
To: David Marchand
Cc: dev, ferruh.yigit, thomas, maxime.coquelin, stephen, Keith Wiles
On Wed, May 29, 2019 at 01:29:15PM +0200, David Marchand wrote:
> This source is compiled as a bpf program out of dpdk.
> Revert to structures/macros coming from libc.
>
> Fixes: 6d13ea8e8e49 ("net: add rte prefix to ether structures")
> Fixes: 24ac604ef746 ("net: add rte prefix to IP defines")
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH 3/5] replace RTE_IPv4 with uppercase RTE_IPV4
2019-05-29 11:29 ` [dpdk-dev] [PATCH 3/5] replace RTE_IPv4 with uppercase RTE_IPV4 David Marchand
@ 2019-05-29 14:26 ` Olivier Matz
2019-06-03 8:58 ` David Marchand
2019-06-03 13:30 ` Thomas Monjalon
0 siblings, 2 replies; 13+ messages in thread
From: Olivier Matz @ 2019-05-29 14:26 UTC (permalink / raw)
To: David Marchand
Cc: dev, ferruh.yigit, thomas, maxime.coquelin, stephen,
Konstantin Ananyev, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger,
Byron Marohn, Pablo de Lara Guarch, Yipeng Wang, Sameh Gobriel,
Bruce Richardson, Chas Williams, Vladimir Medvedkin,
Cristian Dumitrescu, John McNamara, Marko Kovacevic, Ori Kam,
Radu Nicolau, Akhil Goyal, Tomasz Kantecki, David Hunt,
Harry van Haaren, Xiaoyun Li
On Wed, May 29, 2019 at 01:29:16PM +0200, David Marchand wrote:
> Since we change this macro, we might as well avoid triggering complaints
> from checkpatch because of mixed case.
>
> old=RTE_IPv4
> new=RTE_IPV4
> git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH 4/5] replace RTE_ETHER_TYPE_IPv4 with uppercase RTE_ETHER_TYPE_IPV4
2019-05-29 11:29 ` [dpdk-dev] [PATCH 4/5] replace RTE_ETHER_TYPE_IPv4 with uppercase RTE_ETHER_TYPE_IPV4 David Marchand
@ 2019-05-29 14:26 ` Olivier Matz
0 siblings, 0 replies; 13+ messages in thread
From: Olivier Matz @ 2019-05-29 14:26 UTC (permalink / raw)
To: David Marchand
Cc: dev, ferruh.yigit, thomas, maxime.coquelin, stephen,
Adrien Mazarguil, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger,
Chas Williams, Cristian Dumitrescu, Marko Kovacevic, Ori Kam,
Bruce Richardson, Pablo de Lara, Radu Nicolau, Akhil Goyal,
Tomasz Kantecki, John McNamara, Ajit Khaparde, Somnath Kotur,
Rahul Lakkireddy, Hemant Agrawal, Shreyansh Jain, John Daley,
Hyong Youb Kim, Beilei Xing, Qi Zhang, Konstantin Ananyev,
Shahaf Shuler, Yongseok Koh, Rasesh Mody, Shahed Shaikh,
Keith Wiles, Declan Doherty, David Hunt, Harry van Haaren,
Xiaoyun Li, Nikhil Rao, Jerin Jacob, Tiwei Bie, Zhihong Wang
On Wed, May 29, 2019 at 01:29:17PM +0200, David Marchand wrote:
> Since we change this macro, we might as well avoid triggering complaints
> from checkpatch because of mixed case.
>
> old=RTE_ETHER_TYPE_IPv4
> new=RTE_ETHER_TYPE_IPV4
> git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH 5/5] replace RTE_ETHER_TYPE_IPv6 with uppercase RTE_ETHER_TYPE_IPV6
2019-05-29 11:29 ` [dpdk-dev] [PATCH 5/5] replace RTE_ETHER_TYPE_IPv6 with uppercase RTE_ETHER_TYPE_IPV6 David Marchand
@ 2019-05-29 14:27 ` Olivier Matz
0 siblings, 0 replies; 13+ messages in thread
From: Olivier Matz @ 2019-05-29 14:27 UTC (permalink / raw)
To: David Marchand
Cc: dev, ferruh.yigit, thomas, maxime.coquelin, stephen,
Adrien Mazarguil, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger,
Chas Williams, Ajit Khaparde, Somnath Kotur, Rahul Lakkireddy,
Hemant Agrawal, Shreyansh Jain, John Daley, Hyong Youb Kim,
Beilei Xing, Qi Zhang, Konstantin Ananyev, Shahaf Shuler,
Yongseok Koh, Rasesh Mody, Shahed Shaikh, Keith Wiles,
Marko Kovacevic, Ori Kam, Bruce Richardson, Pablo de Lara,
Radu Nicolau, Akhil Goyal, Tomasz Kantecki, David Hunt,
John McNamara, Harry van Haaren, Xiaoyun Li, Tiwei Bie,
Zhihong Wang, Nikhil Rao, Jerin Jacob, Cristian Dumitrescu
On Wed, May 29, 2019 at 01:29:18PM +0200, David Marchand wrote:
> Since we change this macro, we might as well avoid triggering complaints
> from checkpatch because of mixed case.
>
> old=RTE_ETHER_TYPE_IPv6
> new=RTE_ETHER_TYPE_IPV6
> git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH 3/5] replace RTE_IPv4 with uppercase RTE_IPV4
2019-05-29 14:26 ` Olivier Matz
@ 2019-06-03 8:58 ` David Marchand
2019-06-03 13:30 ` Thomas Monjalon
1 sibling, 0 replies; 13+ messages in thread
From: David Marchand @ 2019-06-03 8:58 UTC (permalink / raw)
To: Yigit, Ferruh, Thomas Monjalon
Cc: dev, Maxime Coquelin, Stephen Hemminger, Konstantin Ananyev,
Wenzhuo Lu, Jingjing Wu, Bernard Iremonger, Byron Marohn,
Pablo de Lara Guarch, Yipeng Wang, Sameh Gobriel,
Bruce Richardson, Chas Williams, Vladimir Medvedkin,
Cristian Dumitrescu, John McNamara, Marko Kovacevic, Ori Kam,
Radu Nicolau, Akhil Goyal, Tomasz Kantecki, David Hunt,
Harry van Haaren, Xiaoyun Li, Olivier Matz
Thomas, Ferruh,
Can I get your review on these patches?
Then a quick merge would help, so that I send the changes on OVS
dpdk-latest branch.
Thanks!
--
David Marchand
On Wed, May 29, 2019 at 6:50 PM Olivier Matz <olivier.matz@6wind.com> wrote:
> On Wed, May 29, 2019 at 01:29:16PM +0200, David Marchand wrote:
> > Since we change this macro, we might as well avoid triggering complaints
> > from checkpatch because of mixed case.
> >
> > old=RTE_IPv4
> > new=RTE_IPV4
> > git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [dpdk-dev] [PATCH 3/5] replace RTE_IPv4 with uppercase RTE_IPV4
2019-05-29 14:26 ` Olivier Matz
2019-06-03 8:58 ` David Marchand
@ 2019-06-03 13:30 ` Thomas Monjalon
1 sibling, 0 replies; 13+ messages in thread
From: Thomas Monjalon @ 2019-06-03 13:30 UTC (permalink / raw)
To: Olivier Matz
Cc: dev, David Marchand, ferruh.yigit, maxime.coquelin, stephen,
Konstantin Ananyev, Wenzhuo Lu, Jingjing Wu, Bernard Iremonger,
Byron Marohn, Pablo de Lara Guarch, Yipeng Wang, Sameh Gobriel,
Bruce Richardson, Chas Williams, Vladimir Medvedkin,
Cristian Dumitrescu, John McNamara, Marko Kovacevic, Ori Kam,
Radu Nicolau, Akhil Goyal, Tomasz Kantecki, David Hunt,
Harry van Haaren, Xiaoyun Li
29/05/2019 16:26, Olivier Matz:
> On Wed, May 29, 2019 at 01:29:16PM +0200, David Marchand wrote:
> > Since we change this macro, we might as well avoid triggering complaints
> > from checkpatch because of mixed case.
> >
> > old=RTE_IPv4
> > new=RTE_IPV4
> > git grep -lw $old | xargs sed -i -e "s/\<$old\>/$new/g"
> >
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> Reviewed-by: Olivier Matz <olivier.matz@6wind.com>
Series applied, thanks
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2019-06-03 13:30 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 11:29 [dpdk-dev] [PATCH 1/5] test/table: remove duplicate macro David Marchand
2019-05-29 11:29 ` [dpdk-dev] [PATCH 2/5] net/tap: revert changes on rte_ prefixing David Marchand
2019-05-29 13:36 ` Wiles, Keith
2019-05-29 14:26 ` Olivier Matz
2019-05-29 11:29 ` [dpdk-dev] [PATCH 3/5] replace RTE_IPv4 with uppercase RTE_IPV4 David Marchand
2019-05-29 14:26 ` Olivier Matz
2019-06-03 8:58 ` David Marchand
2019-06-03 13:30 ` Thomas Monjalon
2019-05-29 11:29 ` [dpdk-dev] [PATCH 4/5] replace RTE_ETHER_TYPE_IPv4 with uppercase RTE_ETHER_TYPE_IPV4 David Marchand
2019-05-29 14:26 ` Olivier Matz
2019-05-29 11:29 ` [dpdk-dev] [PATCH 5/5] replace RTE_ETHER_TYPE_IPv6 with uppercase RTE_ETHER_TYPE_IPV6 David Marchand
2019-05-29 14:27 ` Olivier Matz
2019-05-29 14:25 ` [dpdk-dev] [PATCH 1/5] test/table: remove duplicate macro Olivier Matz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).