Skip to contentSkip to conversation

prefix network structures

RFC Superseded Olivier Matz 9 participants 86 messages Oct 24, 2018 – May 29, 2019 Page 4 of 5

Subsystems (3)
lore
Share & tools
lore
#51 lore raw

RFC v2 11/14 net: add rte prefix to ip defines

In reply to Olivier Matz

Add 'RTE_' prefix to defines:
- rename IPv4( as RTE_IPv4(.
- rename IPV4_MAX_PKT_LEN as RTE_IPV4_MAX_PKT_LEN.
- rename IPV4_HDR_IHL_MASK as RTE_IPV4_HDR_IHL_MASK.
- rename IPV4_IHL_MULTIPLIER as RTE_IPV4_IHL_MULTIPLIER.
- rename IPV4_HDR_DF_SHIFT as RTE_IPV4_HDR_DF_SHIFT.
- rename IPV4_HDR_MF_SHIFT as RTE_IPV4_HDR_MF_SHIFT.
- rename IPV4_HDR_FO_SHIFT as RTE_IPV4_HDR_FO_SHIFT.
- rename IPV4_HDR_DF_FLAG as RTE_IPV4_HDR_DF_FLAG.
- rename IPV4_HDR_MF_FLAG as RTE_IPV4_HDR_MF_FLAG.
- rename IPV4_HDR_OFFSET_MASK as RTE_IPV4_HDR_OFFSET_MASK.
- rename IPV4_HDR_OFFSET_UNITS as RTE_IPV4_HDR_OFFSET_UNITS.
- rename IPV4_ANY as RTE_IPV4_ANY.
- rename IPV4_LOOPBACK as RTE_IPV4_LOOPBACK.
- rename IPV4_BROADCAST as RTE_IPV4_BROADCAST.
- rename IPV4_ALLHOSTS_GROUP as RTE_IPV4_ALLHOSTS_GROUP.
- rename IPV4_ALLRTRS_GROUP as RTE_IPV4_ALLRTRS_GROUP.
- rename IPV4_MAX_LOCAL_GROUP as RTE_IPV4_MAX_LOCAL_GROUP.
- rename IPV4_MIN_MCAST as RTE_IPV4_MIN_MCAST.
- rename IPV4_MAX_MCAST as RTE_IPV4_MAX_MCAST.
- rename IS_IPV4_MCAST as RTE_IS_IPV4_MCAST.
- rename IPV6_HDR_FL_SHIFT as RTE_IPV6_HDR_FL_SHIFT.
- rename IPV6_HDR_TC_SHIFT as RTE_IPV6_HDR_TC_SHIFT.
- rename IPV6_HDR_FL_MASK as RTE_IPV6_HDR_FL_MASK.
- rename IPV6_HDR_TC_MASK as RTE_IPV6_HDR_TC_MASK.

---
 app/test-acl/main.c                                |   2 +-
 app/test-pmd/cmdline_flow.c                        |   4 +-
 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                              |   6 +-
 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                          |   8 +-
 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 +--
 doc/guides/sample_app_ug/ipv4_multicast.rst        |   2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c             |   4 +-
 drivers/net/ena/ena_ethdev.c                       |   2 +-
 drivers/net/i40e/i40e_flow.c                       |   4 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                     |   2 +-
 drivers/net/mlx5/mlx5_flow_tcf.c                   |  16 +--
 drivers/net/mlx5/mlx5_flow_verbs.c                 |  16 +--
 drivers/net/tap/tap_bpf_program.c                  |   6 +-
 drivers/net/vmxnet3/vmxnet3_rxtx.c                 |   4 +-
 examples/flow_classify/flow_classify.c             |   2 +-
 examples/ip_fragmentation/main.c                   |  16 +--
 examples/ip_reassembly/main.c                      |  16 +--
 examples/ipsec-secgw/sa.c                          |   4 +-
 examples/ipv4_multicast/main.c                     |  32 +++---
 examples/l2fwd-crypto/main.c                       |   4 +-
 examples/l3fwd-acl/main.c                          |   2 +-
 examples/l3fwd-power/main.c                        |  24 ++--
 examples/l3fwd-vf/main.c                           |  24 ++--
 examples/l3fwd/l3fwd_em.c                          |  20 ++--
 examples/l3fwd/l3fwd_lpm.c                         |  16 +--
 examples/performance-thread/l3fwd-thread/main.c    |  32 +++---
 lib/librte_gro/gro_tcp4.c                          |   2 +-
 lib/librte_gro/gro_vxlan_tcp4.c                    |   4 +-
 lib/librte_gso/gso_common.h                        |   4 +-
 lib/librte_ip_frag/rte_ip_frag.h                   |   4 +-
 lib/librte_ip_frag/rte_ipv4_fragmentation.c        |  16 +--
 lib/librte_ip_frag/rte_ipv4_reassembly.c           |   8 +-
 lib/librte_net/rte_ip.h                            |  50 ++++-----
 lib/librte_net/rte_net.c                           |   6 +-
 lib/librte_port/rte_port_ras.c                     |   4 +-
 50 files changed, 358 insertions(+), 358 deletions(-)
app/test-acl/main.c +1 -1
index b80179417..eb6294396 100644
@@ -625,7 +625,7 @@ parse_ipv4_net(const char *in, uint32_t *addr, uint32_t *mask_len)
 	GET_CB_FIELD(in, d, 0, UINT8_MAX, '/');
 	GET_CB_FIELD(in, m, 0, sizeof(uint32_t) * CHAR_BIT, 0);
 
-	addr[0] = IPv4(a, b, c, d);
+	addr[0] = RTE_IPv4(a, b, c, d);
 	mask_len[0] = m;
 
 	return 0;
app/test-pmd/cmdline_flow.c +2 -2
index b1b9b26fd..2251e2d0a 100644
@@ -3522,12 +3522,12 @@ parse_vc_action_vxlan_encap(struct context *ctx, const struct token *token,
 			memcpy(&ipv6_mask_tos, &rte_flow_item_ipv6_mask,
 			       sizeof(ipv6_mask_tos));
 			ipv6_mask_tos.hdr.vtc_flow |=
-				RTE_BE32(0xfful << IPV6_HDR_TC_SHIFT);
+				RTE_BE32(0xfful << RTE_IPV6_HDR_TC_SHIFT);
 			ipv6_mask_tos.hdr.hop_limits = 0xff;
 			action_vxlan_encap_data->item_ipv6.hdr.vtc_flow |=
 				rte_cpu_to_be_32
 					((uint32_t)vxlan_encap_conf.ip_tos <<
-					 IPV6_HDR_TC_SHIFT);
+					 RTE_IPV6_HDR_TC_SHIFT);
 			action_vxlan_encap_data->item_ipv6.hdr.hop_limits =
 					vxlan_encap_conf.ip_ttl;
 			action_vxlan_encap_data->items[2].mask =
app/test-pmd/flowgen.c +2 -2
index 45a5e13e0..46fd6e41f 100644
@@ -72,8 +72,8 @@
 
 /* hardcoded configuration (for now) */
 static unsigned cfg_n_flows	= 1024;
-static uint32_t cfg_ip_src	= IPv4(10, 254, 0, 0);
-static uint32_t cfg_ip_dst	= 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	=
app/test-pmd/testpmd.c +4 -4
index b18e2685f..fb2e0f1ce 100644
@@ -476,8 +476,8 @@ struct vxlan_encap_conf vxlan_encap_conf = {
 	.vni = "\x00\x00\x00",
 	.udp_src = 0,
 	.udp_dst = RTE_BE16(4789),
-	.ipv4_src = IPv4(127, 0, 0, 1),
-	.ipv4_dst = 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"
@@ -493,8 +493,8 @@ struct nvgre_encap_conf nvgre_encap_conf = {
 	.select_ipv4 = 1,
 	.select_vlan = 0,
 	.tni = "\x00\x00\x00",
-	.ipv4_src = IPv4(127, 0, 0, 1),
-	.ipv4_dst = 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"
app/test/test_acl.c +4 -4
index b1f75d1bc..8663ff031 100644
@@ -515,15 +515,15 @@ test_build_ports_range(void)
 	static struct ipv4_7tuple test_data[] = {
 		{
 			.proto = 6,
-			.ip_src = IPv4(10, 1, 1, 1),
-			.ip_dst = 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 = IPv4(127, 84, 33, 1),
-			.ip_dst = 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,
 		},
app/test/test_acl.h +61 -61

304 lines not on this page · raw message

app/test/test_efd.c +10 -10
index 93e8f1cbb..2868712bb 100644
@@ -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 = IPv4(0x03, 0x02, 0x01, 0x00),
-		.ip_dst = 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 = IPv4(0x13, 0x12, 0x11, 0x10),
-		.ip_dst = 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 = IPv4(0x23, 0x22, 0x21, 0x20),
-		.ip_dst = 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 = IPv4(0x33, 0x32, 0x31, 0x30),
-		.ip_dst = 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 = IPv4(0x43, 0x42, 0x41, 0x40),
-		.ip_dst = 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,
app/test/test_flow_classify.c +4 -4
index 96e371691..ad6c481fe 100644
@@ -95,7 +95,7 @@ static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
  *  dst mask 255.255.255.00 / udp src is 32 dst is 33 / end"
  */
 static struct rte_flow_item_ipv4 ipv4_udp_spec_1 = {
-	{ 0, 0, 0, 0, 0, 0, IPPROTO_UDP, 0, IPv4(2, 2, 2, 3), IPv4(2, 2, 2, 7)}
+	{ 0, 0, 0, 0, 0, 0, IPPROTO_UDP, 0, RTE_IPv4(2, 2, 2, 3), RTE_IPv4(2, 2, 2, 7)}
 };
 static const struct rte_flow_item_ipv4 ipv4_mask_24 = {
 	.hdr = {
@@ -131,7 +131,7 @@ static struct rte_flow_item  end_item_bad = { -1, 0, 0, 0 };
  *  dst mask 255.255.255.00 / tcp src is 16 dst is 17 / end"
  */
 static struct rte_flow_item_ipv4 ipv4_tcp_spec_1 = {
-	{ 0, 0, 0, 0, 0, 0, IPPROTO_TCP, 0, IPv4(1, 2, 3, 4), IPv4(5, 6, 7, 8)}
+	{ 0, 0, 0, 0, 0, 0, IPPROTO_TCP, 0, RTE_IPv4(1, 2, 3, 4), RTE_IPv4(5, 6, 7, 8)}
 };
 
 static struct rte_flow_item_tcp tcp_spec_1 = {
@@ -149,8 +149,8 @@ static struct rte_flow_item  tcp_item_1 = { RTE_FLOW_ITEM_TYPE_TCP,
  *  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, IPv4(11, 12, 13, 14),
-	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 = {
app/test/test_hash.c +10 -10
index 390fbef87..907e6f191 100644
@@ -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 = IPv4(0x03, 0x02, 0x01, 0x00),
-	.ip_dst = 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 = IPv4(0x13, 0x12, 0x11, 0x10),
-	.ip_dst = 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 = IPv4(0x23, 0x22, 0x21, 0x20),
-	.ip_dst = 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 = IPv4(0x33, 0x32, 0x31, 0x30),
-	.ip_dst = 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 = IPv4(0x43, 0x42, 0x41, 0x40),
-	.ip_dst = 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,
app/test/test_ipsec.c +3 -3
index 2cad4096c..343d933a9 100644
@@ -536,11 +536,11 @@ const char null_encrypted_data[] =
 
 struct rte_ipv4_hdr ipv4_outer  = {
 	.version_ihl = IPVERSION << 4 |
-		sizeof(ipv4_outer) / IPV4_IHL_MULTIPLIER,
+		sizeof(ipv4_outer) / RTE_IPV4_IHL_MULTIPLIER,
 	.time_to_live = IPDEFTTL,
 	.next_proto_id = IPPROTO_ESP,
-	.src_addr = IPv4(192, 168, 1, 100),
-	.dst_addr = 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 *
app/test/test_link_bonding_mode4.c +2 -2
index fba629d43..4968cd91c 100644
@@ -728,8 +728,8 @@ generate_packets(struct rte_ether_addr *src_mac,
 
 	uint16_t src_port = 10, dst_port = 20;
 
-	uint32_t ip_src[4] = { [0 ... 2] = 0xDEADBEEF, [3] = IPv4(192, 168, 0, 1) };
-	uint32_t ip_dst[4] = { [0 ... 2] = 0xFEEDFACE, [3] = 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 udp_hdr pkt_udp_hdr;
app/test/test_lpm.c +38 -38

283 lines not on this page · raw message

app/test/test_lpm_perf.c +5 -5
index 3b98ce0c8..b54650367 100644
@@ -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(IPv4(0, 0, 0, 0), 8);
-	insert_rule_in_random_pos(IPv4(10, 2, 23, 147), 32);
-	insert_rule_in_random_pos(IPv4(192, 168, 100, 10), 24);
-	insert_rule_in_random_pos(IPv4(192, 168, 25, 100), 24);
-	insert_rule_in_random_pos(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
app/test/test_member.c +10 -10
index e2a3932f2..53287fcaf 100644
@@ -41,36 +41,36 @@ struct flow_key {
 /* Keys used by unit test functions */
 static struct flow_key keys[NUM_SAMPLES] = {
 	{
-		.ip_src = IPv4(0x03, 0x02, 0x01, 0x00),
-		.ip_dst = 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 = IPv4(0x13, 0x12, 0x11, 0x10),
-		.ip_dst = 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 = IPv4(0x23, 0x22, 0x21, 0x20),
-		.ip_dst = 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 = IPv4(0x33, 0x32, 0x31, 0x30),
-		.ip_dst = 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 = IPv4(0x43, 0x42, 0x41, 0x40),
-		.ip_dst = 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,
app/test/test_sched.c +1 -1
index 4781c2307..628cf147d 100644
@@ -92,7 +92,7 @@ prepare_pkt(struct rte_sched_port *port, struct rte_mbuf *mbuf)
 	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 = 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,
app/test/test_table_acl.c +4 -4
index 22136a396..e01e1f946 100644
@@ -7,7 +7,7 @@
 #include "test_table.h"
 #include "test_table_acl.h"
 
-#define 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))
@@ -116,7 +116,7 @@ parse_ipv4_net(const char *in, uint32_t *addr, uint32_t *mask_len)
 	GET_CB_FIELD(in, d, 0, UINT8_MAX, '/');
 	GET_CB_FIELD(in, m, 0, sizeof(uint32_t) * CHAR_BIT, 0);
 
-	addr[0] = IPv4(a, b, c, d);
+	addr[0] = RTE_IPv4(a, b, c, d);
 	mask_len[0] = m;
 
 	return 0;
@@ -662,8 +662,8 @@ test_pipeline_single_filter(int expected_count)
 				sizeof(struct ipv4_5tuple));
 
 			five_tuple.proto = j;
-			five_tuple.ip_src = rte_bswap32(IPv4(192, 168, j, 1));
-			five_tuple.ip_dst = rte_bswap32(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);
 
app/test/test_thash.c +5 -5
index bf332c9e9..3724ea5be 100644
@@ -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[] = {
-{IPv4(161, 142, 100, 80), IPv4(66, 9, 149, 187),
+{RTE_IPv4(161, 142, 100, 80), RTE_IPv4(66, 9, 149, 187),
 	1766, 2794, 0x323e8fc2, 0x51ccc178},
-{IPv4(65, 69, 140, 83), IPv4(199, 92, 111, 2),
+{RTE_IPv4(65, 69, 140, 83), RTE_IPv4(199, 92, 111, 2),
 	4739, 14230, 0xd718262a, 0xc626b0ea},
-{IPv4(12, 22, 207, 184), IPv4(24, 19, 198, 95),
+{RTE_IPv4(12, 22, 207, 184), RTE_IPv4(24, 19, 198, 95),
 	38024, 12898, 0xd2d0a5de, 0x5c2b394a},
-{IPv4(209, 142, 163, 6), IPv4(38, 27, 205, 30),
+{RTE_IPv4(209, 142, 163, 6), RTE_IPv4(38, 27, 205, 30),
 	2217, 48228, 0x82989176, 0xafc7327f},
-{IPv4(202, 188, 127, 2), IPv4(153, 39, 163, 191),
+{RTE_IPv4(202, 188, 127, 2), RTE_IPv4(153, 39, 163, 191),
 	1303, 44251, 0x5d1809c5, 0x10e828a2},
 };
 
doc/guides/prog_guide/packet_classif_access_ctrl.rst +3 -3
index 6887e4dc6..010ec045d 100644
@@ -419,7 +419,7 @@ Classify with Multiple Categories
             .data = {.userdata = 1, .category_mask = 3, .priority = 1},
 
             /* destination IPv4 */
-            .field[2] = {.value.u32 = 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 = 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 = 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,},
doc/guides/sample_app_ug/ip_frag.rst +8 -8
index 2583f0c3d..49ba0d8bc 100644
@@ -104,14 +104,14 @@ The default l3fwd_ipv4_route_array table is:
 .. code-block:: c
 
     struct l3fwd_ipv4_route l3fwd_ipv4_route_array[] = {
-        {IPv4(100, 10, 0, 0), 16, 0},
-        {IPv4(100, 20, 0, 0), 16, 1},
-        {IPv4(100, 30, 0, 0), 16, 2},
-        {IPv4(100, 40, 0, 0), 16, 3},
-        {IPv4(100, 50, 0, 0), 16, 4},
-        {IPv4(100, 60, 0, 0), 16, 5},
-        {IPv4(100, 70, 0, 0), 16, 6},
-        {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:
doc/guides/sample_app_ug/ip_reassembly.rst +8 -8
index a628b63cb..99dcd9556 100644
@@ -107,14 +107,14 @@ The default l3fwd_ipv4_route_array table is:
 .. code-block:: c
 
     struct l3fwd_ipv4_route l3fwd_ipv4_route_array[] = {
-        {IPv4(100, 10, 0, 0), 16, 0},
-        {IPv4(100, 20, 0, 0), 16, 1},
-        {IPv4(100, 30, 0, 0), 16, 2},
-        {IPv4(100, 40, 0, 0), 16, 3},
-        {IPv4(100, 50, 0, 0), 16, 4},
-        {IPv4(100, 60, 0, 0), 16, 5},
-        {IPv4(100, 70, 0, 0), 16, 6},
-        {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:
doc/guides/sample_app_ug/ipv4_multicast.rst +1 -1
index 46c920433..ea7902b2d 100644
@@ -155,7 +155,7 @@ if the routing table has any ports assigned to the destination address:
 
 .. code-block:: c
 
-    if (!IS_IPV4_MCAST(dest_addr) ||
+    if (!RTE_IS_IPV4_MCAST(dest_addr) ||
        (hash = rte_fbk_hash_lookup(mcast_hash, dest_addr)) <= 0 ||
        (port_mask = hash & enabled_port_mask) == 0) {
            rte_pktmbuf_free(m);
drivers/net/bonding/rte_eth_bond_pmd.c +2 -2
index c7fcd9b8e..66ed885fa 100644
@@ -857,8 +857,8 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
 			if (likely(rte_ipv4_frag_pkt_is_fragmented(ipv4_hdr)
 								== 0)) {
 				ip_hdr_offset = (ipv4_hdr->version_ihl
-					& IPV4_HDR_IHL_MASK) *
-					IPV4_IHL_MULTIPLIER;
+					& RTE_IPV4_HDR_IHL_MASK) *
+					RTE_IPV4_IHL_MULTIPLIER;
 
 				if (ipv4_hdr->next_proto_id == IPPROTO_TCP) {
 					tcp_hdr = (struct tcp_hdr *)
drivers/net/ena/ena_ethdev.c +1 -1
index 469d7aaf6..3671b3876 100644
@@ -2157,7 +2157,7 @@ eth_ena_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 						 m->l2_len);
 		frag_field = rte_be_to_cpu_16(ip_hdr->fragment_offset);
 
-		if ((frag_field & IPV4_HDR_DF_FLAG) != 0) {
+		if ((frag_field & RTE_IPV4_HDR_DF_FLAG) != 0) {
 			m->packet_type |= RTE_PTYPE_L4_NONFRAG;
 
 			/* If IPv4 header has DF flag enabled and TSO support is
drivers/net/i40e/i40e_flow.c +2 -2
index eab451447..e4b5bbb2d 100644
@@ -2607,8 +2607,8 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 				/* Check if it is fragment. */
 				frag_off = ipv4_spec->hdr.fragment_offset;
 				frag_off = rte_be_to_cpu_16(frag_off);
-				if (frag_off & IPV4_HDR_OFFSET_MASK ||
-				    frag_off & IPV4_HDR_MF_FLAG)
+				if (frag_off & RTE_IPV4_HDR_OFFSET_MASK ||
+				    frag_off & RTE_IPV4_HDR_MF_FLAG)
 					pctype = I40E_FILTER_PCTYPE_FRAG_IPV4;
 
 				/* Get the filter info */
drivers/net/ixgbe/ixgbe_rxtx.c +1 -1
index 5b7953a7f..217340e59 100644
@@ -4537,7 +4537,7 @@ ixgbe_get_rscctl_maxdesc(struct rte_mempool *pool)
 
 	/* MAXDESC * SRRCTL.BSIZEPKT must not exceed 64 KB minus one */
 	uint16_t maxdesc =
-		IPV4_MAX_PKT_LEN /
+		RTE_IPV4_MAX_PKT_LEN /
 			(mp_priv->mbuf_data_room_size - RTE_PKTMBUF_HEADROOM);
 
 	if (maxdesc >= 16)
drivers/net/mlx5/mlx5_flow_tcf.c +8 -8
index dd5a090af..743ae8546 100644
@@ -552,7 +552,7 @@ static const struct {
 	},
 	.ipv6.hdr = {
 		.proto = 0xff,
-		.vtc_flow = RTE_BE32(0xfful << IPV6_HDR_FL_SHIFT),
+		.vtc_flow = RTE_BE32(0xfful << RTE_IPV6_HDR_FL_SHIFT),
 		.hop_limits = 0xff,
 		.src_addr =
 			"\xff\xff\xff\xff\xff\xff\xff\xff"
@@ -1426,7 +1426,7 @@ flow_tcf_validate_vxlan_encap_ipv6(const struct rte_flow_item *item,
 					  " vxlan encapsulation");
 	}
 	msk6 = (rte_be_to_cpu_32(mask->hdr.vtc_flow) >>
-		IPV6_HDR_TC_SHIFT) & 0xff;
+		RTE_IPV6_HDR_TC_SHIFT) & 0xff;
 	if (msk6 && msk6 != 0xff)
 		return rte_flow_error_set(error, ENOTSUP,
 					  RTE_FLOW_ERROR_TYPE_ITEM_MASK, mask,
@@ -2551,7 +2551,7 @@ flow_tcf_get_items_size(const struct rte_flow_attr *attr,
 			if (ipv6 && ipv6->hdr.hop_limits)
 				size += SZ_NLATTR_TYPE_OF(uint8_t) * 2;
 			if (ipv6 && (rte_be_to_cpu_32(ipv6->hdr.vtc_flow) &
-				     (0xfful << IPV6_HDR_TC_SHIFT)))
+				     (0xfful << RTE_IPV6_HDR_TC_SHIFT)))
 				size += SZ_NLATTR_TYPE_OF(uint8_t) * 2;
 			break;
 		}
@@ -2639,7 +2639,7 @@ flow_tcf_vxlan_encap_size(const struct rte_flow_action *action)
 			if (ipv6 && ipv6->hdr.hop_limits)
 				size += SZ_NLATTR_TYPE_OF(uint8_t) * 2;
 			if (ipv6 && (rte_be_to_cpu_32(ipv6->hdr.vtc_flow) &
-				     (0xfful << IPV6_HDR_TC_SHIFT)))
+				     (0xfful << RTE_IPV6_HDR_TC_SHIFT)))
 				size += SZ_NLATTR_TYPE_OF(uint8_t) * 2;
 			break;
 		}
@@ -3037,11 +3037,11 @@ flow_tcf_parse_vxlan_encap_ipv6(const struct rte_flow_item_ipv6 *spec,
 		       FLOW_TCF_ENCAP_IPV6_DST;
 	if (mask) {
 		if ((rte_be_to_cpu_32(mask->hdr.vtc_flow) >>
-		    IPV6_HDR_TC_SHIFT) & 0xff) {
+		    RTE_IPV6_HDR_TC_SHIFT) & 0xff) {
 			encap->mask |= FLOW_TCF_ENCAP_IP_TOS;
 			encap->ip_tos = (rte_be_to_cpu_32
 						(spec->hdr.vtc_flow) >>
-						 IPV6_HDR_TC_SHIFT) & 0xff;
+						 RTE_IPV6_HDR_TC_SHIFT) & 0xff;
 		}
 		if (mask->hdr.hop_limits) {
 			encap->mask |= FLOW_TCF_ENCAP_IP_TTL;
@@ -3590,11 +3590,11 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
 					 mask.ipv6->hdr.hop_limits);
 			}
 			msk6 = (rte_be_to_cpu_32(mask.ipv6->hdr.vtc_flow) >>
-				IPV6_HDR_TC_SHIFT) & 0xff;
+				RTE_IPV6_HDR_TC_SHIFT) & 0xff;
 			if (msk6) {
 				tos6 = (rte_be_to_cpu_32
 					(spec.ipv6->hdr.vtc_flow) >>
-						IPV6_HDR_TC_SHIFT) & 0xff;
+						RTE_IPV6_HDR_TC_SHIFT) & 0xff;
 				mnl_attr_put_u8
 					(nlh, tunnel_outer ?
 					 TCA_FLOWER_KEY_ENC_IP_TOS :
drivers/net/mlx5/mlx5_flow_verbs.c +8 -8
index 252febf35..e9913d670 100644
@@ -476,17 +476,17 @@ flow_verbs_translate_item_ipv6(struct mlx5_flow *dev_flow,
 		vtc_flow_val = rte_be_to_cpu_32(spec->hdr.vtc_flow);
 		vtc_flow_mask = rte_be_to_cpu_32(mask->hdr.vtc_flow);
 		ipv6.val.flow_label =
-			rte_cpu_to_be_32((vtc_flow_val & IPV6_HDR_FL_MASK) >>
-					 IPV6_HDR_FL_SHIFT);
-		ipv6.val.traffic_class = (vtc_flow_val & IPV6_HDR_TC_MASK) >>
-					 IPV6_HDR_TC_SHIFT;
+			rte_cpu_to_be_32((vtc_flow_val & RTE_IPV6_HDR_FL_MASK) >>
+					 RTE_IPV6_HDR_FL_SHIFT);
+		ipv6.val.traffic_class = (vtc_flow_val & RTE_IPV6_HDR_TC_MASK) >>
+					 RTE_IPV6_HDR_TC_SHIFT;
 		ipv6.val.next_hdr = spec->hdr.proto;
 		ipv6.val.hop_limit = spec->hdr.hop_limits;
 		ipv6.mask.flow_label =
-			rte_cpu_to_be_32((vtc_flow_mask & IPV6_HDR_FL_MASK) >>
-					 IPV6_HDR_FL_SHIFT);
-		ipv6.mask.traffic_class = (vtc_flow_mask & IPV6_HDR_TC_MASK) >>
-					  IPV6_HDR_TC_SHIFT;
+			rte_cpu_to_be_32((vtc_flow_mask & RTE_IPV6_HDR_FL_MASK) >>
+					 RTE_IPV6_HDR_FL_SHIFT);
+		ipv6.mask.traffic_class = (vtc_flow_mask & RTE_IPV6_HDR_TC_MASK) >>
+					  RTE_IPV6_HDR_TC_SHIFT;
 		ipv6.mask.next_hdr = mask->hdr.proto;
 		ipv6.mask.hop_limit = mask->hdr.hop_limits;
 		/* Remove unwanted bits from values. */
drivers/net/tap/tap_bpf_program.c +3 -3
index 2b1dba15b..531569b12 100644
@@ -19,7 +19,7 @@
 #include "tap_rss.h"
 
 /** Create IPv4 address */
-#define IPv4(a, b, c, d) ((__u32)(((a) & 0xff) << 24) | \
+#define RTE_IPv4(a, b, c, d) ((__u32)(((a) & 0xff) << 24) | \
 		(((b) & 0xff) << 16) | \
 		(((c) & 0xff) << 8)  | \
 		((d) & 0xff))
@@ -157,11 +157,11 @@ rss_l3_l4(struct __sk_buff *skb)
 		__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 = IPv4(*(src_dst_addr + 0),
+			.src_addr = RTE_IPv4(*(src_dst_addr + 0),
 					*(src_dst_addr + 1),
 					*(src_dst_addr + 2),
 					*(src_dst_addr + 3)),
-			.dst_addr = IPv4(*(src_dst_addr + 4),
+			.dst_addr = RTE_IPv4(*(src_dst_addr + 4),
 					*(src_dst_addr + 5),
 					*(src_dst_addr + 6),
 					*(src_dst_addr + 7)),
drivers/net/vmxnet3/vmxnet3_rxtx.c +2 -2
index 7749458e4..949798c39 100644
@@ -684,8 +684,8 @@ vmxnet3_guess_mss(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
 					- sizeof(struct tcp_hdr);
 
 		ipv4_hdr = (struct rte_ipv4_hdr *)(ptr + hlen);
-		hlen += (ipv4_hdr->version_ihl & IPV4_HDR_IHL_MASK) *
-				IPV4_IHL_MULTIPLIER;
+		hlen += (ipv4_hdr->version_ihl & RTE_IPV4_HDR_IHL_MASK) *
+				RTE_IPV4_IHL_MULTIPLIER;
 	} else if (rcd->v6) {
 		if (unlikely(slen < hlen + sizeof(struct rte_ipv6_hdr)))
 			return hw->mtu - sizeof(struct rte_ipv6_hdr) -
examples/flow_classify/flow_classify.c +1 -1
index c75a410f4..e68d0f694 100644
@@ -379,7 +379,7 @@ parse_ipv4_net(char *in, uint32_t *addr, uint32_t *mask_len)
 	if (get_cb_field(&in, &m, 0, sizeof(uint32_t) * CHAR_BIT, 0))
 		return -EINVAL;
 
-	addr[0] = IPv4(a, b, c, d);
+	addr[0] = RTE_IPv4(a, b, c, d);
 	mask_len[0] = m;
 	return 0;
 }
examples/ip_fragmentation/main.c +8 -8
index 9c8a0a9b9..ba6e29c31 100644
@@ -168,14 +168,14 @@ struct l3fwd_ipv4_route {
 };
 
 struct l3fwd_ipv4_route l3fwd_ipv4_route_array[] = {
-		{IPv4(100,10,0,0), 16, 0},
-		{IPv4(100,20,0,0), 16, 1},
-		{IPv4(100,30,0,0), 16, 2},
-		{IPv4(100,40,0,0), 16, 3},
-		{IPv4(100,50,0,0), 16, 4},
-		{IPv4(100,60,0,0), 16, 5},
-		{IPv4(100,70,0,0), 16, 6},
-		{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},
 };
 
 /*
examples/ip_reassembly/main.c +8 -8
index 00a95e07a..97c499425 100644
@@ -190,14 +190,14 @@ struct l3fwd_ipv4_route {
 };
 
 struct l3fwd_ipv4_route l3fwd_ipv4_route_array[] = {
-		{IPv4(100,10,0,0), 16, 0},
-		{IPv4(100,20,0,0), 16, 1},
-		{IPv4(100,30,0,0), 16, 2},
-		{IPv4(100,40,0,0), 16, 3},
-		{IPv4(100,50,0,0), 16, 4},
-		{IPv4(100,60,0,0), 16, 5},
-		{IPv4(100,70,0,0), 16, 6},
-		{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},
 };
 
 /*
examples/ipsec-secgw/sa.c +2 -2
index 1d0020567..ef63f59d5 100644
@@ -951,7 +951,7 @@ get_spi_proto(uint32_t spi, enum rte_security_ipsec_sa_direction dir)
 		if (rc6 >= 0) {
 			RTE_LOG(ERR, IPSEC,
 				"%s: SPI %u used simultaeously by "
-				"IPv4(%d) and IPv6 (%d) SP rules\n",
+				"RTE_IPv4(%d) and IPv6 (%d) SP rules\n",
 				__func__, spi, rc4, rc6);
 			return -EINVAL;
 		} else
@@ -1040,7 +1040,7 @@ ipsec_sa_init(struct ipsec_sa *lsa, struct rte_ipsec_sa *sa, uint32_t sa_size)
 	struct rte_ipsec_sa_prm prm;
 	struct rte_ipv4_hdr v4  = {
 		.version_ihl = IPVERSION << 4 |
-			sizeof(v4) / IPV4_IHL_MULTIPLIER,
+			sizeof(v4) / RTE_IPV4_IHL_MULTIPLIER,
 		.time_to_live = IPDEFTTL,
 		.next_proto_id = IPPROTO_ESP,
 		.src_addr = lsa->src.ip.ip4,
examples/ipv4_multicast/main.c +16 -16
index 259c0d19e..6bad6a92d 100644
@@ -138,21 +138,21 @@ struct mcast_group_params {
 };
 
 static struct mcast_group_params mcast_group_table[] = {
-		{IPv4(224,0,0,101), 0x1},
-		{IPv4(224,0,0,102), 0x2},
-		{IPv4(224,0,0,103), 0x3},
-		{IPv4(224,0,0,104), 0x4},
-		{IPv4(224,0,0,105), 0x5},
-		{IPv4(224,0,0,106), 0x6},
-		{IPv4(224,0,0,107), 0x7},
-		{IPv4(224,0,0,108), 0x8},
-		{IPv4(224,0,0,109), 0x9},
-		{IPv4(224,0,0,110), 0xA},
-		{IPv4(224,0,0,111), 0xB},
-		{IPv4(224,0,0,112), 0xC},
-		{IPv4(224,0,0,113), 0xD},
-		{IPv4(224,0,0,114), 0xE},
-		{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 \
@@ -315,7 +315,7 @@ mcast_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf)
 	 * Check that it is a valid multicast address and
 	 * we have some active ports assigned to it.
 	 */
-	if(!IS_IPV4_MCAST(dest_addr) ||
+	if(!RTE_IS_IPV4_MCAST(dest_addr) ||
 	    (hash = rte_fbk_hash_lookup(mcast_hash, dest_addr)) <= 0 ||
 	    (port_mask = hash & enabled_port_mask) == 0) {
 		rte_pktmbuf_free(m);
examples/l2fwd-crypto/main.c +2 -2
index 06f5d1db1..afc658e5d 100644
@@ -404,8 +404,8 @@ l2fwd_simple_crypto_enqueue(struct rte_mbuf *m,
 	ip_hdr = (struct rte_ipv4_hdr *)(rte_pktmbuf_mtod(m, char *) +
 			ipdata_offset);
 
-	ipdata_offset += (ip_hdr->version_ihl & IPV4_HDR_IHL_MASK)
-			* IPV4_IHL_MULTIPLIER;
+	ipdata_offset += (ip_hdr->version_ihl & RTE_IPV4_HDR_IHL_MASK)
+			* RTE_IPV4_IHL_MULTIPLIER;
 
 
 	/* Zero pad data to be crypto'd so it is block aligned */
examples/l3fwd-acl/main.c +1 -1
index b0e933e03..bad6aae8c 100644
@@ -897,7 +897,7 @@ parse_ipv4_net(const char *in, uint32_t *addr, uint32_t *mask_len)
 	GET_CB_FIELD(in, d, 0, UINT8_MAX, '/');
 	GET_CB_FIELD(in, m, 0, sizeof(uint32_t) * CHAR_BIT, 0);
 
-	addr[0] = IPv4(a, b, c, d);
+	addr[0] = RTE_IPv4(a, b, c, d);
 	mask_len[0] = m;
 
 	return 0;
examples/l3fwd-power/main.c +12 -12
index 91f144605..959925e73 100644
@@ -258,10 +258,10 @@ struct ipv6_l3fwd_route {
 };
 
 static struct ipv4_l3fwd_route ipv4_l3fwd_route_array[] = {
-	{{IPv4(100,10,0,1), IPv4(200,10,0,1), 101, 11, IPPROTO_TCP}, 0},
-	{{IPv4(100,20,0,2), IPv4(200,20,0,2), 102, 12, IPPROTO_TCP}, 1},
-	{{IPv4(100,30,0,3), IPv4(200,30,0,3), 103, 13, IPPROTO_TCP}, 2},
-	{{IPv4(100,40,0,4), 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[] = {
-	{IPv4(1,1,1,0), 24, 0},
-	{IPv4(2,1,1,0), 24, 1},
-	{IPv4(3,1,1,0), 24, 2},
-	{IPv4(4,1,1,0), 24, 3},
-	{IPv4(5,1,1,0), 24, 4},
-	{IPv4(6,1,1,0), 24, 5},
-	{IPv4(7,1,1,0), 24, 6},
-	{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 \
examples/l3fwd-vf/main.c +12 -12
index ebb2378dd..5e3809b8d 100644
@@ -201,10 +201,10 @@ struct l3fwd_route {
 };
 
 static struct l3fwd_route l3fwd_route_array[] = {
-	{{IPv4(100,10,0,1), IPv4(200,10,0,1), 101, 11, IPPROTO_TCP}, 0},
-	{{IPv4(100,20,0,2), IPv4(200,20,0,2), 102, 12, IPPROTO_TCP}, 1},
-	{{IPv4(100,30,0,3), IPv4(200,30,0,3), 103, 13, IPPROTO_TCP}, 2},
-	{{IPv4(100,40,0,4), 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[] = {
-	{IPv4(1,1,1,0), 24, 0},
-	{IPv4(2,1,1,0), 24, 1},
-	{IPv4(3,1,1,0), 24, 2},
-	{IPv4(4,1,1,0), 24, 3},
-	{IPv4(5,1,1,0), 24, 4},
-	{IPv4(6,1,1,0), 24, 5},
-	{IPv4(7,1,1,0), 24, 6},
-	{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 \
examples/l3fwd/l3fwd_em.c +10 -10
index fb55e196d..b0e08f842 100644
@@ -99,10 +99,10 @@ struct ipv6_l3fwd_em_route {
 };
 
 static struct ipv4_l3fwd_em_route ipv4_l3fwd_em_route_array[] = {
-	{{IPv4(101, 0, 0, 0), IPv4(100, 10, 0, 1),  101, 11, IPPROTO_TCP}, 0},
-	{{IPv4(201, 0, 0, 0), IPv4(200, 20, 0, 1),  102, 12, IPPROTO_TCP}, 1},
-	{{IPv4(111, 0, 0, 0), IPv4(100, 30, 0, 1),  101, 11, IPPROTO_TCP}, 2},
-	{{IPv4(211, 0, 0, 0), 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[] = {
@@ -424,19 +424,19 @@ populate_ipv4_many_flow_into_table(const struct rte_hash *h,
 		switch (i & (NUMBER_PORT_USED - 1)) {
 		case 0:
 			entry = ipv4_l3fwd_em_route_array[0];
-			entry.key.ip_dst = 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 = 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 = 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 = IPv4(211, c, b, a);
+			entry.key.ip_dst = RTE_IPv4(211, c, b, a);
 			break;
 		};
 		convert_ipv4_5tuple(&entry.key, &newkey);
@@ -574,8 +574,8 @@ em_parse_ptype(struct rte_mbuf *m)
 	l3 = (uint8_t *)eth_hdr + sizeof(struct rte_ether_hdr);
 	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 & IPV4_HDR_IHL_MASK) *
-			  IPV4_IHL_MULTIPLIER;
+		hdr_len = (ipv4_hdr->version_ihl & RTE_IPV4_HDR_IHL_MASK) *
+			  RTE_IPV4_IHL_MULTIPLIER;
 		if (hdr_len == sizeof(struct rte_ipv4_hdr)) {
 			packet_type |= RTE_PTYPE_L3_IPV4;
 			if (ipv4_hdr->next_proto_id == IPPROTO_TCP)
examples/l3fwd/l3fwd_lpm.c +8 -8
index 881b0c7c0..de9fd9ab3 100644
@@ -40,14 +40,14 @@ struct ipv6_l3fwd_lpm_route {
 };
 
 static struct ipv4_l3fwd_lpm_route ipv4_l3fwd_lpm_route_array[] = {
-	{IPv4(1, 1, 1, 0), 24, 0},
-	{IPv4(2, 1, 1, 0), 24, 1},
-	{IPv4(3, 1, 1, 0), 24, 2},
-	{IPv4(4, 1, 1, 0), 24, 3},
-	{IPv4(5, 1, 1, 0), 24, 4},
-	{IPv4(6, 1, 1, 0), 24, 5},
-	{IPv4(7, 1, 1, 0), 24, 6},
-	{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_lpm_route ipv6_l3fwd_lpm_route_array[] = {
examples/performance-thread/l3fwd-thread/main.c +16 -16
index da5c66203..9b5684ea6 100644
@@ -380,10 +380,10 @@ struct ipv6_l3fwd_route {
 };
 
 static struct ipv4_l3fwd_route ipv4_l3fwd_route_array[] = {
-	{{IPv4(101, 0, 0, 0), IPv4(100, 10, 0, 1),  101, 11, IPPROTO_TCP}, 0},
-	{{IPv4(201, 0, 0, 0), IPv4(200, 20, 0, 1),  102, 12, IPPROTO_TCP}, 1},
-	{{IPv4(111, 0, 0, 0), IPv4(100, 30, 0, 1),  101, 11, IPPROTO_TCP}, 2},
-	{{IPv4(211, 0, 0, 0), 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[] = {
-	{IPv4(1, 1, 1, 0), 24, 0},
-	{IPv4(2, 1, 1, 0), 24, 1},
-	{IPv4(3, 1, 1, 0), 24, 2},
-	{IPv4(4, 1, 1, 0), 24, 3},
-	{IPv4(5, 1, 1, 0), 24, 4},
-	{IPv4(6, 1, 1, 0), 24, 5},
-	{IPv4(7, 1, 1, 0), 24, 6},
-	{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[] = {
@@ -3134,19 +3134,19 @@ populate_ipv4_many_flow_into_table(const struct rte_hash *h,
 		switch (i & (NUMBER_PORT_USED - 1)) {
 		case 0:
 			entry = ipv4_l3fwd_route_array[0];
-			entry.key.ip_dst = 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 = 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 = 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 = IPv4(211, c, b, a);
+			entry.key.ip_dst = RTE_IPv4(211, c, b, a);
 			break;
 		};
 		convert_ipv4_5tuple(&entry.key, &newkey);
lib/librte_gro/gro_tcp4.c +1 -1
index c37b4ef3e..20f2ea7e6 100644
@@ -239,7 +239,7 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
 	 * whose DF bit is 1, IPv4 ID is ignored.
 	 */
 	frag_off = rte_be_to_cpu_16(ipv4_hdr->fragment_offset);
-	is_atomic = (frag_off & IPV4_HDR_DF_FLAG) == IPV4_HDR_DF_FLAG;
+	is_atomic = (frag_off & RTE_IPV4_HDR_DF_FLAG) == RTE_IPV4_HDR_DF_FLAG;
 	ip_id = is_atomic ? 0 : rte_be_to_cpu_16(ipv4_hdr->packet_id);
 	sent_seq = rte_be_to_cpu_32(tcp_hdr->sent_seq);
 
lib/librte_gro/gro_vxlan_tcp4.c +2 -2
index a9bdf1d72..d26aa95b4 100644
@@ -347,11 +347,11 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt,
 	 * whose DF bit is 1, IPv4 ID is ignored.
 	 */
 	frag_off = rte_be_to_cpu_16(outer_ipv4_hdr->fragment_offset);
-	outer_is_atomic = (frag_off & IPV4_HDR_DF_FLAG) == IPV4_HDR_DF_FLAG;
+	outer_is_atomic = (frag_off & RTE_IPV4_HDR_DF_FLAG) == RTE_IPV4_HDR_DF_FLAG;
 	outer_ip_id = outer_is_atomic ? 0 :
 		rte_be_to_cpu_16(outer_ipv4_hdr->packet_id);
 	frag_off = rte_be_to_cpu_16(ipv4_hdr->fragment_offset);
-	is_atomic = (frag_off & IPV4_HDR_DF_FLAG) == IPV4_HDR_DF_FLAG;
+	is_atomic = (frag_off & RTE_IPV4_HDR_DF_FLAG) == RTE_IPV4_HDR_DF_FLAG;
 	ip_id = is_atomic ? 0 : rte_be_to_cpu_16(ipv4_hdr->packet_id);
 
 	sent_seq = rte_be_to_cpu_32(tcp_hdr->sent_seq);
lib/librte_gso/gso_common.h +2 -2
index 5f2adc833..13c9aeea8 100644
@@ -12,8 +12,8 @@
 #include <rte_tcp.h>
 #include <rte_udp.h>
 
-#define IS_FRAGMENTED(frag_off) (((frag_off) & IPV4_HDR_OFFSET_MASK) != 0 \
-		|| ((frag_off) & IPV4_HDR_MF_FLAG) == IPV4_HDR_MF_FLAG)
+#define IS_FRAGMENTED(frag_off) (((frag_off) & RTE_IPV4_HDR_OFFSET_MASK) != 0 \
+		|| ((frag_off) & RTE_IPV4_HDR_MF_FLAG) == RTE_IPV4_HDR_MF_FLAG)
 
 #define TCP_HDR_PSH_MASK ((uint8_t)0x08)
 #define TCP_HDR_FIN_MASK ((uint8_t)0x01)
lib/librte_ip_frag/rte_ip_frag.h +2 -2
index 60c0300e8..73cf553be 100644
@@ -308,8 +308,8 @@ rte_ipv4_frag_pkt_is_fragmented(const struct rte_ipv4_hdr * hdr) {
 	uint16_t flag_offset, ip_flag, ip_ofs;
 
 	flag_offset = rte_be_to_cpu_16(hdr->fragment_offset);
-	ip_ofs = (uint16_t)(flag_offset & IPV4_HDR_OFFSET_MASK);
-	ip_flag = (uint16_t)(flag_offset & IPV4_HDR_MF_FLAG);
+	ip_ofs = (uint16_t)(flag_offset & RTE_IPV4_HDR_OFFSET_MASK);
+	ip_flag = (uint16_t)(flag_offset & RTE_IPV4_HDR_MF_FLAG);
 
 	return ip_flag != 0 || ip_ofs  != 0;
 }
lib/librte_ip_frag/rte_ipv4_fragmentation.c +8 -8
index 2c781724a..f7c956ee1 100644
@@ -12,22 +12,22 @@
 #include "ip_frag_common.h"
 
 /* Fragment Offset */
-#define	IPV4_HDR_DF_SHIFT			14
-#define	IPV4_HDR_MF_SHIFT			13
-#define	IPV4_HDR_FO_SHIFT			3
+#define	RTE_IPV4_HDR_DF_SHIFT			14
+#define	RTE_IPV4_HDR_MF_SHIFT			13
+#define	RTE_IPV4_HDR_FO_SHIFT			3
 
-#define	IPV4_HDR_DF_MASK			(1 << IPV4_HDR_DF_SHIFT)
-#define	IPV4_HDR_MF_MASK			(1 << IPV4_HDR_MF_SHIFT)
+#define	IPV4_HDR_DF_MASK			(1 << RTE_IPV4_HDR_DF_SHIFT)
+#define	IPV4_HDR_MF_MASK			(1 << RTE_IPV4_HDR_MF_SHIFT)
 
-#define	IPV4_HDR_FO_ALIGN			(1 << IPV4_HDR_FO_SHIFT)
+#define	IPV4_HDR_FO_ALIGN			(1 << RTE_IPV4_HDR_FO_SHIFT)
 
 static inline void __fill_ipv4hdr_frag(struct rte_ipv4_hdr *dst,
 		const struct rte_ipv4_hdr *src, uint16_t len, uint16_t fofs,
 		uint16_t dofs, uint32_t mf)
 {
 	rte_memcpy(dst, src, sizeof(*dst));
-	fofs = (uint16_t)(fofs + (dofs >> IPV4_HDR_FO_SHIFT));
-	fofs = (uint16_t)(fofs | mf << IPV4_HDR_MF_SHIFT);
+	fofs = (uint16_t)(fofs + (dofs >> RTE_IPV4_HDR_FO_SHIFT));
+	fofs = (uint16_t)(fofs | mf << RTE_IPV4_HDR_MF_SHIFT);
 	dst->fragment_offset = rte_cpu_to_be_16(fofs);
 	dst->total_length = rte_cpu_to_be_16(len);
 	dst->hdr_checksum = 0;
lib/librte_ip_frag/rte_ipv4_reassembly.c +4 -4
index 97da607ed..b7b92ed28 100644
@@ -75,7 +75,7 @@ ipv4_frag_reassemble(struct ip_frag_pkt *fp)
 	ip_hdr->total_length = rte_cpu_to_be_16((uint16_t)(fp->total_size +
 		m->l3_len));
 	ip_hdr->fragment_offset = (uint16_t)(ip_hdr->fragment_offset &
-		rte_cpu_to_be_16(IPV4_HDR_DF_FLAG));
+		rte_cpu_to_be_16(RTE_IPV4_HDR_DF_FLAG));
 	ip_hdr->hdr_checksum = 0;
 
 	return m;
@@ -109,8 +109,8 @@ rte_ipv4_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 	int32_t ip_len;
 
 	flag_offset = rte_be_to_cpu_16(ip_hdr->fragment_offset);
-	ip_ofs = (uint16_t)(flag_offset & IPV4_HDR_OFFSET_MASK);
-	ip_flag = (uint16_t)(flag_offset & IPV4_HDR_MF_FLAG);
+	ip_ofs = (uint16_t)(flag_offset & RTE_IPV4_HDR_OFFSET_MASK);
+	ip_flag = (uint16_t)(flag_offset & RTE_IPV4_HDR_MF_FLAG);
 
 	psd = (unaligned_uint64_t *)&ip_hdr->src_addr;
 	/* use first 8 bytes only */
@@ -118,7 +118,7 @@ rte_ipv4_frag_reassemble_packet(struct rte_ip_frag_tbl *tbl,
 	key.id = ip_hdr->packet_id;
 	key.key_len = IPV4_KEYLEN;
 
-	ip_ofs *= IPV4_HDR_OFFSET_UNITS;
+	ip_ofs *= RTE_IPV4_HDR_OFFSET_UNITS;
 	ip_len = rte_be_to_cpu_16(ip_hdr->total_length) - mb->l3_len;
 
 	IP_FRAG_LOG(DEBUG, "%s:%d:\n"
lib/librte_net/rte_ip.h +25 -25

87 lines not on this page · raw message

lib/librte_net/rte_net.c +3 -3
index b01cacb9c..712383484 100644
@@ -315,7 +315,7 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
 			return pkt_type;
 
 		if (ip4h->fragment_offset & rte_cpu_to_be_16(
-				IPV4_HDR_OFFSET_MASK | IPV4_HDR_MF_FLAG)) {
+				RTE_IPV4_HDR_OFFSET_MASK | RTE_IPV4_HDR_MF_FLAG)) {
 			pkt_type |= RTE_PTYPE_L4_FRAG;
 			hdr_lens->l4_len = 0;
 			return pkt_type;
@@ -446,8 +446,8 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
 		if ((layers & RTE_PTYPE_INNER_L4_MASK) == 0)
 			return pkt_type;
 		if (ip4h->fragment_offset &
-				rte_cpu_to_be_16(IPV4_HDR_OFFSET_MASK |
-					IPV4_HDR_MF_FLAG)) {
+				rte_cpu_to_be_16(RTE_IPV4_HDR_OFFSET_MASK |
+					RTE_IPV4_HDR_MF_FLAG)) {
 			pkt_type |= RTE_PTYPE_INNER_L4_FRAG;
 			hdr_lens->inner_l4_len = 0;
 			return pkt_type;
lib/librte_port/rte_port_ras.c +2 -2
index 2e807e805..0d02f97e5 100644
@@ -155,8 +155,8 @@ process_ipv4(struct rte_port_ring_writer_ras *p, struct rte_mbuf *pkt)
 
 	/* Get "More fragments" flag and fragment offset */
 	uint16_t frag_field = rte_be_to_cpu_16(pkt_hdr->fragment_offset);
-	uint16_t frag_offset = (uint16_t)(frag_field & IPV4_HDR_OFFSET_MASK);
-	uint16_t frag_flag = (uint16_t)(frag_field & IPV4_HDR_MF_FLAG);
+	uint16_t frag_offset = (uint16_t)(frag_field & RTE_IPV4_HDR_OFFSET_MASK);
+	uint16_t frag_flag = (uint16_t)(frag_field & RTE_IPV4_HDR_MF_FLAG);
 
 	/* If it is a fragmented packet, then try to reassemble */
 	if ((frag_flag == 0) && (frag_offset == 0))
Signature · 1 line
2.11.0
#52 lore raw

Re: [dpdk-dev] [RFC v2 11/14] net: add rte prefix to ip defines

app/test-acl/main.c parse_ipv4_net(const char *in, uint32_t *addr, uint32_t *mask_len) · line 628

Quoted 10 lines · On Wed, 10 Apr 2019 10:32:15 +0200 Olivier Matz <[email protected]> wrote:
app/test-acl/main.c +1 -1
index b80179417..eb6294396 100644
@@ -625,7 +625,7 @@ parse_ipv4_net(const char *in, uint32_t *addr, uint32_t *mask_len)
 	GET_CB_FIELD(in, d, 0, UINT8_MAX, '/');
 	GET_CB_FIELD(in, m, 0, sizeof(uint32_t) * CHAR_BIT, 0);
 
-	addr[0] = IPv4(a, b, c, d);
+	addr[0] = RTE_IPv4(a, b, c, d);

IPv4 is a DPDK only macro, could you leave it alone.

#53 lore raw

Re: [dpdk-dev] [RFC v2 11/14] net: add rte prefix to ip defines

Quoted 11 lines · Stephen Hemminger
Quoted 8 lines · On Wed, 10 Apr 2019 10:32:15 +0200 Olivier Matz <[email protected]> wrote:
app/test-acl/main.c +0 -0
index b80179417..eb6294396 100644
@@ -625,7 +625,7 @@ parse_ipv4_net(const char *in, uint32_t *addr, uint32_t *mask_len)
 	GET_CB_FIELD(in, d, 0, UINT8_MAX, '/');
 	GET_CB_FIELD(in, m, 0, sizeof(uint32_t) * CHAR_BIT, 0);
 
Quoted 4 lines

app/test-acl/main.c parse_ipv4_net(const char *in, uint32_t *addr, uint32_t *mask_len) · line 628

Quoted 2 lines
app/test-acl/main.c +1 -1
-	addr[0] = IPv4(a, b, c, d);
+	addr[0] = RTE_IPv4(a, b, c, d);

IPv4 is a DPDK only macro, could you leave it alone.

It is a public macro defined in rte_ip.h.
I think we should prefix it, to move it in the dpdk namespace. This would avoid conflicts with an application defining its own IPv4() macro.

#54 lore raw

RFC v2 12/14 net: add rte prefix to sctp structure

In reply to Olivier Matz

Add 'rte_' prefix to structures:
- rename struct sctp_hdr as struct rte_sctp_hdr.

---
 app/test-pmd/csumonly.c           |  4 ++--
 app/test/packet_burst_generator.c |  6 +++---
 app/test/packet_burst_generator.h |  2 +-
 app/test/test_flow_classify.c     |  2 +-
 drivers/net/e1000/igb_rxtx.c      |  2 +-
 drivers/net/enic/enic_clsf.c      |  8 ++++----
 drivers/net/enic/enic_flow.c      |  4 ++--
 drivers/net/i40e/i40e_fdir.c      | 20 ++++++++++----------
 drivers/net/i40e/i40e_rxtx.c      |  2 +-
 drivers/net/iavf/iavf_rxtx.c      |  2 +-
 drivers/net/ice/ice_rxtx.c        |  2 +-
 drivers/net/ixgbe/ixgbe_rxtx.c    |  2 +-
 examples/tep_termination/vxlan.c  |  4 ++--
 lib/librte_ethdev/rte_flow.h      |  2 +-
 lib/librte_net/rte_net.c          |  4 ++--
 lib/librte_net/rte_sctp.h         |  2 +-
 lib/librte_vhost/virtio_net.c     |  4 ++--
 17 files changed, 36 insertions(+), 36 deletions(-)
app/test-pmd/csumonly.c +2 -2
index eff2b4f7c..ac1c2ec60 100644
@@ -365,7 +365,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
 	struct rte_ipv4_hdr *ipv4_hdr = l3_hdr;
 	struct udp_hdr *udp_hdr;
 	struct tcp_hdr *tcp_hdr;
-	struct sctp_hdr *sctp_hdr;
+	struct rte_sctp_hdr *sctp_hdr;
 	uint64_t ol_flags = 0;
 	uint32_t max_pkt_len, tso_segsz = 0;
 
@@ -432,7 +432,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
 		if (info->gso_enable)
 			ol_flags |= PKT_TX_TCP_SEG;
 	} else if (info->l4_proto == IPPROTO_SCTP) {
-		sctp_hdr = (struct sctp_hdr *)((char *)l3_hdr + info->l3_len);
+		sctp_hdr = (struct rte_sctp_hdr *)((char *)l3_hdr + info->l3_len);
 		sctp_hdr->cksum = 0;
 		/* sctp payload must be a multiple of 4 to be
 		 * offloaded */
app/test/packet_burst_generator.c +3 -3
index 886b5f8ac..9aa07e176 100644
@@ -121,7 +121,7 @@ initialize_tcp_header(struct tcp_hdr *tcp_hdr, uint16_t src_port,
 }
 
 uint16_t
-initialize_sctp_header(struct sctp_hdr *sctp_hdr, uint16_t src_port,
+initialize_sctp_header(struct rte_sctp_hdr *sctp_hdr, uint16_t src_port,
 		uint16_t dst_port, uint16_t pkt_data_len)
 {
 	uint16_t pkt_len;
@@ -394,7 +394,7 @@ generate_packet_burst_proto(struct rte_mempool *mp,
 				break;
 			case IPPROTO_SCTP:
 				copy_buf_to_pkt(proto_hdr,
-					sizeof(struct sctp_hdr), pkt,
+					sizeof(struct rte_sctp_hdr), pkt,
 					eth_hdr_size + sizeof(struct rte_ipv4_hdr));
 				break;
 			default:
@@ -416,7 +416,7 @@ generate_packet_burst_proto(struct rte_mempool *mp,
 				break;
 			case IPPROTO_SCTP:
 				copy_buf_to_pkt(proto_hdr,
-					sizeof(struct sctp_hdr), pkt,
+					sizeof(struct rte_sctp_hdr), pkt,
 					eth_hdr_size + sizeof(struct rte_ipv6_hdr));
 				break;
 			default:
app/test/packet_burst_generator.h +1 -1
index 93efee1f5..98185c162 100644
@@ -42,7 +42,7 @@ initialize_tcp_header(struct tcp_hdr *tcp_hdr, uint16_t src_port,
 		uint16_t dst_port, uint16_t pkt_data_len);
 
 uint16_t
-initialize_sctp_header(struct sctp_hdr *sctp_hdr, uint16_t src_port,
+initialize_sctp_header(struct rte_sctp_hdr *sctp_hdr, uint16_t src_port,
 		uint16_t dst_port, uint16_t pkt_data_len);
 
 uint16_t
app/test/test_flow_classify.c +1 -1
index ad6c481fe..85228486d 100644
@@ -565,7 +565,7 @@ init_ipv4_sctp_traffic(struct rte_mempool *mp,
 {
 	struct rte_ether_hdr pkt_eth_hdr;
 	struct rte_ipv4_hdr pkt_ipv4_hdr;
-	struct sctp_hdr pkt_sctp_hdr;
+	struct rte_sctp_hdr pkt_sctp_hdr;
 	uint32_t src_addr = IPV4_ADDR(11, 12, 13, 14);
 	uint32_t dst_addr = IPV4_ADDR(15, 16, 17, 18);
 	uint16_t src_port = 10;
drivers/net/e1000/igb_rxtx.c +1 -1
index ee51eca97..3bfddc651 100644
@@ -299,7 +299,7 @@ igbe_set_xmit_ctx(struct igb_tx_queue* txq,
 		case PKT_TX_SCTP_CKSUM:
 			type_tucmd_mlhl |= E1000_ADVTXD_TUCMD_L4T_SCTP |
 				E1000_ADVTXD_DTYP_CTXT | E1000_ADVTXD_DCMD_DEXT;
-			mss_l4len_idx |= sizeof(struct sctp_hdr) << E1000_ADVTXD_L4LEN_SHIFT;
+			mss_l4len_idx |= sizeof(struct rte_sctp_hdr) << E1000_ADVTXD_L4LEN_SHIFT;
 			break;
 		default:
 			type_tucmd_mlhl |= E1000_ADVTXD_TUCMD_L4T_RSV |
drivers/net/enic/enic_clsf.c +4 -4
index 6bdc5a09a..6c37e2ec5 100644
@@ -153,7 +153,7 @@ copy_fltr_v2(struct filter_v2 *fltr, const struct rte_eth_fdir_input *input,
 		enic_set_layer(gp, FILTER_GENERIC_1_TCP, FILTER_GENERIC_1_L4,
 			       &tcp_mask, &tcp_val, sizeof(struct tcp_hdr));
 	} else if (input->flow_type == RTE_ETH_FLOW_NONFRAG_IPV4_SCTP) {
-		struct sctp_hdr sctp_mask, sctp_val;
+		struct rte_sctp_hdr sctp_mask, sctp_val;
 		memset(&sctp_mask, 0, sizeof(sctp_mask));
 		memset(&sctp_val, 0, sizeof(sctp_val));
 
@@ -176,7 +176,7 @@ copy_fltr_v2(struct filter_v2 *fltr, const struct rte_eth_fdir_input *input,
 		 * manually set proto_id=sctp below.
 		 */
 		enic_set_layer(gp, 0, FILTER_GENERIC_1_L4, &sctp_mask,
-			       &sctp_val, sizeof(struct sctp_hdr));
+			       &sctp_val, sizeof(struct rte_sctp_hdr));
 	}
 
 	if (input->flow_type == RTE_ETH_FLOW_NONFRAG_IPV4_UDP ||
@@ -247,7 +247,7 @@ copy_fltr_v2(struct filter_v2 *fltr, const struct rte_eth_fdir_input *input,
 		enic_set_layer(gp, FILTER_GENERIC_1_TCP, FILTER_GENERIC_1_L4,
 			       &tcp_mask, &tcp_val, sizeof(struct tcp_hdr));
 	} else if (input->flow_type == RTE_ETH_FLOW_NONFRAG_IPV6_SCTP) {
-		struct sctp_hdr sctp_mask, sctp_val;
+		struct rte_sctp_hdr sctp_mask, sctp_val;
 		memset(&sctp_mask, 0, sizeof(sctp_mask));
 		memset(&sctp_val, 0, sizeof(sctp_val));
 
@@ -265,7 +265,7 @@ copy_fltr_v2(struct filter_v2 *fltr, const struct rte_eth_fdir_input *input,
 		}
 
 		enic_set_layer(gp, 0, FILTER_GENERIC_1_L4, &sctp_mask,
-			       &sctp_val, sizeof(struct sctp_hdr));
+			       &sctp_val, sizeof(struct rte_sctp_hdr));
 	}
 
 	if (input->flow_type == RTE_ETH_FLOW_NONFRAG_IPV6_UDP ||
drivers/net/enic/enic_flow.c +2 -2
index b1a9bcbde..9dee5d2ee 100644
@@ -895,9 +895,9 @@ enic_copy_item_sctp_v2(struct copy_item_args *arg)
 		mask = &rte_flow_item_sctp_mask;
 
 	memcpy(gp->layer[FILTER_GENERIC_1_L4].mask, &mask->hdr,
-	       sizeof(struct sctp_hdr));
+	       sizeof(struct rte_sctp_hdr));
 	memcpy(gp->layer[FILTER_GENERIC_1_L4].val, &spec->hdr,
-	       sizeof(struct sctp_hdr));
+	       sizeof(struct rte_sctp_hdr));
 	return 0;
 }
 
drivers/net/i40e/i40e_fdir.c +10 -10
index b20f30fb4..14a82426e 100644
@@ -801,7 +801,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,
 	unsigned char *payload, *ptr;
 	struct udp_hdr *udp;
 	struct tcp_hdr *tcp;
-	struct sctp_hdr *sctp;
+	struct rte_sctp_hdr *sctp;
 	uint8_t size, dst = 0;
 	uint8_t i, pit_idx, set_idx = I40E_FLXPLD_L4_IDX; /* use l4 by default*/
 	int len;
@@ -841,8 +841,8 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,
 		break;
 
 	case RTE_ETH_FLOW_NONFRAG_IPV4_SCTP:
-		sctp = (struct sctp_hdr *)(raw_pkt + len);
-		payload = (unsigned char *)sctp + sizeof(struct sctp_hdr);
+		sctp = (struct rte_sctp_hdr *)(raw_pkt + len);
+		payload = (unsigned char *)sctp + sizeof(struct rte_sctp_hdr);
 		/*
 		 * The source and destination fields in the transmitted packet
 		 * need to be presented in a reversed order with respect
@@ -886,8 +886,8 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,
 		break;
 
 	case RTE_ETH_FLOW_NONFRAG_IPV6_SCTP:
-		sctp = (struct sctp_hdr *)(raw_pkt + len);
-		payload = (unsigned char *)sctp + sizeof(struct sctp_hdr);
+		sctp = (struct rte_sctp_hdr *)(raw_pkt + len);
+		payload = (unsigned char *)sctp + sizeof(struct rte_sctp_hdr);
 		/*
 		 * The source and destination fields in the transmitted packet
 		 * need to be presented in a reversed order with respect
@@ -1091,7 +1091,7 @@ i40e_flow_fdir_construct_pkt(struct i40e_pf *pf,
 	unsigned char *ptr;
 	struct udp_hdr *udp;
 	struct tcp_hdr *tcp;
-	struct sctp_hdr *sctp;
+	struct rte_sctp_hdr *sctp;
 	struct rte_flow_item_gtp *gtp;
 	struct rte_ipv4_hdr *gtp_ipv4;
 	struct rte_ipv6_hdr *gtp_ipv6;
@@ -1138,8 +1138,8 @@ i40e_flow_fdir_construct_pkt(struct i40e_pf *pf,
 		tcp->dst_port = fdir_input->flow.tcp4_flow.src_port;
 		tcp->data_off = I40E_FDIR_TCP_DEFAULT_DATAOFF;
 	} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV4_SCTP) {
-		sctp = (struct sctp_hdr *)(raw_pkt + len);
-		payload = (unsigned char *)sctp + sizeof(struct sctp_hdr);
+		sctp = (struct rte_sctp_hdr *)(raw_pkt + len);
+		payload = (unsigned char *)sctp + sizeof(struct rte_sctp_hdr);
 		/**
 		 * The source and destination fields in the transmitted packet
 		 * need to be presented in a reversed order with respect
@@ -1175,8 +1175,8 @@ i40e_flow_fdir_construct_pkt(struct i40e_pf *pf,
 		tcp->src_port = fdir_input->flow.udp6_flow.dst_port;
 		tcp->dst_port = fdir_input->flow.udp6_flow.src_port;
 	} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV6_SCTP) {
-		sctp = (struct sctp_hdr *)(raw_pkt + len);
-		payload = (unsigned char *)sctp + sizeof(struct sctp_hdr);
+		sctp = (struct rte_sctp_hdr *)(raw_pkt + len);
+		payload = (unsigned char *)sctp + sizeof(struct rte_sctp_hdr);
 		/**
 		 * The source and destination fields in the transmitted packet
 		 * need to be presented in a reversed order with respect
drivers/net/i40e/i40e_rxtx.c +1 -1
index 52ce536e0..edd4509ee 100644
@@ -307,7 +307,7 @@ i40e_txd_enable_checksum(uint64_t ol_flags,
 		break;
 	case PKT_TX_SCTP_CKSUM:
 		*td_cmd |= I40E_TX_DESC_CMD_L4T_EOFT_SCTP;
-		*td_offset |= (sizeof(struct sctp_hdr) >> 2) <<
+		*td_offset |= (sizeof(struct rte_sctp_hdr) >> 2) <<
 				I40E_TX_DESC_LENGTH_L4_FC_LEN_SHIFT;
 		break;
 	case PKT_TX_UDP_CKSUM:
drivers/net/iavf/iavf_rxtx.c +1 -1
index 103a020c8..7a6750e02 100644
@@ -1422,7 +1422,7 @@ iavf_txd_enable_checksum(uint64_t ol_flags,
 		break;
 	case PKT_TX_SCTP_CKSUM:
 		*td_cmd |= IAVF_TX_DESC_CMD_L4T_EOFT_SCTP;
-		*td_offset |= (sizeof(struct sctp_hdr) >> 2) <<
+		*td_offset |= (sizeof(struct rte_sctp_hdr) >> 2) <<
 			      IAVF_TX_DESC_LENGTH_L4_FC_LEN_SHIFT;
 		break;
 	case PKT_TX_UDP_CKSUM:
drivers/net/ice/ice_rxtx.c +1 -1
index 9fc98b401..2e15de46d 100644
@@ -1766,7 +1766,7 @@ ice_txd_enable_checksum(uint64_t ol_flags,
 		break;
 	case PKT_TX_SCTP_CKSUM:
 		*td_cmd |= ICE_TX_DESC_CMD_L4T_EOFT_SCTP;
-		*td_offset |= (sizeof(struct sctp_hdr) >> 2) <<
+		*td_offset |= (sizeof(struct rte_sctp_hdr) >> 2) <<
 			      ICE_TX_DESC_LEN_L4_LEN_S;
 		break;
 	case PKT_TX_UDP_CKSUM:
drivers/net/ixgbe/ixgbe_rxtx.c +1 -1
index 217340e59..08b2f5df5 100644
@@ -436,7 +436,7 @@ ixgbe_set_xmit_ctx(struct ixgbe_tx_queue *txq,
 		case PKT_TX_SCTP_CKSUM:
 			type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_L4T_SCTP |
 				IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
-			mss_l4len_idx |= sizeof(struct sctp_hdr) << IXGBE_ADVTXD_L4LEN_SHIFT;
+			mss_l4len_idx |= sizeof(struct rte_sctp_hdr) << IXGBE_ADVTXD_L4LEN_SHIFT;
 			tx_offload_mask.l2_len |= ~0;
 			tx_offload_mask.l3_len |= ~0;
 			break;
examples/tep_termination/vxlan.c +2 -2
index 8088d9412..07a53abc3 100644
@@ -77,7 +77,7 @@ process_inner_cksums(struct rte_ether_hdr *eth_hdr, union tunnel_offload_info *i
 	struct rte_ipv6_hdr *ipv6_hdr;
 	struct udp_hdr *udp_hdr;
 	struct tcp_hdr *tcp_hdr;
-	struct sctp_hdr *sctp_hdr;
+	struct rte_sctp_hdr *sctp_hdr;
 	uint64_t ol_flags = 0;
 
 	info->l2_len = sizeof(struct rte_ether_hdr);
@@ -126,7 +126,7 @@ process_inner_cksums(struct rte_ether_hdr *eth_hdr, union tunnel_offload_info *i
 		tcp_hdr->cksum = get_psd_sum(l3_hdr, ethertype, ol_flags);
 
 	} else if (l4_proto == IPPROTO_SCTP) {
-		sctp_hdr = (struct sctp_hdr *)((char *)l3_hdr + info->l3_len);
+		sctp_hdr = (struct rte_sctp_hdr *)((char *)l3_hdr + info->l3_len);
 		sctp_hdr->cksum = 0;
 		ol_flags |= PKT_TX_SCTP_CKSUM;
 	}
lib/librte_ethdev/rte_flow.h +1 -1
index 0bf55a62f..f93427a44 100644
@@ -731,7 +731,7 @@ static const struct rte_flow_item_tcp rte_flow_item_tcp_mask = {
  * Matches a SCTP header.
  */
 struct rte_flow_item_sctp {
-	struct sctp_hdr hdr; /**< SCTP header definition. */
+	struct rte_sctp_hdr hdr; /**< SCTP header definition. */
 };
 
 /** Default mask for RTE_FLOW_ITEM_TYPE_SCTP. */
lib/librte_net/rte_net.c +2 -2
index 712383484..4a46df58d 100644
@@ -370,7 +370,7 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
 		hdr_lens->l4_len = (th->data_off & 0xf0) >> 2;
 		return pkt_type;
 	} else if ((pkt_type & RTE_PTYPE_L4_MASK) == RTE_PTYPE_L4_SCTP) {
-		hdr_lens->l4_len = sizeof(struct sctp_hdr);
+		hdr_lens->l4_len = sizeof(struct rte_sctp_hdr);
 		return pkt_type;
 	} else {
 		uint32_t prev_off = off;
@@ -506,7 +506,7 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
 		hdr_lens->inner_l4_len = (th->data_off & 0xf0) >> 2;
 	} else if ((pkt_type & RTE_PTYPE_INNER_L4_MASK) ==
 			RTE_PTYPE_INNER_L4_SCTP) {
-		hdr_lens->inner_l4_len = sizeof(struct sctp_hdr);
+		hdr_lens->inner_l4_len = sizeof(struct rte_sctp_hdr);
 	} else {
 		hdr_lens->inner_l4_len = 0;
 	}
lib/librte_net/rte_sctp.h +1 -1
index bfb7165a6..b3661b0db 100644
@@ -23,7 +23,7 @@ extern "C" {
 /**
  * SCTP Header
  */
-struct sctp_hdr {
+struct rte_sctp_hdr {
 	uint16_t src_port; /**< Source port. */
 	uint16_t dst_port; /**< Destin port. */
 	uint32_t tag;      /**< Validation tag. */
lib/librte_vhost/virtio_net.c +2 -2
index 2960a5c8a..720d77ba6 100644
@@ -226,7 +226,7 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
 						dgram_cksum));
 			break;
 		case PKT_TX_SCTP_CKSUM:
-			net_hdr->csum_offset = (offsetof(struct sctp_hdr,
+			net_hdr->csum_offset = (offsetof(struct rte_sctp_hdr,
 						cksum));
 			break;
 		}
@@ -1031,7 +1031,7 @@ vhost_dequeue_offload(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
 				if (l4_proto == IPPROTO_UDP)
 					m->ol_flags |= PKT_TX_UDP_CKSUM;
 				break;
-			case (offsetof(struct sctp_hdr, cksum)):
+			case (offsetof(struct rte_sctp_hdr, cksum)):
 				if (l4_proto == IPPROTO_SCTP)
 					m->ol_flags |= PKT_TX_SCTP_CKSUM;
 				break;
Signature · 1 line
2.11.0
#55 lore raw

RFC v2 13/14 net: add rte prefix to tcp structure

In reply to Olivier Matz

Add 'rte_' prefix to structures:
- rename struct tcp_hdr as struct rte_tcp_hdr.

---
 app/test-pmd/csumonly.c                        | 12 ++++++------
 app/test/packet_burst_generator.c              | 10 +++++-----
 app/test/packet_burst_generator.h              |  2 +-
 app/test/test_flow_classify.c                  |  6 +++---
 doc/guides/sample_app_ug/flow_classify.rst     |  4 ++--
 drivers/net/bonding/rte_eth_bond_pmd.c         |  6 +++---
 drivers/net/dpaa/dpaa_rxtx.c                   |  2 +-
 drivers/net/e1000/em_rxtx.c                    |  2 +-
 drivers/net/e1000/igb_rxtx.c                   |  2 +-
 drivers/net/ena/ena_ethdev.c                   |  2 +-
 drivers/net/enic/enic_clsf.c                   |  8 ++++----
 drivers/net/enic/enic_flow.c                   |  8 ++++----
 drivers/net/i40e/i40e_fdir.c                   | 20 ++++++++++----------
 drivers/net/i40e/i40e_rxtx.c                   |  2 +-
 drivers/net/iavf/iavf_rxtx.c                   |  2 +-
 drivers/net/ice/ice_rxtx.c                     |  2 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                 |  2 +-
 drivers/net/mlx5/mlx5_flow.c                   |  8 ++++----
 drivers/net/mlx5/mlx5_flow_tcf.c               |  4 ++--
 drivers/net/qede/qede_filter.c                 | 12 ++++++------
 drivers/net/sfc/sfc_ef10_tx.c                  |  4 ++--
 drivers/net/sfc/sfc_tso.c                      |  4 ++--
 drivers/net/softnic/rte_eth_softnic_pipeline.c |  8 ++++----
 drivers/net/tap/rte_eth_tap.c                  |  2 +-
 drivers/net/virtio/virtio_rxtx.c               |  4 ++--
 drivers/net/vmxnet3/vmxnet3_rxtx.c             | 14 +++++++-------
 examples/flow_classify/flow_classify.c         |  4 ++--
 examples/ip_pipeline/pipeline.c                |  8 ++++----
 examples/l3fwd-power/main.c                    |  8 ++++----
 examples/l3fwd-vf/main.c                       |  4 ++--
 examples/tep_termination/vxlan.c               |  4 ++--
 examples/vhost/main.c                          |  4 ++--
 lib/librte_ethdev/rte_flow.h                   |  2 +-
 lib/librte_gro/gro_tcp4.c                      |  4 ++--
 lib/librte_gro/gro_tcp4.h                      | 10 +++++-----
 lib/librte_gro/gro_vxlan_tcp4.c                |  6 +++---
 lib/librte_gso/gso_common.h                    |  4 ++--
 lib/librte_gso/gso_tcp4.c                      |  4 ++--
 lib/librte_gso/gso_tunnel_tcp4.c               |  4 ++--
 lib/librte_gso/rte_gso.h                       |  2 +-
 lib/librte_net/rte_net.c                       |  8 ++++----
 lib/librte_net/rte_net.h                       |  6 +++---
 lib/librte_net/rte_tcp.h                       |  2 +-
 lib/librte_pipeline/rte_table_action.c         |  8 ++++----
 lib/librte_vhost/virtio_net.c                  |  6 +++---
 45 files changed, 125 insertions(+), 125 deletions(-)
app/test-pmd/csumonly.c +6 -6
index ac1c2ec60..ae4a091dd 100644
@@ -102,14 +102,14 @@ get_udptcp_checksum(void *l3_hdr, void *l4_hdr, uint16_t ethertype)
 static void
 parse_ipv4(struct rte_ipv4_hdr *ipv4_hdr, struct testpmd_offload_info *info)
 {
-	struct tcp_hdr *tcp_hdr;
+	struct rte_tcp_hdr *tcp_hdr;
 
 	info->l3_len = (ipv4_hdr->version_ihl & 0x0f) * 4;
 	info->l4_proto = ipv4_hdr->next_proto_id;
 
 	/* only fill l4_len for TCP, it's useful for TSO */
 	if (info->l4_proto == IPPROTO_TCP) {
-		tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr + info->l3_len);
+		tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv4_hdr + info->l3_len);
 		info->l4_len = (tcp_hdr->data_off & 0xf0) >> 2;
 	} else if (info->l4_proto == IPPROTO_UDP)
 		info->l4_len = sizeof(struct udp_hdr);
@@ -121,14 +121,14 @@ parse_ipv4(struct rte_ipv4_hdr *ipv4_hdr, struct testpmd_offload_info *info)
 static void
 parse_ipv6(struct rte_ipv6_hdr *ipv6_hdr, struct testpmd_offload_info *info)
 {
-	struct tcp_hdr *tcp_hdr;
+	struct rte_tcp_hdr *tcp_hdr;
 
 	info->l3_len = sizeof(struct rte_ipv6_hdr);
 	info->l4_proto = ipv6_hdr->proto;
 
 	/* only fill l4_len for TCP, it's useful for TSO */
 	if (info->l4_proto == IPPROTO_TCP) {
-		tcp_hdr = (struct tcp_hdr *)((char *)ipv6_hdr + info->l3_len);
+		tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv6_hdr + info->l3_len);
 		info->l4_len = (tcp_hdr->data_off & 0xf0) >> 2;
 	} else if (info->l4_proto == IPPROTO_UDP)
 		info->l4_len = sizeof(struct udp_hdr);
@@ -364,7 +364,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
 {
 	struct rte_ipv4_hdr *ipv4_hdr = l3_hdr;
 	struct udp_hdr *udp_hdr;
-	struct tcp_hdr *tcp_hdr;
+	struct rte_tcp_hdr *tcp_hdr;
 	struct rte_sctp_hdr *sctp_hdr;
 	uint64_t ol_flags = 0;
 	uint32_t max_pkt_len, tso_segsz = 0;
@@ -418,7 +418,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
 		if (info->gso_enable)
 			ol_flags |= PKT_TX_UDP_SEG;
 	} else if (info->l4_proto == IPPROTO_TCP) {
-		tcp_hdr = (struct tcp_hdr *)((char *)l3_hdr + info->l3_len);
+		tcp_hdr = (struct rte_tcp_hdr *)((char *)l3_hdr + info->l3_len);
 		tcp_hdr->cksum = 0;
 		if (tso_segsz)
 			ol_flags |= PKT_TX_TCP_SEG;
app/test/packet_burst_generator.c +5 -5
index 9aa07e176..5730f8129 100644
@@ -106,14 +106,14 @@ initialize_udp_header(struct udp_hdr *udp_hdr, uint16_t src_port,
 }
 
 uint16_t
-initialize_tcp_header(struct tcp_hdr *tcp_hdr, uint16_t src_port,
+initialize_tcp_header(struct rte_tcp_hdr *tcp_hdr, uint16_t src_port,
 		uint16_t dst_port, uint16_t pkt_data_len)
 {
 	uint16_t pkt_len;
 
-	pkt_len = (uint16_t) (pkt_data_len + sizeof(struct tcp_hdr));
+	pkt_len = (uint16_t) (pkt_data_len + sizeof(struct rte_tcp_hdr));
 
-	memset(tcp_hdr, 0, sizeof(struct tcp_hdr));
+	memset(tcp_hdr, 0, sizeof(struct rte_tcp_hdr));
 	tcp_hdr->src_port = rte_cpu_to_be_16(src_port);
 	tcp_hdr->dst_port = rte_cpu_to_be_16(dst_port);
 
@@ -389,7 +389,7 @@ generate_packet_burst_proto(struct rte_mempool *mp,
 				break;
 			case IPPROTO_TCP:
 				copy_buf_to_pkt(proto_hdr,
-					sizeof(struct tcp_hdr), pkt,
+					sizeof(struct rte_tcp_hdr), pkt,
 					eth_hdr_size + sizeof(struct rte_ipv4_hdr));
 				break;
 			case IPPROTO_SCTP:
@@ -411,7 +411,7 @@ generate_packet_burst_proto(struct rte_mempool *mp,
 				break;
 			case IPPROTO_TCP:
 				copy_buf_to_pkt(proto_hdr,
-					sizeof(struct tcp_hdr), pkt,
+					sizeof(struct rte_tcp_hdr), pkt,
 					eth_hdr_size + sizeof(struct rte_ipv6_hdr));
 				break;
 			case IPPROTO_SCTP:
app/test/packet_burst_generator.h +1 -1
index 98185c162..5cfe0c600 100644
@@ -38,7 +38,7 @@ initialize_udp_header(struct udp_hdr *udp_hdr, uint16_t src_port,
 		uint16_t dst_port, uint16_t pkt_data_len);
 
 uint16_t
-initialize_tcp_header(struct tcp_hdr *tcp_hdr, uint16_t src_port,
+initialize_tcp_header(struct rte_tcp_hdr *tcp_hdr, uint16_t src_port,
 		uint16_t dst_port, uint16_t pkt_data_len);
 
 uint16_t
app/test/test_flow_classify.c +3 -3
index 85228486d..1a79326b8 100644
@@ -74,7 +74,7 @@ static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
 		.input_index = SRCP_DESTP_INPUT_IPV4,
 		.offset = sizeof(struct rte_ether_hdr) +
 			sizeof(struct rte_ipv4_hdr) +
-			offsetof(struct tcp_hdr, src_port),
+			offsetof(struct rte_tcp_hdr, src_port),
 	},
 	{
 		/* rte_flow uses a bit mask for protocol ports */
@@ -84,7 +84,7 @@ static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
 		.input_index = SRCP_DESTP_INPUT_IPV4,
 		.offset = sizeof(struct rte_ether_hdr) +
 			sizeof(struct rte_ipv4_hdr) +
-			offsetof(struct tcp_hdr, dst_port),
+			offsetof(struct rte_tcp_hdr, dst_port),
 	},
 };
 
@@ -528,7 +528,7 @@ init_ipv4_tcp_traffic(struct rte_mempool *mp,
 {
 	struct rte_ether_hdr pkt_eth_hdr;
 	struct rte_ipv4_hdr pkt_ipv4_hdr;
-	struct tcp_hdr pkt_tcp_hdr;
+	struct rte_tcp_hdr pkt_tcp_hdr;
 	uint32_t src_addr = IPV4_ADDR(1, 2, 3, 4);
 	uint32_t dst_addr = IPV4_ADDR(5, 6, 7, 8);
 	uint16_t src_port = 16;
doc/guides/sample_app_ug/flow_classify.rst +2 -2
index 46703acbf..96a5c66d0 100644
@@ -126,7 +126,7 @@ initialisation of the ``Flow Classify`` application..
             .input_index = SRCP_DESTP_INPUT_IPV4,
             .offset = sizeof(struct rte_ether_hdr) +
                 sizeof(struct rte_ipv4_hdr) +
-                offsetof(struct tcp_hdr, src_port),
+                offsetof(struct rte_tcp_hdr, src_port),
         },
         {
              /* rte_flow uses a bit mask for protocol ports */
@@ -136,7 +136,7 @@ initialisation of the ``Flow Classify`` application..
              .input_index = SRCP_DESTP_INPUT_IPV4,
              .offset = sizeof(struct rte_ether_hdr) +
                  sizeof(struct rte_ipv4_hdr) +
-                 offsetof(struct tcp_hdr, dst_port),
+                 offsetof(struct rte_tcp_hdr, dst_port),
         },
     };
 
drivers/net/bonding/rte_eth_bond_pmd.c +3 -3
index 66ed885fa..d9a47159a 100644
@@ -836,7 +836,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
 	int i;
 
 	struct udp_hdr *udp_hdr;
-	struct tcp_hdr *tcp_hdr;
+	struct rte_tcp_hdr *tcp_hdr;
 	uint32_t hash, l3hash, l4hash;
 
 	for (i = 0; i < nb_pkts; i++) {
@@ -861,7 +861,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
 					RTE_IPV4_IHL_MULTIPLIER;
 
 				if (ipv4_hdr->next_proto_id == IPPROTO_TCP) {
-					tcp_hdr = (struct tcp_hdr *)
+					tcp_hdr = (struct rte_tcp_hdr *)
 						((char *)ipv4_hdr +
 							ip_hdr_offset);
 					l4hash = HASH_L4_PORTS(tcp_hdr);
@@ -879,7 +879,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
 			l3hash = ipv6_hash(ipv6_hdr);
 
 			if (ipv6_hdr->proto == IPPROTO_TCP) {
-				tcp_hdr = (struct tcp_hdr *)(ipv6_hdr + 1);
+				tcp_hdr = (struct rte_tcp_hdr *)(ipv6_hdr + 1);
 				l4hash = HASH_L4_PORTS(tcp_hdr);
 			} else if (ipv6_hdr->proto == IPPROTO_UDP) {
 				udp_hdr = (struct udp_hdr *)(ipv6_hdr + 1);
drivers/net/dpaa/dpaa_rxtx.c +1 -1
index 63243a79a..3a3964330 100644
@@ -218,7 +218,7 @@ static inline void dpaa_checksum(struct rte_mbuf *mbuf)
 		ipv6_hdr = (struct rte_ipv6_hdr *)l3_hdr;
 
 	if ((mbuf->packet_type & RTE_PTYPE_L4_MASK) == RTE_PTYPE_L4_TCP) {
-		struct tcp_hdr *tcp_hdr = (struct tcp_hdr *)(l3_hdr +
+		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))
drivers/net/e1000/em_rxtx.c +1 -1
index f59215894..427d434f4 100644
@@ -249,7 +249,7 @@ em_set_xmit_ctx(struct em_tx_queue* txq,
 		break;
 	case PKT_TX_TCP_CKSUM:
 		ctx.upper_setup.tcp_fields.tucso = (uint8_t)(ipcse +
-				offsetof(struct tcp_hdr, cksum));
+				offsetof(struct rte_tcp_hdr, cksum));
 		cmd_len |= E1000_TXD_CMD_TCP;
 		cmp_mask |= TX_MACIP_LEN_CMP_MASK;
 		break;
drivers/net/e1000/igb_rxtx.c +1 -1
index 3bfddc651..e36e9e1f7 100644
@@ -294,7 +294,7 @@ igbe_set_xmit_ctx(struct igb_tx_queue* txq,
 		case PKT_TX_TCP_CKSUM:
 			type_tucmd_mlhl |= E1000_ADVTXD_TUCMD_L4T_TCP |
 				E1000_ADVTXD_DTYP_CTXT | E1000_ADVTXD_DCMD_DEXT;
-			mss_l4len_idx |= sizeof(struct tcp_hdr) << E1000_ADVTXD_L4LEN_SHIFT;
+			mss_l4len_idx |= sizeof(struct rte_tcp_hdr) << E1000_ADVTXD_L4LEN_SHIFT;
 			break;
 		case PKT_TX_SCTP_CKSUM:
 			type_tucmd_mlhl |= E1000_ADVTXD_TUCMD_L4T_SCTP |
drivers/net/ena/ena_ethdev.c +1 -1
index 3671b3876..2e3599f33 100644
@@ -75,7 +75,7 @@
 #define TEST_BIT(val, bit_shift) (val & (1UL << bit_shift))
 
 #define GET_L4_HDR_LEN(mbuf)					\
-	((rte_pktmbuf_mtod_offset(mbuf,	struct tcp_hdr *,	\
+	((rte_pktmbuf_mtod_offset(mbuf,	struct rte_tcp_hdr *,	\
 		mbuf->l3_len + mbuf->l2_len)->data_off) >> 4)
 
 #define ENA_RX_RSS_TABLE_LOG_SIZE  7
drivers/net/enic/enic_clsf.c +4 -4
index 6c37e2ec5..90494299a 100644
@@ -137,7 +137,7 @@ copy_fltr_v2(struct filter_v2 *fltr, const struct rte_eth_fdir_input *input,
 		enic_set_layer(gp, FILTER_GENERIC_1_UDP, FILTER_GENERIC_1_L4,
 			       &udp_mask, &udp_val, sizeof(struct udp_hdr));
 	} else if (input->flow_type == RTE_ETH_FLOW_NONFRAG_IPV4_TCP) {
-		struct tcp_hdr tcp_mask, tcp_val;
+		struct rte_tcp_hdr tcp_mask, tcp_val;
 		memset(&tcp_mask, 0, sizeof(tcp_mask));
 		memset(&tcp_val, 0, sizeof(tcp_val));
 
@@ -151,7 +151,7 @@ copy_fltr_v2(struct filter_v2 *fltr, const struct rte_eth_fdir_input *input,
 		}
 
 		enic_set_layer(gp, FILTER_GENERIC_1_TCP, FILTER_GENERIC_1_L4,
-			       &tcp_mask, &tcp_val, sizeof(struct tcp_hdr));
+			       &tcp_mask, &tcp_val, sizeof(struct rte_tcp_hdr));
 	} else if (input->flow_type == RTE_ETH_FLOW_NONFRAG_IPV4_SCTP) {
 		struct rte_sctp_hdr sctp_mask, sctp_val;
 		memset(&sctp_mask, 0, sizeof(sctp_mask));
@@ -232,7 +232,7 @@ copy_fltr_v2(struct filter_v2 *fltr, const struct rte_eth_fdir_input *input,
 		enic_set_layer(gp, FILTER_GENERIC_1_UDP, FILTER_GENERIC_1_L4,
 			       &udp_mask, &udp_val, sizeof(struct udp_hdr));
 	} else if (input->flow_type == RTE_ETH_FLOW_NONFRAG_IPV6_TCP) {
-		struct tcp_hdr tcp_mask, tcp_val;
+		struct rte_tcp_hdr tcp_mask, tcp_val;
 		memset(&tcp_mask, 0, sizeof(tcp_mask));
 		memset(&tcp_val, 0, sizeof(tcp_val));
 
@@ -245,7 +245,7 @@ copy_fltr_v2(struct filter_v2 *fltr, const struct rte_eth_fdir_input *input,
 			tcp_val.dst_port = input->flow.tcp6_flow.dst_port;
 		}
 		enic_set_layer(gp, FILTER_GENERIC_1_TCP, FILTER_GENERIC_1_L4,
-			       &tcp_mask, &tcp_val, sizeof(struct tcp_hdr));
+			       &tcp_mask, &tcp_val, sizeof(struct rte_tcp_hdr));
 	} else if (input->flow_type == RTE_ETH_FLOW_NONFRAG_IPV6_SCTP) {
 		struct rte_sctp_hdr sctp_mask, sctp_val;
 		memset(&sctp_mask, 0, sizeof(sctp_mask));
drivers/net/enic/enic_flow.c +4 -4
index 9dee5d2ee..76eba44a4 100644
@@ -487,7 +487,7 @@ enic_copy_item_tcp_v1(struct copy_item_args *arg)
 	const struct rte_flow_item_tcp *spec = item->spec;
 	const struct rte_flow_item_tcp *mask = item->mask;
 	struct filter_ipv4_5tuple *enic_5tup = &enic_filter->u.ipv4;
-	struct tcp_hdr supported_mask = {
+	struct rte_tcp_hdr supported_mask = {
 		.src_port = 0xffff,
 		.dst_port = 0xffff,
 	};
@@ -653,7 +653,7 @@ enic_copy_item_inner_tcp_v2(struct copy_item_args *arg)
 		mask = &rte_flow_item_tcp_mask;
 	/* Append tcp header to L5 and set ip proto = tcp */
 	return copy_inner_common(&arg->filter->u.generic_1, off,
-		arg->item->spec, mask, sizeof(struct tcp_hdr),
+		arg->item->spec, mask, sizeof(struct rte_tcp_hdr),
 		arg->l3_proto_off, IPPROTO_TCP, 1);
 }
 
@@ -845,9 +845,9 @@ enic_copy_item_tcp_v2(struct copy_item_args *arg)
 		return ENOTSUP;
 
 	memcpy(gp->layer[FILTER_GENERIC_1_L4].mask, &mask->hdr,
-	       sizeof(struct tcp_hdr));
+	       sizeof(struct rte_tcp_hdr));
 	memcpy(gp->layer[FILTER_GENERIC_1_L4].val, &spec->hdr,
-	       sizeof(struct tcp_hdr));
+	       sizeof(struct rte_tcp_hdr));
 	return 0;
 }
 
drivers/net/i40e/i40e_fdir.c +10 -10
index 14a82426e..46dfa79b7 100644
@@ -800,7 +800,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,
 {
 	unsigned char *payload, *ptr;
 	struct udp_hdr *udp;
-	struct tcp_hdr *tcp;
+	struct rte_tcp_hdr *tcp;
 	struct rte_sctp_hdr *sctp;
 	uint8_t size, dst = 0;
 	uint8_t i, pit_idx, set_idx = I40E_FLXPLD_L4_IDX; /* use l4 by default*/
@@ -828,8 +828,8 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,
 		break;
 
 	case RTE_ETH_FLOW_NONFRAG_IPV4_TCP:
-		tcp = (struct tcp_hdr *)(raw_pkt + len);
-		payload = (unsigned char *)tcp + sizeof(struct tcp_hdr);
+		tcp = (struct rte_tcp_hdr *)(raw_pkt + len);
+		payload = (unsigned char *)tcp + sizeof(struct rte_tcp_hdr);
 		/*
 		 * The source and destination fields in the transmitted packet
 		 * need to be presented in a reversed order with respect
@@ -873,8 +873,8 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,
 		break;
 
 	case RTE_ETH_FLOW_NONFRAG_IPV6_TCP:
-		tcp = (struct tcp_hdr *)(raw_pkt + len);
-		payload = (unsigned char *)tcp + sizeof(struct tcp_hdr);
+		tcp = (struct rte_tcp_hdr *)(raw_pkt + len);
+		payload = (unsigned char *)tcp + sizeof(struct rte_tcp_hdr);
 		/*
 		 * The source and destination fields in the transmitted packet
 		 * need to be presented in a reversed order with respect
@@ -1090,7 +1090,7 @@ i40e_flow_fdir_construct_pkt(struct i40e_pf *pf,
 	unsigned char *payload = NULL;
 	unsigned char *ptr;
 	struct udp_hdr *udp;
-	struct tcp_hdr *tcp;
+	struct rte_tcp_hdr *tcp;
 	struct rte_sctp_hdr *sctp;
 	struct rte_flow_item_gtp *gtp;
 	struct rte_ipv4_hdr *gtp_ipv4;
@@ -1127,8 +1127,8 @@ i40e_flow_fdir_construct_pkt(struct i40e_pf *pf,
 		udp->dst_port = fdir_input->flow.udp4_flow.src_port;
 		udp->dgram_len = rte_cpu_to_be_16(I40E_FDIR_UDP_DEFAULT_LEN);
 	} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV4_TCP) {
-		tcp = (struct tcp_hdr *)(raw_pkt + len);
-		payload = (unsigned char *)tcp + sizeof(struct tcp_hdr);
+		tcp = (struct rte_tcp_hdr *)(raw_pkt + len);
+		payload = (unsigned char *)tcp + sizeof(struct rte_tcp_hdr);
 		/**
 		 * The source and destination fields in the transmitted packet
 		 * need to be presented in a reversed order with respect
@@ -1164,8 +1164,8 @@ i40e_flow_fdir_construct_pkt(struct i40e_pf *pf,
 		udp->dst_port = fdir_input->flow.udp6_flow.src_port;
 		udp->dgram_len = rte_cpu_to_be_16(I40E_FDIR_IPv6_PAYLOAD_LEN);
 	} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV6_TCP) {
-		tcp = (struct tcp_hdr *)(raw_pkt + len);
-		payload = (unsigned char *)tcp + sizeof(struct tcp_hdr);
+		tcp = (struct rte_tcp_hdr *)(raw_pkt + len);
+		payload = (unsigned char *)tcp + sizeof(struct rte_tcp_hdr);
 		/**
 		 * The source and destination fields in the transmitted packet
 		 * need to be presented in a reversed order with respect
drivers/net/i40e/i40e_rxtx.c +1 -1
index edd4509ee..6b8e586e5 100644
@@ -302,7 +302,7 @@ i40e_txd_enable_checksum(uint64_t ol_flags,
 	switch (ol_flags & PKT_TX_L4_MASK) {
 	case PKT_TX_TCP_CKSUM:
 		*td_cmd |= I40E_TX_DESC_CMD_L4T_EOFT_TCP;
-		*td_offset |= (sizeof(struct tcp_hdr) >> 2) <<
+		*td_offset |= (sizeof(struct rte_tcp_hdr) >> 2) <<
 				I40E_TX_DESC_LENGTH_L4_FC_LEN_SHIFT;
 		break;
 	case PKT_TX_SCTP_CKSUM:
drivers/net/iavf/iavf_rxtx.c +1 -1
index 7a6750e02..9c733a596 100644
@@ -1417,7 +1417,7 @@ iavf_txd_enable_checksum(uint64_t ol_flags,
 	switch (ol_flags & PKT_TX_L4_MASK) {
 	case PKT_TX_TCP_CKSUM:
 		*td_cmd |= IAVF_TX_DESC_CMD_L4T_EOFT_TCP;
-		*td_offset |= (sizeof(struct tcp_hdr) >> 2) <<
+		*td_offset |= (sizeof(struct rte_tcp_hdr) >> 2) <<
 			      IAVF_TX_DESC_LENGTH_L4_FC_LEN_SHIFT;
 		break;
 	case PKT_TX_SCTP_CKSUM:
drivers/net/ice/ice_rxtx.c +1 -1
index 2e15de46d..0862ab0cc 100644
@@ -1761,7 +1761,7 @@ ice_txd_enable_checksum(uint64_t ol_flags,
 	switch (ol_flags & PKT_TX_L4_MASK) {
 	case PKT_TX_TCP_CKSUM:
 		*td_cmd |= ICE_TX_DESC_CMD_L4T_EOFT_TCP;
-		*td_offset |= (sizeof(struct tcp_hdr) >> 2) <<
+		*td_offset |= (sizeof(struct rte_tcp_hdr) >> 2) <<
 			      ICE_TX_DESC_LEN_L4_LEN_S;
 		break;
 	case PKT_TX_SCTP_CKSUM:
drivers/net/ixgbe/ixgbe_rxtx.c +1 -1
index 08b2f5df5..c720a6db9 100644
@@ -429,7 +429,7 @@ ixgbe_set_xmit_ctx(struct ixgbe_tx_queue *txq,
 		case PKT_TX_TCP_CKSUM:
 			type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_L4T_TCP |
 				IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
-			mss_l4len_idx |= sizeof(struct tcp_hdr) << IXGBE_ADVTXD_L4LEN_SHIFT;
+			mss_l4len_idx |= sizeof(struct rte_tcp_hdr) << IXGBE_ADVTXD_L4LEN_SHIFT;
 			tx_offload_mask.l2_len |= ~0;
 			tx_offload_mask.l3_len |= ~0;
 			break;
drivers/net/mlx5/mlx5_flow.c +4 -4
index 43a5dd4cb..a1e90ea2d 100644
@@ -2607,11 +2607,11 @@ flow_fdir_filter_convert(struct rte_eth_dev *dev,
 		};
 		break;
 	case RTE_ETH_FLOW_NONFRAG_IPV4_TCP:
-		attributes->l4.tcp.hdr = (struct tcp_hdr){
+		attributes->l4.tcp.hdr = (struct rte_tcp_hdr){
 			.src_port = input->flow.tcp4_flow.src_port,
 			.dst_port = input->flow.tcp4_flow.dst_port,
 		};
-		attributes->l4_mask.tcp.hdr = (struct tcp_hdr){
+		attributes->l4_mask.tcp.hdr = (struct rte_tcp_hdr){
 			.src_port = mask->src_port_mask,
 			.dst_port = mask->dst_port_mask,
 		};
@@ -2637,11 +2637,11 @@ flow_fdir_filter_convert(struct rte_eth_dev *dev,
 		};
 		break;
 	case RTE_ETH_FLOW_NONFRAG_IPV6_TCP:
-		attributes->l4.tcp.hdr = (struct tcp_hdr){
+		attributes->l4.tcp.hdr = (struct rte_tcp_hdr){
 			.src_port = input->flow.tcp6_flow.src_port,
 			.dst_port = input->flow.tcp6_flow.dst_port,
 		};
-		attributes->l4_mask.tcp.hdr = (struct tcp_hdr){
+		attributes->l4_mask.tcp.hdr = (struct rte_tcp_hdr){
 			.src_port = mask->src_port_mask,
 			.dst_port = mask->dst_port_mask,
 		};
drivers/net/mlx5/mlx5_flow_tcf.c +2 -2
index 743ae8546..c118ede97 100644
@@ -776,8 +776,8 @@ flow_tcf_pedit_key_set_tp_port(const struct rte_flow_action *actions,
 	/* offset of src/dst port is same for TCP and UDP */
 	p_parser->keys[idx].off =
 		actions->type == RTE_FLOW_ACTION_TYPE_SET_TP_SRC ?
-		offsetof(struct tcp_hdr, src_port) :
-		offsetof(struct tcp_hdr, dst_port);
+		offsetof(struct rte_tcp_hdr, src_port) :
+		offsetof(struct rte_tcp_hdr, dst_port);
 	p_parser->keys[idx].mask = 0xFFFF0000;
 	p_parser->keys[idx].val =
 		(__u32)((const struct rte_flow_action_set_tp *)
drivers/net/qede/qede_filter.c +6 -6
index 34299b993..cd762cddb 100644
@@ -460,7 +460,7 @@ qede_arfs_construct_pkt(struct rte_eth_dev *eth_dev,
 	struct rte_ipv4_hdr *ip;
 	struct rte_ipv6_hdr *ip6;
 	struct udp_hdr *udp;
-	struct tcp_hdr *tcp;
+	struct rte_tcp_hdr *tcp;
 	uint16_t len;
 
 	raw_pkt = (uint8_t *)buff;
@@ -496,13 +496,13 @@ qede_arfs_construct_pkt(struct rte_eth_dev *eth_dev,
 			ip->total_length += sizeof(struct udp_hdr);
 			params->udp = true;
 		} else { /* TCP */
-			tcp = (struct tcp_hdr *)(raw_pkt + len);
+			tcp = (struct rte_tcp_hdr *)(raw_pkt + len);
 			tcp->src_port = arfs->tuple.src_port;
 			tcp->dst_port = arfs->tuple.dst_port;
 			tcp->data_off = QEDE_FDIR_TCP_DEFAULT_DATAOFF;
-			len += sizeof(struct tcp_hdr);
+			len += sizeof(struct rte_tcp_hdr);
 			/* adjust ip total_length */
-			ip->total_length += sizeof(struct tcp_hdr);
+			ip->total_length += sizeof(struct rte_tcp_hdr);
 			params->tcp = true;
 		}
 		break;
@@ -528,11 +528,11 @@ qede_arfs_construct_pkt(struct rte_eth_dev *eth_dev,
 			len += sizeof(struct udp_hdr);
 			params->udp = true;
 		} else { /* TCP */
-			tcp = (struct tcp_hdr *)(raw_pkt + len);
+			tcp = (struct rte_tcp_hdr *)(raw_pkt + len);
 			tcp->src_port = arfs->tuple.src_port;
 			tcp->dst_port = arfs->tuple.dst_port;
 			tcp->data_off = QEDE_FDIR_TCP_DEFAULT_DATAOFF;
-			len += sizeof(struct tcp_hdr);
+			len += sizeof(struct rte_tcp_hdr);
 			params->tcp = true;
 		}
 		break;
drivers/net/sfc/sfc_ef10_tx.c +2 -2
index 055389efe..4e4f35827 100644
@@ -373,7 +373,7 @@ sfc_ef10_xmit_tso_pkt(struct sfc_ef10_txq * const txq, struct rte_mbuf *m_seg,
 	size_t header_len = tcph_off + m_seg->l4_len;
 	/* Offset of the payload in the last segment that contains the header */
 	size_t in_off = 0;
-	const struct tcp_hdr *th;
+	const struct rte_tcp_hdr *th;
 	uint16_t packet_id = 0;
 	uint16_t outer_packet_id = 0;
 	uint32_t sent_seq;
@@ -489,7 +489,7 @@ sfc_ef10_xmit_tso_pkt(struct sfc_ef10_txq * const txq, struct rte_mbuf *m_seg,
 		outer_packet_id = sfc_tso_ip4_get_ipid(hdr_addr,
 						first_m_seg->outer_l2_len);
 
-	th = (const struct tcp_hdr *)(hdr_addr + tcph_off);
+	th = (const struct rte_tcp_hdr *)(hdr_addr + tcph_off);
 	rte_memcpy(&sent_seq, &th->sent_seq, sizeof(uint32_t));
 	sent_seq = rte_be_to_cpu_32(sent_seq);
 
drivers/net/sfc/sfc_tso.c +2 -2
index 1374aceaa..2e34fc045 100644
@@ -95,7 +95,7 @@ sfc_efx_tso_do(struct sfc_efx_txq *txq, unsigned int idx,
 	       unsigned int *pkt_descs, size_t *pkt_len)
 {
 	uint8_t *tsoh;
-	const struct tcp_hdr *th;
+	const struct rte_tcp_hdr *th;
 	efsys_dma_addr_t header_paddr;
 	uint16_t packet_id = 0;
 	uint32_t sent_seq;
@@ -150,7 +150,7 @@ sfc_efx_tso_do(struct sfc_efx_txq *txq, unsigned int idx,
 		packet_id = sfc_tso_ip4_get_ipid(tsoh, nh_off);
 
 	/* Handle TCP header */
-	th = (const struct tcp_hdr *)(tsoh + tcph_off);
+	th = (const struct rte_tcp_hdr *)(tsoh + tcph_off);
 
 	rte_memcpy(&sent_seq, &th->sent_seq, sizeof(uint32_t));
 	sent_seq = rte_be_to_cpu_32(sent_seq);
drivers/net/softnic/rte_eth_softnic_pipeline.c +4 -4
index e0e5856a4..337aa32e5 100644
@@ -688,7 +688,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv4[] = {
 		.field_index = 3,
 		.input_index = 3,
 		.offset = sizeof(struct rte_ipv4_hdr) +
-			offsetof(struct tcp_hdr, src_port),
+			offsetof(struct rte_tcp_hdr, src_port),
 	},
 
 	/* Destination Port */
@@ -698,7 +698,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv4[] = {
 		.field_index = 4,
 		.input_index = 3,
 		.offset = sizeof(struct rte_ipv4_hdr) +
-			offsetof(struct tcp_hdr, dst_port),
+			offsetof(struct rte_tcp_hdr, dst_port),
 	},
 };
 
@@ -785,7 +785,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = {
 		.field_index = 9,
 		.input_index = 9,
 		.offset = sizeof(struct rte_ipv6_hdr) +
-			offsetof(struct tcp_hdr, src_port),
+			offsetof(struct rte_tcp_hdr, src_port),
 	},
 
 	/* Destination Port */
@@ -795,7 +795,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = {
 		.field_index = 10,
 		.input_index = 9,
 		.offset = sizeof(struct rte_ipv6_hdr) +
-			offsetof(struct tcp_hdr, dst_port),
+			offsetof(struct rte_tcp_hdr, dst_port),
 	},
 };
 
drivers/net/tap/rte_eth_tap.c +1 -1
index 2465d9c2c..a6d3baa5f 100644
@@ -510,7 +510,7 @@ tap_tx_l3_cksum(char *packet, uint64_t ol_flags, unsigned int l2_len,
 		if ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_UDP_CKSUM)
 			*l4_cksum = &((struct udp_hdr *)l4_hdr)->dgram_cksum;
 		else if ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_TCP_CKSUM)
-			*l4_cksum = &((struct tcp_hdr *)l4_hdr)->cksum;
+			*l4_cksum = &((struct rte_tcp_hdr *)l4_hdr)->cksum;
 		else
 			return;
 		**l4_cksum = 0;
drivers/net/virtio/virtio_rxtx.c +2 -2
index 2b1080155..6c3f21bfb 100644
@@ -481,7 +481,7 @@ virtio_tso_fix_cksum(struct rte_mbuf *m)
 			m->l4_len)) {
 		struct rte_ipv4_hdr *iph;
 		struct rte_ipv6_hdr *ip6h;
-		struct tcp_hdr *th;
+		struct rte_tcp_hdr *th;
 		uint16_t prev_cksum, new_cksum, ip_len, ip_paylen;
 		uint32_t tmp;
 
@@ -545,7 +545,7 @@ virtqueue_xmit_offload(struct virtio_net_hdr *hdr,
 
 		case PKT_TX_TCP_CKSUM:
 			hdr->csum_start = cookie->l2_len + cookie->l3_len;
-			hdr->csum_offset = offsetof(struct tcp_hdr, cksum);
+			hdr->csum_offset = offsetof(struct rte_tcp_hdr, cksum);
 			hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
 			break;
 
drivers/net/vmxnet3/vmxnet3_rxtx.c +7 -7
index 949798c39..550cd8738 100644
@@ -541,7 +541,7 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 
 			switch (txm->ol_flags & PKT_TX_L4_MASK) {
 			case PKT_TX_TCP_CKSUM:
-				gdesc->txd.msscof = gdesc->txd.hlen + offsetof(struct tcp_hdr, cksum);
+				gdesc->txd.msscof = gdesc->txd.hlen + offsetof(struct rte_tcp_hdr, cksum);
 				break;
 			case PKT_TX_UDP_CKSUM:
 				gdesc->txd.msscof = gdesc->txd.hlen + offsetof(struct udp_hdr, dgram_cksum);
@@ -669,7 +669,7 @@ vmxnet3_guess_mss(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
 	uint32_t hlen, slen;
 	struct rte_ipv4_hdr *ipv4_hdr;
 	struct rte_ipv6_hdr *ipv6_hdr;
-	struct tcp_hdr *tcp_hdr;
+	struct rte_tcp_hdr *tcp_hdr;
 	char *ptr;
 
 	RTE_ASSERT(rcd->tcp);
@@ -681,7 +681,7 @@ vmxnet3_guess_mss(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
 	if (rcd->v4) {
 		if (unlikely(slen < hlen + sizeof(struct rte_ipv4_hdr)))
 			return hw->mtu - sizeof(struct rte_ipv4_hdr)
-					- sizeof(struct tcp_hdr);
+					- sizeof(struct rte_tcp_hdr);
 
 		ipv4_hdr = (struct rte_ipv4_hdr *)(ptr + hlen);
 		hlen += (ipv4_hdr->version_ihl & RTE_IPV4_HDR_IHL_MASK) *
@@ -689,7 +689,7 @@ vmxnet3_guess_mss(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
 	} else if (rcd->v6) {
 		if (unlikely(slen < hlen + sizeof(struct rte_ipv6_hdr)))
 			return hw->mtu - sizeof(struct rte_ipv6_hdr) -
-					sizeof(struct tcp_hdr);
+					sizeof(struct rte_tcp_hdr);
 
 		ipv6_hdr = (struct rte_ipv6_hdr *)(ptr + hlen);
 		hlen += sizeof(struct rte_ipv6_hdr);
@@ -701,11 +701,11 @@ vmxnet3_guess_mss(struct vmxnet3_hw *hw, const Vmxnet3_RxCompDesc *rcd,
 		}
 	}
 
-	if (unlikely(slen < hlen + sizeof(struct tcp_hdr)))
-		return hw->mtu - hlen - sizeof(struct tcp_hdr) +
+	if (unlikely(slen < hlen + sizeof(struct rte_tcp_hdr)))
+		return hw->mtu - hlen - sizeof(struct rte_tcp_hdr) +
 				sizeof(struct rte_ether_hdr);
 
-	tcp_hdr = (struct tcp_hdr *)(ptr + hlen);
+	tcp_hdr = (struct rte_tcp_hdr *)(ptr + hlen);
 	hlen += (tcp_hdr->data_off & 0xf0) >> 2;
 
 	if (rxm->udata64 > 1)
examples/flow_classify/flow_classify.c +2 -2
index e68d0f694..75a66fd5b 100644
@@ -133,7 +133,7 @@ static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
 		.input_index = SRCP_DESTP_INPUT_IPV4,
 		.offset = sizeof(struct rte_ether_hdr) +
 			sizeof(struct rte_ipv4_hdr) +
-			offsetof(struct tcp_hdr, src_port),
+			offsetof(struct rte_tcp_hdr, src_port),
 	},
 	{
 		/* rte_flow uses a bit mask for protocol ports */
@@ -143,7 +143,7 @@ static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
 		.input_index = SRCP_DESTP_INPUT_IPV4,
 		.offset = sizeof(struct rte_ether_hdr) +
 			sizeof(struct rte_ipv4_hdr) +
-			offsetof(struct tcp_hdr, dst_port),
+			offsetof(struct rte_tcp_hdr, dst_port),
 	},
 };
 
examples/ip_pipeline/pipeline.c +4 -4
index 9cc7e32d8..b627310a0 100644
@@ -664,7 +664,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv4[] = {
 		.field_index = 3,
 		.input_index = 3,
 		.offset = sizeof(struct rte_ipv4_hdr) +
-			offsetof(struct tcp_hdr, src_port),
+			offsetof(struct rte_tcp_hdr, src_port),
 	},
 
 	/* Destination Port */
@@ -674,7 +674,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv4[] = {
 		.field_index = 4,
 		.input_index = 3,
 		.offset = sizeof(struct rte_ipv4_hdr) +
-			offsetof(struct tcp_hdr, dst_port),
+			offsetof(struct rte_tcp_hdr, dst_port),
 	},
 };
 
@@ -761,7 +761,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = {
 		.field_index = 9,
 		.input_index = 9,
 		.offset = sizeof(struct rte_ipv6_hdr) +
-			offsetof(struct tcp_hdr, src_port),
+			offsetof(struct rte_tcp_hdr, src_port),
 	},
 
 	/* Destination Port */
@@ -771,7 +771,7 @@ static const struct rte_acl_field_def table_acl_field_format_ipv6[] = {
 		.field_index = 10,
 		.input_index = 9,
 		.offset = sizeof(struct rte_ipv6_hdr) +
-			offsetof(struct tcp_hdr, dst_port),
+			offsetof(struct rte_tcp_hdr, dst_port),
 	},
 };
 
examples/l3fwd-power/main.c +4 -4
index 959925e73..cd43b37dc 100644
@@ -527,7 +527,7 @@ get_ipv4_dst_port(struct rte_ipv4_hdr *ipv4_hdr, uint16_t portid,
 		lookup_struct_t * ipv4_l3fwd_lookup_struct)
 {
 	struct ipv4_5tuple key;
-	struct tcp_hdr *tcp;
+	struct rte_tcp_hdr *tcp;
 	struct udp_hdr *udp;
 	int ret = 0;
 
@@ -537,7 +537,7 @@ get_ipv4_dst_port(struct rte_ipv4_hdr *ipv4_hdr, uint16_t portid,
 
 	switch (ipv4_hdr->next_proto_id) {
 	case IPPROTO_TCP:
-		tcp = (struct tcp_hdr *)((unsigned char *)ipv4_hdr +
+		tcp = (struct rte_tcp_hdr *)((unsigned char *)ipv4_hdr +
 					sizeof(struct rte_ipv4_hdr));
 		key.port_dst = rte_be_to_cpu_16(tcp->dst_port);
 		key.port_src = rte_be_to_cpu_16(tcp->src_port);
@@ -566,7 +566,7 @@ get_ipv6_dst_port(struct rte_ipv6_hdr *ipv6_hdr, uint16_t portid,
 			lookup_struct_t *ipv6_l3fwd_lookup_struct)
 {
 	struct ipv6_5tuple key;
-	struct tcp_hdr *tcp;
+	struct rte_tcp_hdr *tcp;
 	struct udp_hdr *udp;
 	int ret = 0;
 
@@ -577,7 +577,7 @@ get_ipv6_dst_port(struct rte_ipv6_hdr *ipv6_hdr, uint16_t portid,
 
 	switch (ipv6_hdr->proto) {
 	case IPPROTO_TCP:
-		tcp = (struct tcp_hdr *)((unsigned char *) ipv6_hdr +
+		tcp = (struct rte_tcp_hdr *)((unsigned char *) ipv6_hdr +
 					sizeof(struct rte_ipv6_hdr));
 		key.port_dst = rte_be_to_cpu_16(tcp->dst_port);
 		key.port_src = rte_be_to_cpu_16(tcp->src_port);
examples/l3fwd-vf/main.c +2 -2
index 5e3809b8d..d57ac262b 100644
@@ -366,7 +366,7 @@ get_dst_port(struct rte_ipv4_hdr *ipv4_hdr, uint16_t portid,
 	      lookup_struct_t *l3fwd_lookup_struct)
 {
 	struct ipv4_5tuple key;
-	struct tcp_hdr *tcp;
+	struct rte_tcp_hdr *tcp;
 	struct udp_hdr *udp;
 	int ret = 0;
 
@@ -376,7 +376,7 @@ get_dst_port(struct rte_ipv4_hdr *ipv4_hdr, uint16_t portid,
 
 	switch (ipv4_hdr->next_proto_id) {
 	case IPPROTO_TCP:
-		tcp = (struct tcp_hdr *)((unsigned char *) ipv4_hdr +
+		tcp = (struct rte_tcp_hdr *)((unsigned char *) ipv4_hdr +
 					sizeof(struct rte_ipv4_hdr));
 		key.port_dst = rte_be_to_cpu_16(tcp->dst_port);
 		key.port_src = rte_be_to_cpu_16(tcp->src_port);
examples/tep_termination/vxlan.c +2 -2
index 07a53abc3..261332adf 100644
@@ -76,7 +76,7 @@ process_inner_cksums(struct rte_ether_hdr *eth_hdr, union tunnel_offload_info *i
 	struct rte_ipv4_hdr *ipv4_hdr;
 	struct rte_ipv6_hdr *ipv6_hdr;
 	struct udp_hdr *udp_hdr;
-	struct tcp_hdr *tcp_hdr;
+	struct rte_tcp_hdr *tcp_hdr;
 	struct rte_sctp_hdr *sctp_hdr;
 	uint64_t ol_flags = 0;
 
@@ -112,7 +112,7 @@ process_inner_cksums(struct rte_ether_hdr *eth_hdr, union tunnel_offload_info *i
 		udp_hdr->dgram_cksum = get_psd_sum(l3_hdr,
 				ethertype, ol_flags);
 	} else if (l4_proto == IPPROTO_TCP) {
-		tcp_hdr = (struct tcp_hdr *)((char *)l3_hdr + info->l3_len);
+		tcp_hdr = (struct rte_tcp_hdr *)((char *)l3_hdr + info->l3_len);
 		/* Put PKT_TX_TCP_SEG bit setting before get_psd_sum(), because
 		 * it depends on PKT_TX_TCP_SEG to calculate pseudo-header
 		 * checksum.
examples/vhost/main.c +2 -2
index ce14b100a..a8719caec 100644
@@ -865,7 +865,7 @@ static void virtio_tx_offload(struct rte_mbuf *m)
 {
 	void *l3_hdr;
 	struct rte_ipv4_hdr *ipv4_hdr = NULL;
-	struct tcp_hdr *tcp_hdr = NULL;
+	struct rte_tcp_hdr *tcp_hdr = NULL;
 	struct rte_ether_hdr *eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
 
 	l3_hdr = (char *)eth_hdr + m->l2_len;
@@ -876,7 +876,7 @@ static void virtio_tx_offload(struct rte_mbuf *m)
 		m->ol_flags |= PKT_TX_IP_CKSUM;
 	}
 
-	tcp_hdr = (struct tcp_hdr *)((char *)l3_hdr + m->l3_len);
+	tcp_hdr = (struct rte_tcp_hdr *)((char *)l3_hdr + m->l3_len);
 	tcp_hdr->cksum = get_psd_sum(l3_hdr, m->ol_flags);
 }
 
lib/librte_ethdev/rte_flow.h +1 -1
index f93427a44..fcf444ffd 100644
@@ -712,7 +712,7 @@ static const struct rte_flow_item_udp rte_flow_item_udp_mask = {
  * Matches a TCP header.
  */
 struct rte_flow_item_tcp {
-	struct tcp_hdr hdr; /**< TCP header definition. */
+	struct rte_tcp_hdr hdr; /**< TCP header definition. */
 };
 
 /** Default mask for RTE_FLOW_ITEM_TYPE_TCP. */
lib/librte_gro/gro_tcp4.c +2 -2
index 20f2ea7e6..70d8c5d19 100644
@@ -196,7 +196,7 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
 {
 	struct rte_ether_hdr *eth_hdr;
 	struct rte_ipv4_hdr *ipv4_hdr;
-	struct tcp_hdr *tcp_hdr;
+	struct rte_tcp_hdr *tcp_hdr;
 	uint32_t sent_seq;
 	int32_t tcp_dl;
 	uint16_t ip_id, hdr_len, frag_off;
@@ -217,7 +217,7 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
 
 	eth_hdr = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
 	ipv4_hdr = (struct rte_ipv4_hdr *)((char *)eth_hdr + pkt->l2_len);
-	tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);
+	tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);
 	hdr_len = pkt->l2_len + pkt->l3_len + pkt->l4_len;
 
 	/*
lib/librte_gro/gro_tcp4.h +5 -5
index 0a42a1ae8..9fe291191 100644
@@ -20,7 +20,7 @@
 /* The maximum TCP header length */
 #define MAX_TCP_HLEN 60
 #define INVALID_TCP_HDRLEN(len) \
-	(((len) < sizeof(struct tcp_hdr)) || ((len) > MAX_TCP_HLEN))
+	(((len) < sizeof(struct rte_tcp_hdr)) || ((len) > MAX_TCP_HLEN))
 
 /* Header fields representing a TCP/IPv4 flow */
 struct tcp4_flow_key {
@@ -260,7 +260,7 @@ merge_two_tcp4_packets(struct gro_tcp4_item *item,
  */
 static inline int
 check_seq_option(struct gro_tcp4_item *item,
-		struct tcp_hdr *tcph,
+		struct rte_tcp_hdr *tcph,
 		uint32_t sent_seq,
 		uint16_t ip_id,
 		uint16_t tcp_hl,
@@ -270,16 +270,16 @@ check_seq_option(struct gro_tcp4_item *item,
 {
 	struct rte_mbuf *pkt_orig = item->firstseg;
 	struct rte_ipv4_hdr *iph_orig;
-	struct tcp_hdr *tcph_orig;
+	struct rte_tcp_hdr *tcph_orig;
 	uint16_t len, tcp_hl_orig;
 
 	iph_orig = (struct rte_ipv4_hdr *)(rte_pktmbuf_mtod(pkt_orig, char *) +
 			l2_offset + pkt_orig->l2_len);
-	tcph_orig = (struct tcp_hdr *)((char *)iph_orig + pkt_orig->l3_len);
+	tcph_orig = (struct rte_tcp_hdr *)((char *)iph_orig + pkt_orig->l3_len);
 	tcp_hl_orig = pkt_orig->l4_len;
 
 	/* Check if TCP option fields equal */
-	len = RTE_MAX(tcp_hl, tcp_hl_orig) - sizeof(struct tcp_hdr);
+	len = RTE_MAX(tcp_hl, tcp_hl_orig) - sizeof(struct rte_tcp_hdr);
 	if ((tcp_hl != tcp_hl_orig) || ((len > 0) &&
 				(memcmp(tcph + 1, tcph_orig + 1,
 					len) != 0)))
lib/librte_gro/gro_vxlan_tcp4.c +3 -3
index d26aa95b4..e8adb310b 100644
@@ -207,7 +207,7 @@ is_same_vxlan_tcp4_flow(struct vxlan_tcp4_flow_key k1,
 
 static inline int
 check_vxlan_seq_option(struct gro_vxlan_tcp4_item *item,
-		struct tcp_hdr *tcp_hdr,
+		struct rte_tcp_hdr *tcp_hdr,
 		uint32_t sent_seq,
 		uint16_t outer_ip_id,
 		uint16_t ip_id,
@@ -291,7 +291,7 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt,
 {
 	struct rte_ether_hdr *outer_eth_hdr, *eth_hdr;
 	struct rte_ipv4_hdr *outer_ipv4_hdr, *ipv4_hdr;
-	struct tcp_hdr *tcp_hdr;
+	struct rte_tcp_hdr *tcp_hdr;
 	struct udp_hdr *udp_hdr;
 	struct rte_vxlan_hdr *vxlan_hdr;
 	uint32_t sent_seq;
@@ -323,7 +323,7 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt,
 	eth_hdr = (struct rte_ether_hdr *)((char *)vxlan_hdr +
 			sizeof(struct rte_vxlan_hdr));
 	ipv4_hdr = (struct rte_ipv4_hdr *)((char *)udp_hdr + pkt->l2_len);
-	tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);
+	tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);
 
 	/*
 	 * Don't process the packet which has FIN, SYN, RST, PSH, URG,
lib/librte_gso/gso_common.h +2 -2
index 13c9aeea8..3edd2429b 100644
@@ -71,9 +71,9 @@ static inline void
 update_tcp_header(struct rte_mbuf *pkt, uint16_t l4_offset, uint32_t sent_seq,
 		uint8_t non_tail)
 {
-	struct tcp_hdr *tcp_hdr;
+	struct rte_tcp_hdr *tcp_hdr;
 
-	tcp_hdr = (struct tcp_hdr *)(rte_pktmbuf_mtod(pkt, char *) +
+	tcp_hdr = (struct rte_tcp_hdr *)(rte_pktmbuf_mtod(pkt, char *) +
 			l4_offset);
 	tcp_hdr->sent_seq = rte_cpu_to_be_32(sent_seq);
 	if (likely(non_tail))
lib/librte_gso/gso_tcp4.c +2 -2
index ad0cce6f9..ade172ac7 100644
@@ -10,7 +10,7 @@ update_ipv4_tcp_headers(struct rte_mbuf *pkt, uint8_t ipid_delta,
 		struct rte_mbuf **segs, uint16_t nb_segs)
 {
 	struct rte_ipv4_hdr *ipv4_hdr;
-	struct tcp_hdr *tcp_hdr;
+	struct rte_tcp_hdr *tcp_hdr;
 	uint32_t sent_seq;
 	uint16_t id, tail_idx, i;
 	uint16_t l3_offset = pkt->l2_len;
@@ -18,7 +18,7 @@ update_ipv4_tcp_headers(struct rte_mbuf *pkt, uint8_t ipid_delta,
 
 	ipv4_hdr = (struct rte_ipv4_hdr *)(rte_pktmbuf_mtod(pkt, char*) +
 			l3_offset);
-	tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);
+	tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);
 	id = rte_be_to_cpu_16(ipv4_hdr->packet_id);
 	sent_seq = rte_be_to_cpu_32(tcp_hdr->sent_seq);
 	tail_idx = nb_segs - 1;
lib/librte_gso/gso_tunnel_tcp4.c +2 -2
index f5a19bc43..e0384c26d 100644
@@ -10,7 +10,7 @@ update_tunnel_ipv4_tcp_headers(struct rte_mbuf *pkt, uint8_t ipid_delta,
 		struct rte_mbuf **segs, uint16_t nb_segs)
 {
 	struct rte_ipv4_hdr *ipv4_hdr;
-	struct tcp_hdr *tcp_hdr;
+	struct rte_tcp_hdr *tcp_hdr;
 	uint32_t sent_seq;
 	uint16_t outer_id, inner_id, tail_idx, i;
 	uint16_t outer_ipv4_offset, inner_ipv4_offset;
@@ -32,7 +32,7 @@ update_tunnel_ipv4_tcp_headers(struct rte_mbuf *pkt, uint8_t ipid_delta,
 			inner_ipv4_offset);
 	inner_id = rte_be_to_cpu_16(ipv4_hdr->packet_id);
 
-	tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);
+	tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv4_hdr + pkt->l3_len);
 	sent_seq = rte_be_to_cpu_32(tcp_hdr->sent_seq);
 	tail_idx = nb_segs - 1;
 
lib/librte_gso/rte_gso.h +1 -1
index ee879968c..8f65adf1c 100644
@@ -19,7 +19,7 @@ extern "C" {
 
 /* Minimum GSO segment size for TCP based packets. */
 #define RTE_GSO_SEG_SIZE_MIN (sizeof(struct rte_ether_hdr) + \
-		sizeof(struct rte_ipv4_hdr) + sizeof(struct tcp_hdr) + 1)
+		sizeof(struct rte_ipv4_hdr) + sizeof(struct rte_tcp_hdr) + 1)
 
 /* Minimum GSO segment size for UDP based packets. */
 #define RTE_GSO_UDP_SEG_SIZE_MIN (sizeof(struct rte_ether_hdr) + \
lib/librte_net/rte_net.c +4 -4
index 4a46df58d..268892cc9 100644
@@ -360,8 +360,8 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
 		hdr_lens->l4_len = sizeof(struct udp_hdr);
 		return pkt_type;
 	} else if ((pkt_type & RTE_PTYPE_L4_MASK) == RTE_PTYPE_L4_TCP) {
-		const struct tcp_hdr *th;
-		struct tcp_hdr th_copy;
+		const struct rte_tcp_hdr *th;
+		struct rte_tcp_hdr th_copy;
 
 		th = rte_pktmbuf_read(m, off, sizeof(*th), &th_copy);
 		if (unlikely(th == NULL))
@@ -496,8 +496,8 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
 		hdr_lens->inner_l4_len = sizeof(struct udp_hdr);
 	} else if ((pkt_type & RTE_PTYPE_INNER_L4_MASK) ==
 			RTE_PTYPE_INNER_L4_TCP) {
-		const struct tcp_hdr *th;
-		struct tcp_hdr th_copy;
+		const struct rte_tcp_hdr *th;
+		struct rte_tcp_hdr th_copy;
 
 		th = rte_pktmbuf_read(m, off, sizeof(*th), &th_copy);
 		if (unlikely(th == NULL))
lib/librte_net/rte_net.h +3 -3
index 5c9a37a94..57b5ce363 100644
@@ -114,7 +114,7 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
 {
 	struct rte_ipv4_hdr *ipv4_hdr;
 	struct rte_ipv6_hdr *ipv6_hdr;
-	struct tcp_hdr *tcp_hdr;
+	struct rte_tcp_hdr *tcp_hdr;
 	struct udp_hdr *udp_hdr;
 	uint64_t inner_l3_offset = m->l2_len;
 
@@ -170,7 +170,7 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
 			(ol_flags & PKT_TX_TCP_SEG)) {
 		if (ol_flags & PKT_TX_IPV4) {
 			/* non-TSO tcp or TSO */
-			tcp_hdr = (struct tcp_hdr *)((char *)ipv4_hdr +
+			tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv4_hdr +
 					m->l3_len);
 			tcp_hdr->cksum = rte_ipv4_phdr_cksum(ipv4_hdr,
 					ol_flags);
@@ -178,7 +178,7 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
 			ipv6_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv6_hdr *,
 					inner_l3_offset);
 			/* non-TSO tcp or TSO */
-			tcp_hdr = rte_pktmbuf_mtod_offset(m, struct tcp_hdr *,
+			tcp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_tcp_hdr *,
 					inner_l3_offset + m->l3_len);
 			tcp_hdr->cksum = rte_ipv6_phdr_cksum(ipv6_hdr,
 					ol_flags);
lib/librte_net/rte_tcp.h +1 -1
index 91f58987b..4bcda5565 100644
@@ -23,7 +23,7 @@ extern "C" {
 /**
  * TCP Header
  */
-struct tcp_hdr {
+struct rte_tcp_hdr {
 	uint16_t src_port;  /**< TCP source port. */
 	uint16_t dst_port;  /**< TCP destination port. */
 	uint32_t sent_seq;  /**< TX data sequence number. */
lib/librte_pipeline/rte_table_action.c +4 -4
index 682df6cc4..3df121c06 100644
@@ -1340,7 +1340,7 @@ pkt_ipv4_work_nat(struct rte_ipv4_hdr *ip,
 {
 	if (cfg->source_nat) {
 		if (cfg->proto == 0x6) {
-			struct tcp_hdr *tcp = (struct tcp_hdr *) &ip[1];
+			struct rte_tcp_hdr *tcp = (struct rte_tcp_hdr *) &ip[1];
 			uint16_t ip_cksum, tcp_cksum;
 
 			ip_cksum = nat_ipv4_checksum_update(ip->hdr_checksum,
@@ -1379,7 +1379,7 @@ pkt_ipv4_work_nat(struct rte_ipv4_hdr *ip,
 		}
 	} else {
 		if (cfg->proto == 0x6) {
-			struct tcp_hdr *tcp = (struct tcp_hdr *) &ip[1];
+			struct rte_tcp_hdr *tcp = (struct rte_tcp_hdr *) &ip[1];
 			uint16_t ip_cksum, tcp_cksum;
 
 			ip_cksum = nat_ipv4_checksum_update(ip->hdr_checksum,
@@ -1426,7 +1426,7 @@ pkt_ipv6_work_nat(struct rte_ipv6_hdr *ip,
 {
 	if (cfg->source_nat) {
 		if (cfg->proto == 0x6) {
-			struct tcp_hdr *tcp = (struct tcp_hdr *) &ip[1];
+			struct rte_tcp_hdr *tcp = (struct rte_tcp_hdr *) &ip[1];
 			uint16_t tcp_cksum;
 
 			tcp_cksum = nat_ipv6_tcp_udp_checksum_update(tcp->cksum,
@@ -1454,7 +1454,7 @@ pkt_ipv6_work_nat(struct rte_ipv6_hdr *ip,
 		}
 	} else {
 		if (cfg->proto == 0x6) {
-			struct tcp_hdr *tcp = (struct tcp_hdr *) &ip[1];
+			struct rte_tcp_hdr *tcp = (struct rte_tcp_hdr *) &ip[1];
 			uint16_t tcp_cksum;
 
 			tcp_cksum = nat_ipv6_tcp_udp_checksum_update(tcp->cksum,
lib/librte_vhost/virtio_net.c +3 -3
index 720d77ba6..fadfa3288 100644
@@ -218,7 +218,7 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
 
 		switch (csum_l4) {
 		case PKT_TX_TCP_CKSUM:
-			net_hdr->csum_offset = (offsetof(struct tcp_hdr,
+			net_hdr->csum_offset = (offsetof(struct rte_tcp_hdr,
 						cksum));
 			break;
 		case PKT_TX_UDP_CKSUM:
@@ -1014,7 +1014,7 @@ vhost_dequeue_offload(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
 {
 	uint16_t l4_proto = 0;
 	void *l4_hdr = NULL;
-	struct tcp_hdr *tcp_hdr = NULL;
+	struct rte_tcp_hdr *tcp_hdr = NULL;
 
 	if (hdr->flags == 0 && hdr->gso_type == VIRTIO_NET_HDR_GSO_NONE)
 		return;
@@ -1023,7 +1023,7 @@ vhost_dequeue_offload(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
 	if (hdr->flags == VIRTIO_NET_HDR_F_NEEDS_CSUM) {
 		if (hdr->csum_start == (m->l2_len + m->l3_len)) {
 			switch (hdr->csum_offset) {
-			case (offsetof(struct tcp_hdr, cksum)):
+			case (offsetof(struct rte_tcp_hdr, cksum)):
 				if (l4_proto == IPPROTO_TCP)
 					m->ol_flags |= PKT_TX_TCP_CKSUM;
 				break;
Signature · 1 line
2.11.0
#56 lore raw

RFC v2 14/14 net: add rte prefix to udp structure

In reply to Olivier Matz

Add 'rte_' prefix to structures:
- rename struct udp_hdr as struct rte_udp_hdr.

---
 app/test-pmd/csumonly.c                | 24 ++++++++++++------------
 app/test-pmd/flowgen.c                 |  4 ++--
 app/test-pmd/txonly.c                  |  8 ++++----
 app/test-pmd/util.c                    |  6 +++---
 app/test/packet_burst_generator.c      | 12 ++++++------
 app/test/packet_burst_generator.h      |  4 ++--
 app/test/test_flow_classify.c          |  2 +-
 app/test/test_link_bonding.c           |  4 ++--
 app/test/test_link_bonding_mode4.c     |  2 +-
 app/test/test_pmd_perf.c               |  2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c |  6 +++---
 drivers/net/dpaa/dpaa_rxtx.c           |  2 +-
 drivers/net/e1000/em_rxtx.c            |  2 +-
 drivers/net/e1000/igb_rxtx.c           |  2 +-
 drivers/net/enic/enic_clsf.c           |  8 ++++----
 drivers/net/enic/enic_flow.c           | 22 +++++++++++-----------
 drivers/net/i40e/i40e_fdir.c           | 24 ++++++++++++------------
 drivers/net/i40e/i40e_rxtx.c           |  2 +-
 drivers/net/iavf/iavf_rxtx.c           |  2 +-
 drivers/net/ice/ice_rxtx.c             |  2 +-
 drivers/net/ixgbe/ixgbe_rxtx.c         |  2 +-
 drivers/net/mlx5/mlx5_flow.c           |  8 ++++----
 drivers/net/mlx5/mlx5_flow_dv.c        |  4 ++--
 drivers/net/qede/qede_filter.c         | 14 +++++++-------
 drivers/net/tap/rte_eth_tap.c          |  2 +-
 drivers/net/virtio/virtio_rxtx.c       |  2 +-
 drivers/net/vmxnet3/vmxnet3_rxtx.c     |  2 +-
 examples/l3fwd-power/main.c            |  8 ++++----
 examples/l3fwd-vf/main.c               |  4 ++--
 examples/tep_termination/vxlan.c       | 16 ++++++++--------
 lib/librte_ethdev/rte_flow.h           |  2 +-
 lib/librte_gro/gro_vxlan_tcp4.c        | 10 +++++-----
 lib/librte_gso/gso_common.h            |  4 ++--
 lib/librte_gso/rte_gso.h               |  2 +-
 lib/librte_net/rte_ether.h             |  4 ++--
 lib/librte_net/rte_net.c               |  4 ++--
 lib/librte_net/rte_net.h               |  6 +++---
 lib/librte_net/rte_udp.h               |  2 +-
 lib/librte_pipeline/rte_table_action.c | 32 ++++++++++++++++----------------
 lib/librte_vhost/virtio_net.c          |  6 +++---
 40 files changed, 137 insertions(+), 137 deletions(-)
app/test-pmd/csumonly.c +12 -12
index ae4a091dd..55926e812 100644
@@ -112,7 +112,7 @@ parse_ipv4(struct rte_ipv4_hdr *ipv4_hdr, struct testpmd_offload_info *info)
 		tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv4_hdr + info->l3_len);
 		info->l4_len = (tcp_hdr->data_off & 0xf0) >> 2;
 	} else if (info->l4_proto == IPPROTO_UDP)
-		info->l4_len = sizeof(struct udp_hdr);
+		info->l4_len = sizeof(struct rte_udp_hdr);
 	else
 		info->l4_len = 0;
 }
@@ -131,7 +131,7 @@ parse_ipv6(struct rte_ipv6_hdr *ipv6_hdr, struct testpmd_offload_info *info)
 		tcp_hdr = (struct rte_tcp_hdr *)((char *)ipv6_hdr + info->l3_len);
 		info->l4_len = (tcp_hdr->data_off & 0xf0) >> 2;
 	} else if (info->l4_proto == IPPROTO_UDP)
-		info->l4_len = sizeof(struct udp_hdr);
+		info->l4_len = sizeof(struct rte_udp_hdr);
 	else
 		info->l4_len = 0;
 }
@@ -176,7 +176,7 @@ parse_ethernet(struct rte_ether_hdr *eth_hdr, struct testpmd_offload_info *info)
 
 /* Parse a vxlan header */
 static void
-parse_vxlan(struct udp_hdr *udp_hdr,
+parse_vxlan(struct rte_udp_hdr *udp_hdr,
 	    struct testpmd_offload_info *info,
 	    uint32_t pkt_type)
 {
@@ -196,7 +196,7 @@ parse_vxlan(struct udp_hdr *udp_hdr,
 	info->outer_l4_proto = info->l4_proto;
 
 	eth_hdr = (struct rte_ether_hdr *)((char *)udp_hdr +
-		sizeof(struct udp_hdr) +
+		sizeof(struct rte_udp_hdr) +
 		sizeof(struct rte_vxlan_hdr));
 
 	parse_ethernet(eth_hdr, info);
@@ -205,7 +205,7 @@ parse_vxlan(struct udp_hdr *udp_hdr,
 
 /* Parse a vxlan-gpe header */
 static void
-parse_vxlan_gpe(struct udp_hdr *udp_hdr,
+parse_vxlan_gpe(struct rte_udp_hdr *udp_hdr,
 	    struct testpmd_offload_info *info)
 {
 	struct rte_ether_hdr *eth_hdr;
@@ -219,7 +219,7 @@ parse_vxlan_gpe(struct udp_hdr *udp_hdr,
 		return;
 
 	vxlan_gpe_hdr = (struct rte_vxlan_gpe_hdr *)((char *)udp_hdr +
-				sizeof(struct udp_hdr));
+				sizeof(struct rte_udp_hdr));
 
 	if (!vxlan_gpe_hdr->proto || vxlan_gpe_hdr->proto ==
 	    RTE_VXLAN_GPE_TYPE_IPV4) {
@@ -363,7 +363,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
 	uint64_t tx_offloads)
 {
 	struct rte_ipv4_hdr *ipv4_hdr = l3_hdr;
-	struct udp_hdr *udp_hdr;
+	struct rte_udp_hdr *udp_hdr;
 	struct rte_tcp_hdr *tcp_hdr;
 	struct rte_sctp_hdr *sctp_hdr;
 	uint64_t ol_flags = 0;
@@ -403,7 +403,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
 		return 0; /* packet type not supported, nothing to do */
 
 	if (info->l4_proto == IPPROTO_UDP) {
-		udp_hdr = (struct udp_hdr *)((char *)l3_hdr + info->l3_len);
+		udp_hdr = (struct rte_udp_hdr *)((char *)l3_hdr + info->l3_len);
 		/* do not recalculate udp cksum if it was 0 */
 		if (udp_hdr->dgram_cksum != 0) {
 			udp_hdr->dgram_cksum = 0;
@@ -455,7 +455,7 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
 {
 	struct rte_ipv4_hdr *ipv4_hdr = outer_l3_hdr;
 	struct rte_ipv6_hdr *ipv6_hdr = outer_l3_hdr;
-	struct udp_hdr *udp_hdr;
+	struct rte_udp_hdr *udp_hdr;
 	uint64_t ol_flags = 0;
 
 	if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPv4)) {
@@ -478,7 +478,7 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
 		return ol_flags;
 	}
 
-	udp_hdr = (struct udp_hdr *)((char *)outer_l3_hdr + info->outer_l3_len);
+	udp_hdr = (struct rte_udp_hdr *)((char *)outer_l3_hdr + info->outer_l3_len);
 
 	/* outer UDP checksum is done in software. In the other side, for
 	 * UDP tunneling, like VXLAN or Geneve, outer UDP checksum can be
@@ -776,9 +776,9 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 		/* check if it's a supported tunnel */
 		if (txp->parse_tunnel) {
 			if (info.l4_proto == IPPROTO_UDP) {
-				struct udp_hdr *udp_hdr;
+				struct rte_udp_hdr *udp_hdr;
 
-				udp_hdr = (struct udp_hdr *)((char *)l3_hdr +
+				udp_hdr = (struct rte_udp_hdr *)((char *)l3_hdr +
 					info.l3_len);
 				parse_vxlan_gpe(udp_hdr, &info);
 				if (info.is_tunnel) {
app/test-pmd/flowgen.c +2 -2
index 46fd6e41f..fd2c860fb 100644
@@ -121,7 +121,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 	struct rte_mbuf  *pkt;
 	struct rte_ether_hdr *eth_hdr;
 	struct rte_ipv4_hdr *ip_hdr;
-	struct udp_hdr *udp_hdr;
+	struct rte_udp_hdr *udp_hdr;
 	uint16_t vlan_tci, vlan_tci_outer;
 	uint64_t ol_flags = 0;
 	uint16_t nb_rx;
@@ -193,7 +193,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 						 sizeof(*ip_hdr));
 
 		/* Initialize UDP header. */
-		udp_hdr = (struct udp_hdr *)(ip_hdr + 1);
+		udp_hdr = (struct rte_udp_hdr *)(ip_hdr + 1);
 		udp_hdr->src_port	= rte_cpu_to_be_16(cfg_udp_src);
 		udp_hdr->dst_port	= rte_cpu_to_be_16(cfg_udp_dst);
 		udp_hdr->dgram_cksum	= 0; /* No UDP checksum. */
app/test-pmd/txonly.c +4 -4
index f7f023ff6..ed402e042 100644
@@ -53,7 +53,7 @@
 
 static struct rte_ipv4_hdr  pkt_ip_hdr;  /**< IP header of transmitted packets. */
 RTE_DEFINE_PER_LCORE(uint8_t, _ip_var); /**< IP address variation */
-static struct udp_hdr pkt_udp_hdr; /**< UDP header of transmitted packets. */
+static struct rte_udp_hdr pkt_udp_hdr; /**< UDP header of transmitted packets. */
 
 static void
 copy_buf_to_pkt_segs(void* buf, unsigned len, struct rte_mbuf *pkt,
@@ -94,7 +94,7 @@ copy_buf_to_pkt(void* buf, unsigned len, struct rte_mbuf *pkt, unsigned offset)
 
 static void
 setup_pkt_udp_ip_headers(struct rte_ipv4_hdr *ip_hdr,
-			 struct udp_hdr *udp_hdr,
+			 struct rte_udp_hdr *udp_hdr,
 			 uint16_t pkt_data_len)
 {
 	uint16_t *ptr16;
@@ -104,7 +104,7 @@ setup_pkt_udp_ip_headers(struct rte_ipv4_hdr *ip_hdr,
 	/*
 	 * Initialize UDP header.
 	 */
-	pkt_len = (uint16_t) (pkt_data_len + sizeof(struct udp_hdr));
+	pkt_len = (uint16_t) (pkt_data_len + sizeof(struct rte_udp_hdr));
 	udp_hdr->src_port = rte_cpu_to_be_16(UDP_SRC_PORT);
 	udp_hdr->dst_port = rte_cpu_to_be_16(UDP_DST_PORT);
 	udp_hdr->dgram_len      = RTE_CPU_TO_BE_16(pkt_len);
@@ -347,7 +347,7 @@ tx_only_begin(__attribute__((unused)) portid_t pi)
 
 	pkt_data_len = (uint16_t) (tx_pkt_length - (sizeof(struct rte_ether_hdr) +
 						    sizeof(struct rte_ipv4_hdr) +
-						    sizeof(struct udp_hdr)));
+						    sizeof(struct rte_udp_hdr)));
 	setup_pkt_udp_ip_headers(&pkt_ip_hdr, &pkt_udp_hdr, pkt_data_len);
 }
 
app/test-pmd/util.c +3 -3
index b8e5548ca..a1164b705 100644
@@ -105,7 +105,7 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 		if (is_encapsulation) {
 			struct rte_ipv4_hdr *ipv4_hdr;
 			struct rte_ipv6_hdr *ipv6_hdr;
-			struct udp_hdr *udp_hdr;
+			struct rte_udp_hdr *udp_hdr;
 			uint8_t l2_len;
 			uint8_t l3_len;
 			uint8_t l4_len;
@@ -130,9 +130,9 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 			}
 			if (l4_proto == IPPROTO_UDP) {
 				udp_hdr = rte_pktmbuf_mtod_offset(mb,
-				struct udp_hdr *,
+				struct rte_udp_hdr *,
 				l2_len + l3_len);
-				l4_len = sizeof(struct udp_hdr);
+				l4_len = sizeof(struct rte_udp_hdr);
 				vxlan_hdr = rte_pktmbuf_mtod_offset(mb,
 				struct rte_vxlan_hdr *,
 				l2_len + l3_len + l4_len);
app/test/packet_burst_generator.c +6 -6
index 5730f8129..305ed3d0d 100644
@@ -90,12 +90,12 @@ initialize_arp_header(struct rte_arp_hdr *arp_hdr, struct rte_ether_addr *src_ma
 }
 
 uint16_t
-initialize_udp_header(struct udp_hdr *udp_hdr, uint16_t src_port,
+initialize_udp_header(struct rte_udp_hdr *udp_hdr, uint16_t src_port,
 		uint16_t dst_port, uint16_t pkt_data_len)
 {
 	uint16_t pkt_len;
 
-	pkt_len = (uint16_t) (pkt_data_len + sizeof(struct udp_hdr));
+	pkt_len = (uint16_t) (pkt_data_len + sizeof(struct rte_udp_hdr));
 
 	udp_hdr->src_port = rte_cpu_to_be_16(src_port);
 	udp_hdr->dst_port = rte_cpu_to_be_16(dst_port);
@@ -126,7 +126,7 @@ initialize_sctp_header(struct rte_sctp_hdr *sctp_hdr, uint16_t src_port,
 {
 	uint16_t pkt_len;
 
-	pkt_len = (uint16_t) (pkt_data_len + sizeof(struct udp_hdr));
+	pkt_len = (uint16_t) (pkt_data_len + sizeof(struct rte_udp_hdr));
 
 	sctp_hdr->src_port = rte_cpu_to_be_16(src_port);
 	sctp_hdr->dst_port = rte_cpu_to_be_16(dst_port);
@@ -257,7 +257,7 @@ initialize_ipv4_header_proto(struct rte_ipv4_hdr *ip_hdr, uint32_t src_addr,
 int
 generate_packet_burst(struct rte_mempool *mp, struct rte_mbuf **pkts_burst,
 		struct rte_ether_hdr *eth_hdr, uint8_t vlan_enabled, void *ip_hdr,
-		uint8_t ipv4, struct udp_hdr *udp_hdr, int nb_pkt_per_burst,
+		uint8_t ipv4, struct rte_udp_hdr *udp_hdr, int nb_pkt_per_burst,
 		uint8_t pkt_len, uint8_t nb_pkt_segs)
 {
 	int i, nb_pkt = 0;
@@ -384,7 +384,7 @@ generate_packet_burst_proto(struct rte_mempool *mp,
 			switch (proto) {
 			case IPPROTO_UDP:
 				copy_buf_to_pkt(proto_hdr,
-					sizeof(struct udp_hdr), pkt,
+					sizeof(struct rte_udp_hdr), pkt,
 					eth_hdr_size + sizeof(struct rte_ipv4_hdr));
 				break;
 			case IPPROTO_TCP:
@@ -406,7 +406,7 @@ generate_packet_burst_proto(struct rte_mempool *mp,
 			switch (proto) {
 			case IPPROTO_UDP:
 				copy_buf_to_pkt(proto_hdr,
-					sizeof(struct udp_hdr), pkt,
+					sizeof(struct rte_udp_hdr), pkt,
 					eth_hdr_size + sizeof(struct rte_ipv6_hdr));
 				break;
 			case IPPROTO_TCP:
app/test/packet_burst_generator.h +2 -2
index 5cfe0c600..1ad444b2c 100644
@@ -34,7 +34,7 @@ initialize_arp_header(struct rte_arp_hdr *arp_hdr, struct rte_ether_addr *src_ma
 		uint32_t opcode);
 
 uint16_t
-initialize_udp_header(struct udp_hdr *udp_hdr, uint16_t src_port,
+initialize_udp_header(struct rte_udp_hdr *udp_hdr, uint16_t src_port,
 		uint16_t dst_port, uint16_t pkt_data_len);
 
 uint16_t
@@ -60,7 +60,7 @@ initialize_ipv4_header_proto(struct rte_ipv4_hdr *ip_hdr, uint32_t src_addr,
 int
 generate_packet_burst(struct rte_mempool *mp, struct rte_mbuf **pkts_burst,
 		struct rte_ether_hdr *eth_hdr, uint8_t vlan_enabled, void *ip_hdr,
-		uint8_t ipv4, struct udp_hdr *udp_hdr, int nb_pkt_per_burst,
+		uint8_t ipv4, struct rte_udp_hdr *udp_hdr, int nb_pkt_per_burst,
 		uint8_t pkt_len, uint8_t nb_pkt_segs);
 
 int
app/test/test_flow_classify.c +1 -1
index 1a79326b8..a9d32cd37 100644
@@ -491,7 +491,7 @@ init_ipv4_udp_traffic(struct rte_mempool *mp,
 {
 	struct rte_ether_hdr pkt_eth_hdr;
 	struct rte_ipv4_hdr pkt_ipv4_hdr;
-	struct udp_hdr pkt_udp_hdr;
+	struct rte_udp_hdr pkt_udp_hdr;
 	uint32_t src_addr = IPV4_ADDR(2, 2, 2, 3);
 	uint32_t dst_addr = IPV4_ADDR(2, 2, 2, 7);
 	uint16_t src_port = 32;
app/test/test_link_bonding.c +2 -2
index 924de81ae..7d3d19034 100644
@@ -80,13 +80,13 @@ struct link_bonding_unittest_params {
 	struct rte_ether_hdr *pkt_eth_hdr;
 	struct rte_ipv4_hdr *pkt_ipv4_hdr;
 	struct rte_ipv6_hdr *pkt_ipv6_hdr;
-	struct udp_hdr *pkt_udp_hdr;
+	struct rte_udp_hdr *pkt_udp_hdr;
 
 };
 
 static struct rte_ipv4_hdr pkt_ipv4_hdr;
 static struct rte_ipv6_hdr pkt_ipv6_hdr;
-static struct udp_hdr pkt_udp_hdr;
+static struct rte_udp_hdr pkt_udp_hdr;
 
 static struct link_bonding_unittest_params default_params  = {
 	.bonded_port_id = -1,
app/test/test_link_bonding_mode4.c +1 -1
index 4968cd91c..e3eab892c 100644
@@ -732,7 +732,7 @@ generate_packets(struct rte_ether_addr *src_mac,
 	uint32_t ip_dst[4] = { [0 ... 2] = 0xFEEDFACE, [3] = RTE_IPv4(192, 168, 0, 2) };
 
 	struct rte_ether_hdr pkt_eth_hdr;
-	struct udp_hdr pkt_udp_hdr;
+	struct rte_udp_hdr pkt_udp_hdr;
 	union {
 		struct rte_ipv4_hdr v4;
 		struct rte_ipv6_hdr v6;
app/test/test_pmd_perf.c +1 -1
index 0d1c1b1ab..5e2dad9ec 100644
@@ -184,7 +184,7 @@ init_traffic(struct rte_mempool *mp,
 {
 	struct rte_ether_hdr pkt_eth_hdr;
 	struct rte_ipv4_hdr pkt_ipv4_hdr;
-	struct udp_hdr pkt_udp_hdr;
+	struct rte_udp_hdr pkt_udp_hdr;
 	uint32_t pktlen;
 	static uint8_t src_mac[] = { 0x00, 0xFF, 0xAA, 0xFF, 0xAA, 0xFF };
 	static uint8_t dst_mac[] = { 0x00, 0xAA, 0xFF, 0xAA, 0xFF, 0xAA };
drivers/net/bonding/rte_eth_bond_pmd.c +3 -3
index d9a47159a..4386418d7 100644
@@ -835,7 +835,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
 	size_t vlan_offset;
 	int i;
 
-	struct udp_hdr *udp_hdr;
+	struct rte_udp_hdr *udp_hdr;
 	struct rte_tcp_hdr *tcp_hdr;
 	uint32_t hash, l3hash, l4hash;
 
@@ -867,7 +867,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
 					l4hash = HASH_L4_PORTS(tcp_hdr);
 				} else if (ipv4_hdr->next_proto_id ==
 								IPPROTO_UDP) {
-					udp_hdr = (struct udp_hdr *)
+					udp_hdr = (struct rte_udp_hdr *)
 						((char *)ipv4_hdr +
 							ip_hdr_offset);
 					l4hash = HASH_L4_PORTS(udp_hdr);
@@ -882,7 +882,7 @@ burst_xmit_l34_hash(struct rte_mbuf **buf, uint16_t nb_pkts,
 				tcp_hdr = (struct rte_tcp_hdr *)(ipv6_hdr + 1);
 				l4hash = HASH_L4_PORTS(tcp_hdr);
 			} else if (ipv6_hdr->proto == IPPROTO_UDP) {
-				udp_hdr = (struct udp_hdr *)(ipv6_hdr + 1);
+				udp_hdr = (struct rte_udp_hdr *)(ipv6_hdr + 1);
 				l4hash = HASH_L4_PORTS(udp_hdr);
 			}
 		}
drivers/net/dpaa/dpaa_rxtx.c +1 -1
index 3a3964330..89f29126a 100644
@@ -229,7 +229,7 @@ static inline void dpaa_checksum(struct rte_mbuf *mbuf)
 							       tcp_hdr);
 	} else if ((mbuf->packet_type & RTE_PTYPE_L4_MASK) ==
 		   RTE_PTYPE_L4_UDP) {
-		struct udp_hdr *udp_hdr = (struct udp_hdr *)(l3_hdr +
+		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))
drivers/net/e1000/em_rxtx.c +1 -1
index 427d434f4..690574acf 100644
@@ -244,7 +244,7 @@ em_set_xmit_ctx(struct em_tx_queue* txq,
 	switch (flags & PKT_TX_L4_MASK) {
 	case PKT_TX_UDP_CKSUM:
 		ctx.upper_setup.tcp_fields.tucso = (uint8_t)(ipcse +
-				offsetof(struct udp_hdr, dgram_cksum));
+				offsetof(struct rte_udp_hdr, dgram_cksum));
 		cmp_mask |= TX_MACIP_LEN_CMP_MASK;
 		break;
 	case PKT_TX_TCP_CKSUM:
drivers/net/e1000/igb_rxtx.c +1 -1
index e36e9e1f7..1910231b6 100644
@@ -289,7 +289,7 @@ igbe_set_xmit_ctx(struct igb_tx_queue* txq,
 		case PKT_TX_UDP_CKSUM:
 			type_tucmd_mlhl |= E1000_ADVTXD_TUCMD_L4T_UDP |
 				E1000_ADVTXD_DTYP_CTXT | E1000_ADVTXD_DCMD_DEXT;
-			mss_l4len_idx |= sizeof(struct udp_hdr) << E1000_ADVTXD_L4LEN_SHIFT;
+			mss_l4len_idx |= sizeof(struct rte_udp_hdr) << E1000_ADVTXD_L4LEN_SHIFT;
 			break;
 		case PKT_TX_TCP_CKSUM:
 			type_tucmd_mlhl |= E1000_ADVTXD_TUCMD_L4T_TCP |
drivers/net/enic/enic_clsf.c +4 -4
index 90494299a..7b68f0df1 100644
@@ -121,7 +121,7 @@ copy_fltr_v2(struct filter_v2 *fltr, const struct rte_eth_fdir_input *input,
 	memset(gp, 0, sizeof(*gp));
 
 	if (input->flow_type == RTE_ETH_FLOW_NONFRAG_IPV4_UDP) {
-		struct udp_hdr udp_mask, udp_val;
+		struct rte_udp_hdr udp_mask, udp_val;
 		memset(&udp_mask, 0, sizeof(udp_mask));
 		memset(&udp_val, 0, sizeof(udp_val));
 
@@ -135,7 +135,7 @@ copy_fltr_v2(struct filter_v2 *fltr, const struct rte_eth_fdir_input *input,
 		}
 
 		enic_set_layer(gp, FILTER_GENERIC_1_UDP, FILTER_GENERIC_1_L4,
-			       &udp_mask, &udp_val, sizeof(struct udp_hdr));
+			       &udp_mask, &udp_val, sizeof(struct rte_udp_hdr));
 	} else if (input->flow_type == RTE_ETH_FLOW_NONFRAG_IPV4_TCP) {
 		struct rte_tcp_hdr tcp_mask, tcp_val;
 		memset(&tcp_mask, 0, sizeof(tcp_mask));
@@ -217,7 +217,7 @@ copy_fltr_v2(struct filter_v2 *fltr, const struct rte_eth_fdir_input *input,
 	}
 
 	if (input->flow_type == RTE_ETH_FLOW_NONFRAG_IPV6_UDP) {
-		struct udp_hdr udp_mask, udp_val;
+		struct rte_udp_hdr udp_mask, udp_val;
 		memset(&udp_mask, 0, sizeof(udp_mask));
 		memset(&udp_val, 0, sizeof(udp_val));
 
@@ -230,7 +230,7 @@ copy_fltr_v2(struct filter_v2 *fltr, const struct rte_eth_fdir_input *input,
 			udp_val.dst_port = input->flow.udp6_flow.dst_port;
 		}
 		enic_set_layer(gp, FILTER_GENERIC_1_UDP, FILTER_GENERIC_1_L4,
-			       &udp_mask, &udp_val, sizeof(struct udp_hdr));
+			       &udp_mask, &udp_val, sizeof(struct rte_udp_hdr));
 	} else if (input->flow_type == RTE_ETH_FLOW_NONFRAG_IPV6_TCP) {
 		struct rte_tcp_hdr tcp_mask, tcp_val;
 		memset(&tcp_mask, 0, sizeof(tcp_mask));
drivers/net/enic/enic_flow.c +11 -11
index 76eba44a4..f7e18399a 100644
@@ -448,7 +448,7 @@ enic_copy_item_udp_v1(struct copy_item_args *arg)
 	const struct rte_flow_item_udp *spec = item->spec;
 	const struct rte_flow_item_udp *mask = item->mask;
 	struct filter_ipv4_5tuple *enic_5tup = &enic_filter->u.ipv4;
-	struct udp_hdr supported_mask = {
+	struct rte_udp_hdr supported_mask = {
 		.src_port = 0xffff,
 		.dst_port = 0xffff,
 	};
@@ -638,7 +638,7 @@ enic_copy_item_inner_udp_v2(struct copy_item_args *arg)
 		mask = &rte_flow_item_udp_mask;
 	/* Append udp header to L5 and set ip proto = udp */
 	return copy_inner_common(&arg->filter->u.generic_1, off,
-		arg->item->spec, mask, sizeof(struct udp_hdr),
+		arg->item->spec, mask, sizeof(struct rte_udp_hdr),
 		arg->l3_proto_off, IPPROTO_UDP, 1);
 }
 
@@ -816,9 +816,9 @@ enic_copy_item_udp_v2(struct copy_item_args *arg)
 		mask = &rte_flow_item_udp_mask;
 
 	memcpy(gp->layer[FILTER_GENERIC_1_L4].mask, &mask->hdr,
-	       sizeof(struct udp_hdr));
+	       sizeof(struct rte_udp_hdr));
 	memcpy(gp->layer[FILTER_GENERIC_1_L4].val, &spec->hdr,
-	       sizeof(struct udp_hdr));
+	       sizeof(struct rte_udp_hdr));
 	return 0;
 }
 
@@ -910,7 +910,7 @@ enic_copy_item_vxlan_v2(struct copy_item_args *arg)
 	const struct rte_flow_item_vxlan *spec = item->spec;
 	const struct rte_flow_item_vxlan *mask = item->mask;
 	struct filter_generic_1 *gp = &enic_filter->u.generic_1;
-	struct udp_hdr *udp;
+	struct rte_udp_hdr *udp;
 
 	FLOW_TRACE();
 
@@ -920,9 +920,9 @@ enic_copy_item_vxlan_v2(struct copy_item_args *arg)
 	 */
 	gp->mask_flags |= FILTER_GENERIC_1_UDP;
 	gp->val_flags |= FILTER_GENERIC_1_UDP;
-	udp = (struct udp_hdr *)gp->layer[FILTER_GENERIC_1_L4].mask;
+	udp = (struct rte_udp_hdr *)gp->layer[FILTER_GENERIC_1_L4].mask;
 	udp->dst_port = 0xffff;
-	udp = (struct udp_hdr *)gp->layer[FILTER_GENERIC_1_L4].val;
+	udp = (struct rte_udp_hdr *)gp->layer[FILTER_GENERIC_1_L4].val;
 	udp->dst_port = RTE_BE16(4789);
 	/* Match all if no spec */
 	if (!spec)
@@ -980,9 +980,9 @@ enic_copy_item_raw_v2(struct copy_item_args *arg)
 	 */
 	if (mask->length != 0 && mask->length < spec->length)
 		return EINVAL;
-	memcpy(gp->layer[FILTER_GENERIC_1_L4].mask + sizeof(struct udp_hdr),
+	memcpy(gp->layer[FILTER_GENERIC_1_L4].mask + sizeof(struct rte_udp_hdr),
 	       mask->pattern, spec->length);
-	memcpy(gp->layer[FILTER_GENERIC_1_L4].val + sizeof(struct udp_hdr),
+	memcpy(gp->layer[FILTER_GENERIC_1_L4].val + sizeof(struct rte_udp_hdr),
 	       spec->pattern, spec->length);
 
 	return 0;
@@ -1036,9 +1036,9 @@ fixup_l5_layer(struct enic *enic, struct filter_generic_1 *gp,
 		return;
 	FLOW_TRACE();
 	vxlan = sizeof(struct rte_vxlan_hdr);
-	memcpy(gp->layer[FILTER_GENERIC_1_L4].mask + sizeof(struct udp_hdr),
+	memcpy(gp->layer[FILTER_GENERIC_1_L4].mask + sizeof(struct rte_udp_hdr),
 	       gp->layer[FILTER_GENERIC_1_L5].mask, vxlan);
-	memcpy(gp->layer[FILTER_GENERIC_1_L4].val + sizeof(struct udp_hdr),
+	memcpy(gp->layer[FILTER_GENERIC_1_L4].val + sizeof(struct rte_udp_hdr),
 	       gp->layer[FILTER_GENERIC_1_L5].val, vxlan);
 	inner = inner_ofst - vxlan;
 	memset(layer, 0, sizeof(layer));
drivers/net/i40e/i40e_fdir.c +12 -12
index 46dfa79b7..40f25febf 100644
@@ -799,7 +799,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,
 			     unsigned char *raw_pkt)
 {
 	unsigned char *payload, *ptr;
-	struct udp_hdr *udp;
+	struct rte_udp_hdr *udp;
 	struct rte_tcp_hdr *tcp;
 	struct rte_sctp_hdr *sctp;
 	uint8_t size, dst = 0;
@@ -815,8 +815,8 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,
 	/* fill the L4 head */
 	switch (fdir_input->flow_type) {
 	case RTE_ETH_FLOW_NONFRAG_IPV4_UDP:
-		udp = (struct udp_hdr *)(raw_pkt + len);
-		payload = (unsigned char *)udp + sizeof(struct udp_hdr);
+		udp = (struct rte_udp_hdr *)(raw_pkt + len);
+		payload = (unsigned char *)udp + sizeof(struct rte_udp_hdr);
 		/*
 		 * The source and destination fields in the transmitted packet
 		 * need to be presented in a reversed order with respect
@@ -860,8 +860,8 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,
 		break;
 
 	case RTE_ETH_FLOW_NONFRAG_IPV6_UDP:
-		udp = (struct udp_hdr *)(raw_pkt + len);
-		payload = (unsigned char *)udp + sizeof(struct udp_hdr);
+		udp = (struct rte_udp_hdr *)(raw_pkt + len);
+		payload = (unsigned char *)udp + sizeof(struct rte_udp_hdr);
 		/*
 		 * The source and destination fields in the transmitted packet
 		 * need to be presented in a reversed order with respect
@@ -1089,7 +1089,7 @@ i40e_flow_fdir_construct_pkt(struct i40e_pf *pf,
 {
 	unsigned char *payload = NULL;
 	unsigned char *ptr;
-	struct udp_hdr *udp;
+	struct rte_udp_hdr *udp;
 	struct rte_tcp_hdr *tcp;
 	struct rte_sctp_hdr *sctp;
 	struct rte_flow_item_gtp *gtp;
@@ -1116,8 +1116,8 @@ i40e_flow_fdir_construct_pkt(struct i40e_pf *pf,
 
 	/* fill the L4 head */
 	if (pctype == I40E_FILTER_PCTYPE_NONF_IPV4_UDP) {
-		udp = (struct udp_hdr *)(raw_pkt + len);
-		payload = (unsigned char *)udp + sizeof(struct udp_hdr);
+		udp = (struct rte_udp_hdr *)(raw_pkt + len);
+		payload = (unsigned char *)udp + sizeof(struct rte_udp_hdr);
 		/**
 		 * The source and destination fields in the transmitted packet
 		 * need to be presented in a reversed order with respect
@@ -1153,8 +1153,8 @@ i40e_flow_fdir_construct_pkt(struct i40e_pf *pf,
 		payload = raw_pkt + len;
 		set_idx = I40E_FLXPLD_L3_IDX;
 	} else if (pctype == I40E_FILTER_PCTYPE_NONF_IPV6_UDP) {
-		udp = (struct udp_hdr *)(raw_pkt + len);
-		payload = (unsigned char *)udp + sizeof(struct udp_hdr);
+		udp = (struct rte_udp_hdr *)(raw_pkt + len);
+		payload = (unsigned char *)udp + sizeof(struct rte_udp_hdr);
 		/**
 		 * The source and destination fields in the transmitted packet
 		 * need to be presented in a reversed order with respect
@@ -1206,12 +1206,12 @@ i40e_flow_fdir_construct_pkt(struct i40e_pf *pf,
 		    cus_pctype->index == I40E_CUSTOMIZED_GTPU_IPV4 ||
 		    cus_pctype->index == I40E_CUSTOMIZED_GTPU_IPV6 ||
 		    cus_pctype->index == I40E_CUSTOMIZED_GTPU) {
-			udp = (struct udp_hdr *)(raw_pkt + len);
+			udp = (struct rte_udp_hdr *)(raw_pkt + len);
 			udp->dgram_len =
 				rte_cpu_to_be_16(I40E_FDIR_UDP_DEFAULT_LEN);
 
 			gtp = (struct rte_flow_item_gtp *)
-				((unsigned char *)udp + sizeof(struct udp_hdr));
+				((unsigned char *)udp + sizeof(struct rte_udp_hdr));
 			gtp->msg_len =
 				rte_cpu_to_be_16(I40E_FDIR_GTP_DEFAULT_LEN);
 			gtp->teid = fdir_input->flow.gtp_flow.teid;
drivers/net/i40e/i40e_rxtx.c +1 -1
index 6b8e586e5..a244ae65c 100644
@@ -312,7 +312,7 @@ i40e_txd_enable_checksum(uint64_t ol_flags,
 		break;
 	case PKT_TX_UDP_CKSUM:
 		*td_cmd |= I40E_TX_DESC_CMD_L4T_EOFT_UDP;
-		*td_offset |= (sizeof(struct udp_hdr) >> 2) <<
+		*td_offset |= (sizeof(struct rte_udp_hdr) >> 2) <<
 				I40E_TX_DESC_LENGTH_L4_FC_LEN_SHIFT;
 		break;
 	default:
drivers/net/iavf/iavf_rxtx.c +1 -1
index 9c733a596..ad897f2ca 100644
@@ -1427,7 +1427,7 @@ iavf_txd_enable_checksum(uint64_t ol_flags,
 		break;
 	case PKT_TX_UDP_CKSUM:
 		*td_cmd |= IAVF_TX_DESC_CMD_L4T_EOFT_UDP;
-		*td_offset |= (sizeof(struct udp_hdr) >> 2) <<
+		*td_offset |= (sizeof(struct rte_udp_hdr) >> 2) <<
 			      IAVF_TX_DESC_LENGTH_L4_FC_LEN_SHIFT;
 		break;
 	default:
drivers/net/ice/ice_rxtx.c +1 -1
index 0862ab0cc..4a2ac954c 100644
@@ -1771,7 +1771,7 @@ ice_txd_enable_checksum(uint64_t ol_flags,
 		break;
 	case PKT_TX_UDP_CKSUM:
 		*td_cmd |= ICE_TX_DESC_CMD_L4T_EOFT_UDP;
-		*td_offset |= (sizeof(struct udp_hdr) >> 2) <<
+		*td_offset |= (sizeof(struct rte_udp_hdr) >> 2) <<
 			      ICE_TX_DESC_LEN_L4_LEN_S;
 		break;
 	default:
drivers/net/ixgbe/ixgbe_rxtx.c +1 -1
index c720a6db9..58966863a 100644
@@ -422,7 +422,7 @@ ixgbe_set_xmit_ctx(struct ixgbe_tx_queue *txq,
 		case PKT_TX_UDP_CKSUM:
 			type_tucmd_mlhl |= IXGBE_ADVTXD_TUCMD_L4T_UDP |
 				IXGBE_ADVTXD_DTYP_CTXT | IXGBE_ADVTXD_DCMD_DEXT;
-			mss_l4len_idx |= sizeof(struct udp_hdr) << IXGBE_ADVTXD_L4LEN_SHIFT;
+			mss_l4len_idx |= sizeof(struct rte_udp_hdr) << IXGBE_ADVTXD_L4LEN_SHIFT;
 			tx_offload_mask.l2_len |= ~0;
 			tx_offload_mask.l3_len |= ~0;
 			break;
drivers/net/mlx5/mlx5_flow.c +4 -4
index a1e90ea2d..307cc363f 100644
@@ -2592,11 +2592,11 @@ flow_fdir_filter_convert(struct rte_eth_dev *dev,
 	/* Handle L4. */
 	switch (fdir_filter->input.flow_type) {
 	case RTE_ETH_FLOW_NONFRAG_IPV4_UDP:
-		attributes->l4.udp.hdr = (struct udp_hdr){
+		attributes->l4.udp.hdr = (struct rte_udp_hdr){
 			.src_port = input->flow.udp4_flow.src_port,
 			.dst_port = input->flow.udp4_flow.dst_port,
 		};
-		attributes->l4_mask.udp.hdr = (struct udp_hdr){
+		attributes->l4_mask.udp.hdr = (struct rte_udp_hdr){
 			.src_port = mask->src_port_mask,
 			.dst_port = mask->dst_port_mask,
 		};
@@ -2622,11 +2622,11 @@ flow_fdir_filter_convert(struct rte_eth_dev *dev,
 		};
 		break;
 	case RTE_ETH_FLOW_NONFRAG_IPV6_UDP:
-		attributes->l4.udp.hdr = (struct udp_hdr){
+		attributes->l4.udp.hdr = (struct rte_udp_hdr){
 			.src_port = input->flow.udp6_flow.src_port,
 			.dst_port = input->flow.udp6_flow.dst_port,
 		};
-		attributes->l4_mask.udp.hdr = (struct udp_hdr){
+		attributes->l4_mask.udp.hdr = (struct rte_udp_hdr){
 			.src_port = mask->src_port_mask,
 			.dst_port = mask->dst_port_mask,
 		};
drivers/net/mlx5/mlx5_flow_dv.c +2 -2
index d2a725469..bb3b1f68a 100644
@@ -1054,7 +1054,7 @@ flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
 	struct rte_vlan_hdr *vlan = NULL;
 	struct rte_ipv4_hdr *ipv4 = NULL;
 	struct rte_ipv6_hdr *ipv6 = NULL;
-	struct udp_hdr *udp = NULL;
+	struct rte_udp_hdr *udp = NULL;
 	struct rte_vxlan_hdr *vxlan = NULL;
 	struct rte_vxlan_gpe_hdr *vxlan_gpe = NULL;
 	struct rte_gre_hdr *gre = NULL;
@@ -1125,7 +1125,7 @@ flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
 				ipv6->hop_limits = MLX5_ENCAP_IPV6_HOP_LIMIT;
 			break;
 		case RTE_FLOW_ITEM_TYPE_UDP:
-			udp = (struct udp_hdr *)&buf[temp_size];
+			udp = (struct rte_udp_hdr *)&buf[temp_size];
 			if (!ipv4 && !ipv6)
 				return rte_flow_error_set(error, EINVAL,
 						RTE_FLOW_ERROR_TYPE_ACTION,
drivers/net/qede/qede_filter.c +7 -7
index cd762cddb..33eb9fc39 100644
@@ -459,7 +459,7 @@ qede_arfs_construct_pkt(struct rte_eth_dev *eth_dev,
 	uint8_t *raw_pkt;
 	struct rte_ipv4_hdr *ip;
 	struct rte_ipv6_hdr *ip6;
-	struct udp_hdr *udp;
+	struct rte_udp_hdr *udp;
 	struct rte_tcp_hdr *tcp;
 	uint16_t len;
 
@@ -487,13 +487,13 @@ qede_arfs_construct_pkt(struct rte_eth_dev *eth_dev,
 		raw_pkt = (uint8_t *)buff;
 		/* UDP */
 		if (arfs->tuple.ip_proto == IPPROTO_UDP) {
-			udp = (struct udp_hdr *)(raw_pkt + len);
+			udp = (struct rte_udp_hdr *)(raw_pkt + len);
 			udp->dst_port = arfs->tuple.dst_port;
 			udp->src_port = arfs->tuple.src_port;
-			udp->dgram_len = sizeof(struct udp_hdr);
-			len += sizeof(struct udp_hdr);
+			udp->dgram_len = sizeof(struct rte_udp_hdr);
+			len += sizeof(struct rte_udp_hdr);
 			/* adjust ip total_length */
-			ip->total_length += sizeof(struct udp_hdr);
+			ip->total_length += sizeof(struct rte_udp_hdr);
 			params->udp = true;
 		} else { /* TCP */
 			tcp = (struct rte_tcp_hdr *)(raw_pkt + len);
@@ -522,10 +522,10 @@ qede_arfs_construct_pkt(struct rte_eth_dev *eth_dev,
 		raw_pkt = (uint8_t *)buff;
 		/* UDP */
 		if (arfs->tuple.ip_proto == IPPROTO_UDP) {
-			udp = (struct udp_hdr *)(raw_pkt + len);
+			udp = (struct rte_udp_hdr *)(raw_pkt + len);
 			udp->src_port = arfs->tuple.src_port;
 			udp->dst_port = arfs->tuple.dst_port;
-			len += sizeof(struct udp_hdr);
+			len += sizeof(struct rte_udp_hdr);
 			params->udp = true;
 		} else { /* TCP */
 			tcp = (struct rte_tcp_hdr *)(raw_pkt + len);
drivers/net/tap/rte_eth_tap.c +1 -1
index a6d3baa5f..266fe96bf 100644
@@ -508,7 +508,7 @@ tap_tx_l3_cksum(char *packet, uint64_t ol_flags, unsigned int l2_len,
 
 		l4_hdr = packet + l2_len + l3_len;
 		if ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_UDP_CKSUM)
-			*l4_cksum = &((struct udp_hdr *)l4_hdr)->dgram_cksum;
+			*l4_cksum = &((struct rte_udp_hdr *)l4_hdr)->dgram_cksum;
 		else if ((ol_flags & PKT_TX_L4_MASK) == PKT_TX_TCP_CKSUM)
 			*l4_cksum = &((struct rte_tcp_hdr *)l4_hdr)->cksum;
 		else
drivers/net/virtio/virtio_rxtx.c +1 -1
index 6c3f21bfb..7ddf8fb0f 100644
@@ -538,7 +538,7 @@ virtqueue_xmit_offload(struct virtio_net_hdr *hdr,
 		switch (cookie->ol_flags & PKT_TX_L4_MASK) {
 		case PKT_TX_UDP_CKSUM:
 			hdr->csum_start = cookie->l2_len + cookie->l3_len;
-			hdr->csum_offset = offsetof(struct udp_hdr,
+			hdr->csum_offset = offsetof(struct rte_udp_hdr,
 				dgram_cksum);
 			hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
 			break;
drivers/net/vmxnet3/vmxnet3_rxtx.c +1 -1
index 550cd8738..f5534344f 100644
@@ -544,7 +544,7 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 				gdesc->txd.msscof = gdesc->txd.hlen + offsetof(struct rte_tcp_hdr, cksum);
 				break;
 			case PKT_TX_UDP_CKSUM:
-				gdesc->txd.msscof = gdesc->txd.hlen + offsetof(struct udp_hdr, dgram_cksum);
+				gdesc->txd.msscof = gdesc->txd.hlen + offsetof(struct rte_udp_hdr, dgram_cksum);
 				break;
 			default:
 				PMD_TX_LOG(WARNING, "requested cksum offload not supported %#llx",
examples/l3fwd-power/main.c +4 -4
index cd43b37dc..c8f975491 100644
@@ -528,7 +528,7 @@ get_ipv4_dst_port(struct rte_ipv4_hdr *ipv4_hdr, uint16_t portid,
 {
 	struct ipv4_5tuple key;
 	struct rte_tcp_hdr *tcp;
-	struct udp_hdr *udp;
+	struct rte_udp_hdr *udp;
 	int ret = 0;
 
 	key.ip_dst = rte_be_to_cpu_32(ipv4_hdr->dst_addr);
@@ -544,7 +544,7 @@ get_ipv4_dst_port(struct rte_ipv4_hdr *ipv4_hdr, uint16_t portid,
 		break;
 
 	case IPPROTO_UDP:
-		udp = (struct udp_hdr *)((unsigned char *)ipv4_hdr +
+		udp = (struct rte_udp_hdr *)((unsigned char *)ipv4_hdr +
 					sizeof(struct rte_ipv4_hdr));
 		key.port_dst = rte_be_to_cpu_16(udp->dst_port);
 		key.port_src = rte_be_to_cpu_16(udp->src_port);
@@ -567,7 +567,7 @@ get_ipv6_dst_port(struct rte_ipv6_hdr *ipv6_hdr, uint16_t portid,
 {
 	struct ipv6_5tuple key;
 	struct rte_tcp_hdr *tcp;
-	struct udp_hdr *udp;
+	struct rte_udp_hdr *udp;
 	int ret = 0;
 
 	memcpy(key.ip_dst, ipv6_hdr->dst_addr, IPV6_ADDR_LEN);
@@ -584,7 +584,7 @@ get_ipv6_dst_port(struct rte_ipv6_hdr *ipv6_hdr, uint16_t portid,
 		break;
 
 	case IPPROTO_UDP:
-		udp = (struct udp_hdr *)((unsigned char *) ipv6_hdr +
+		udp = (struct rte_udp_hdr *)((unsigned char *) ipv6_hdr +
 					sizeof(struct rte_ipv6_hdr));
 		key.port_dst = rte_be_to_cpu_16(udp->dst_port);
 		key.port_src = rte_be_to_cpu_16(udp->src_port);
examples/l3fwd-vf/main.c +2 -2
index d57ac262b..0ef469c29 100644
@@ -367,7 +367,7 @@ get_dst_port(struct rte_ipv4_hdr *ipv4_hdr, uint16_t portid,
 {
 	struct ipv4_5tuple key;
 	struct rte_tcp_hdr *tcp;
-	struct udp_hdr *udp;
+	struct rte_udp_hdr *udp;
 	int ret = 0;
 
 	key.ip_dst = rte_be_to_cpu_32(ipv4_hdr->dst_addr);
@@ -383,7 +383,7 @@ get_dst_port(struct rte_ipv4_hdr *ipv4_hdr, uint16_t portid,
 		break;
 
 	case IPPROTO_UDP:
-		udp = (struct udp_hdr *)((unsigned char *) ipv4_hdr +
+		udp = (struct rte_udp_hdr *)((unsigned char *) ipv4_hdr +
 					sizeof(struct rte_ipv4_hdr));
 		key.port_dst = rte_be_to_cpu_16(udp->dst_port);
 		key.port_src = rte_be_to_cpu_16(udp->src_port);
examples/tep_termination/vxlan.c +8 -8
index 261332adf..166cd8a31 100644
@@ -75,7 +75,7 @@ process_inner_cksums(struct rte_ether_hdr *eth_hdr, union tunnel_offload_info *i
 	uint16_t ethertype;
 	struct rte_ipv4_hdr *ipv4_hdr;
 	struct rte_ipv6_hdr *ipv6_hdr;
-	struct udp_hdr *udp_hdr;
+	struct rte_udp_hdr *udp_hdr;
 	struct rte_tcp_hdr *tcp_hdr;
 	struct rte_sctp_hdr *sctp_hdr;
 	uint64_t ol_flags = 0;
@@ -107,7 +107,7 @@ process_inner_cksums(struct rte_ether_hdr *eth_hdr, union tunnel_offload_info *i
 		return 0; /* packet type not supported, nothing to do */
 
 	if (l4_proto == IPPROTO_UDP) {
-		udp_hdr = (struct udp_hdr *)((char *)l3_hdr + info->l3_len);
+		udp_hdr = (struct rte_udp_hdr *)((char *)l3_hdr + info->l3_len);
 		ol_flags |= PKT_TX_UDP_CKSUM;
 		udp_hdr->dgram_cksum = get_psd_sum(l3_hdr,
 				ethertype, ol_flags);
@@ -139,7 +139,7 @@ decapsulation(struct rte_mbuf *pkt)
 {
 	uint8_t l4_proto = 0;
 	uint16_t outer_header_len;
-	struct udp_hdr *udp_hdr;
+	struct rte_udp_hdr *udp_hdr;
 	union tunnel_offload_info info = { .data = 0 };
 	struct rte_ether_hdr *phdr = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
 
@@ -148,7 +148,7 @@ decapsulation(struct rte_mbuf *pkt)
 	if (l4_proto != IPPROTO_UDP)
 		return -1;
 
-	udp_hdr = (struct udp_hdr *)((char *)phdr +
+	udp_hdr = (struct rte_udp_hdr *)((char *)phdr +
 		info.outer_l2_len + info.outer_l3_len);
 
 	/** check udp destination port, 4789 is the default vxlan port
@@ -158,7 +158,7 @@ decapsulation(struct rte_mbuf *pkt)
 		(pkt->packet_type & RTE_PTYPE_TUNNEL_MASK) == 0)
 		return -1;
 	outer_header_len = info.outer_l2_len + info.outer_l3_len
-		+ sizeof(struct udp_hdr) + sizeof(struct rte_vxlan_hdr);
+		+ sizeof(struct rte_udp_hdr) + sizeof(struct rte_vxlan_hdr);
 
 	rte_pktmbuf_adj(pkt, outer_header_len);
 
@@ -177,10 +177,10 @@ encapsulation(struct rte_mbuf *m, uint8_t queue_id)
 	/*Allocate space for new ethernet, IPv4, UDP and VXLAN headers*/
 	struct rte_ether_hdr *pneth = (struct rte_ether_hdr *) rte_pktmbuf_prepend(m,
 		sizeof(struct rte_ether_hdr) + sizeof(struct rte_ipv4_hdr)
-		+ sizeof(struct udp_hdr) + sizeof(struct rte_vxlan_hdr));
+		+ sizeof(struct rte_udp_hdr) + sizeof(struct rte_vxlan_hdr));
 
 	struct rte_ipv4_hdr *ip = (struct rte_ipv4_hdr *) &pneth[1];
-	struct udp_hdr *udp = (struct udp_hdr *) &ip[1];
+	struct rte_udp_hdr *udp = (struct rte_udp_hdr *) &ip[1];
 	struct rte_vxlan_hdr *vxlan = (struct rte_vxlan_hdr *) &udp[1];
 
 	/* convert TX queue ID to vport ID */
@@ -224,7 +224,7 @@ encapsulation(struct rte_mbuf *m, uint8_t queue_id)
 	/*UDP HEADER*/
 	udp->dgram_cksum = 0;
 	udp->dgram_len = rte_cpu_to_be_16(old_len
-				+ sizeof(struct udp_hdr)
+				+ sizeof(struct rte_udp_hdr)
 				+ sizeof(struct rte_vxlan_hdr));
 
 	udp->dst_port = rte_cpu_to_be_16(vxdev.dst_port);
lib/librte_ethdev/rte_flow.h +1 -1
index fcf444ffd..9838792fd 100644
@@ -693,7 +693,7 @@ static const struct rte_flow_item_icmp rte_flow_item_icmp_mask = {
  * Matches a UDP header.
  */
 struct rte_flow_item_udp {
-	struct udp_hdr hdr; /**< UDP header definition. */
+	struct rte_udp_hdr hdr; /**< UDP header definition. */
 };
 
 /** Default mask for RTE_FLOW_ITEM_TYPE_UDP. */
lib/librte_gro/gro_vxlan_tcp4.c +5 -5
index e8adb310b..a081b5b39 100644
@@ -263,7 +263,7 @@ static inline void
 update_vxlan_header(struct gro_vxlan_tcp4_item *item)
 {
 	struct rte_ipv4_hdr *ipv4_hdr;
-	struct udp_hdr *udp_hdr;
+	struct rte_udp_hdr *udp_hdr;
 	struct rte_mbuf *pkt = item->inner_item.firstseg;
 	uint16_t len;
 
@@ -275,7 +275,7 @@ update_vxlan_header(struct gro_vxlan_tcp4_item *item)
 
 	/* Update the outer UDP header. */
 	len -= pkt->outer_l3_len;
-	udp_hdr = (struct udp_hdr *)((char *)ipv4_hdr + pkt->outer_l3_len);
+	udp_hdr = (struct rte_udp_hdr *)((char *)ipv4_hdr + pkt->outer_l3_len);
 	udp_hdr->dgram_len = rte_cpu_to_be_16(len);
 
 	/* Update the inner IPv4 header. */
@@ -292,7 +292,7 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt,
 	struct rte_ether_hdr *outer_eth_hdr, *eth_hdr;
 	struct rte_ipv4_hdr *outer_ipv4_hdr, *ipv4_hdr;
 	struct rte_tcp_hdr *tcp_hdr;
-	struct udp_hdr *udp_hdr;
+	struct rte_udp_hdr *udp_hdr;
 	struct rte_vxlan_hdr *vxlan_hdr;
 	uint32_t sent_seq;
 	int32_t tcp_dl;
@@ -316,10 +316,10 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt,
 	outer_eth_hdr = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
 	outer_ipv4_hdr = (struct rte_ipv4_hdr *)((char *)outer_eth_hdr +
 			pkt->outer_l2_len);
-	udp_hdr = (struct udp_hdr *)((char *)outer_ipv4_hdr +
+	udp_hdr = (struct rte_udp_hdr *)((char *)outer_ipv4_hdr +
 			pkt->outer_l3_len);
 	vxlan_hdr = (struct rte_vxlan_hdr *)((char *)udp_hdr +
-			sizeof(struct udp_hdr));
+			sizeof(struct rte_udp_hdr));
 	eth_hdr = (struct rte_ether_hdr *)((char *)vxlan_hdr +
 			sizeof(struct rte_vxlan_hdr));
 	ipv4_hdr = (struct rte_ipv4_hdr *)((char *)udp_hdr + pkt->l2_len);
lib/librte_gso/gso_common.h +2 -2
index 3edd2429b..a0b83436d 100644
@@ -46,9 +46,9 @@
 static inline void
 update_udp_header(struct rte_mbuf *pkt, uint16_t udp_offset)
 {
-	struct udp_hdr *udp_hdr;
+	struct rte_udp_hdr *udp_hdr;
 
-	udp_hdr = (struct udp_hdr *)(rte_pktmbuf_mtod(pkt, char *) +
+	udp_hdr = (struct rte_udp_hdr *)(rte_pktmbuf_mtod(pkt, char *) +
 			udp_offset);
 	udp_hdr->dgram_len = rte_cpu_to_be_16(pkt->pkt_len - udp_offset);
 }
lib/librte_gso/rte_gso.h +1 -1
index 8f65adf1c..3aab297f4 100644
@@ -23,7 +23,7 @@ extern "C" {
 
 /* Minimum GSO segment size for UDP based packets. */
 #define RTE_GSO_UDP_SEG_SIZE_MIN (sizeof(struct rte_ether_hdr) + \
-		sizeof(struct rte_ipv4_hdr) + sizeof(struct udp_hdr) + 1)
+		sizeof(struct rte_ipv4_hdr) + sizeof(struct rte_udp_hdr) + 1)
 
 /* GSO flags for rte_gso_ctx. */
 #define RTE_GSO_FLAG_IPID_FIXED (1ULL << 0)
lib/librte_net/rte_ether.h +2 -2
index b8b545f37..d692f3dba 100644
@@ -311,7 +311,7 @@ struct rte_vxlan_hdr {
 #define RTE_ETHER_TYPE_MPLS 0x8847 /**< MPLS ethertype. */
 #define RTE_ETHER_TYPE_MPLSM 0x8848 /**< MPLS multicast ethertype. */
 
-#define RTE_ETHER_VXLAN_HLEN (sizeof(struct udp_hdr) + sizeof(struct rte_vxlan_hdr))
+#define RTE_ETHER_VXLAN_HLEN (sizeof(struct rte_udp_hdr) + sizeof(struct rte_vxlan_hdr))
 /**< VXLAN tunnel header length. */
 
 /**
@@ -335,7 +335,7 @@ struct rte_vxlan_gpe_hdr {
 #define RTE_VXLAN_GPE_TYPE_GBP  6 /**< GBP Protocol. */
 #define RTE_VXLAN_GPE_TYPE_VBNG 7 /**< vBNG Protocol. */
 
-#define RTE_ETHER_VXLAN_GPE_HLEN (sizeof(struct udp_hdr) + \
+#define RTE_ETHER_VXLAN_GPE_HLEN (sizeof(struct rte_udp_hdr) + \
 			      sizeof(struct rte_vxlan_gpe_hdr))
 /**< VXLAN-GPE tunnel header length. */
 
lib/librte_net/rte_net.c +2 -2
index 268892cc9..e1868f7da 100644
@@ -357,7 +357,7 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
 	}
 
 	if ((pkt_type & RTE_PTYPE_L4_MASK) == RTE_PTYPE_L4_UDP) {
-		hdr_lens->l4_len = sizeof(struct udp_hdr);
+		hdr_lens->l4_len = sizeof(struct rte_udp_hdr);
 		return pkt_type;
 	} else if ((pkt_type & RTE_PTYPE_L4_MASK) == RTE_PTYPE_L4_TCP) {
 		const struct rte_tcp_hdr *th;
@@ -493,7 +493,7 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m,
 	}
 
 	if ((pkt_type & RTE_PTYPE_INNER_L4_MASK) == RTE_PTYPE_INNER_L4_UDP) {
-		hdr_lens->inner_l4_len = sizeof(struct udp_hdr);
+		hdr_lens->inner_l4_len = sizeof(struct rte_udp_hdr);
 	} else if ((pkt_type & RTE_PTYPE_INNER_L4_MASK) ==
 			RTE_PTYPE_INNER_L4_TCP) {
 		const struct rte_tcp_hdr *th;
lib/librte_net/rte_net.h +3 -3
index 57b5ce363..e7c4f676e 100644
@@ -115,7 +115,7 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
 	struct rte_ipv4_hdr *ipv4_hdr;
 	struct rte_ipv6_hdr *ipv6_hdr;
 	struct rte_tcp_hdr *tcp_hdr;
-	struct udp_hdr *udp_hdr;
+	struct rte_udp_hdr *udp_hdr;
 	uint64_t inner_l3_offset = m->l2_len;
 
 #ifdef RTE_LIBRTE_ETHDEV_DEBUG
@@ -153,7 +153,7 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
 
 	if ((ol_flags & PKT_TX_UDP_CKSUM) == PKT_TX_UDP_CKSUM) {
 		if (ol_flags & PKT_TX_IPV4) {
-			udp_hdr = (struct udp_hdr *)((char *)ipv4_hdr +
+			udp_hdr = (struct rte_udp_hdr *)((char *)ipv4_hdr +
 					m->l3_len);
 			udp_hdr->dgram_cksum = rte_ipv4_phdr_cksum(ipv4_hdr,
 					ol_flags);
@@ -161,7 +161,7 @@ rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)
 			ipv6_hdr = rte_pktmbuf_mtod_offset(m, struct rte_ipv6_hdr *,
 					inner_l3_offset);
 			/* non-TSO udp */
-			udp_hdr = rte_pktmbuf_mtod_offset(m, struct udp_hdr *,
+			udp_hdr = rte_pktmbuf_mtod_offset(m, struct rte_udp_hdr *,
 					inner_l3_offset + m->l3_len);
 			udp_hdr->dgram_cksum = rte_ipv6_phdr_cksum(ipv6_hdr,
 					ol_flags);
lib/librte_net/rte_udp.h +1 -1
index ba033955c..1c3437c5f 100644
@@ -23,7 +23,7 @@ extern "C" {
 /**
  * UDP Header
  */
-struct udp_hdr {
+struct rte_udp_hdr {
 	uint16_t src_port;    /**< UDP source port. */
 	uint16_t dst_port;    /**< UDP destination port. */
 	uint16_t dgram_len;   /**< UDP datagram length */
lib/librte_pipeline/rte_table_action.c +16 -16
index 3df121c06..8ee85bfc1 100644
@@ -492,7 +492,7 @@ struct encap_pppoe_data {
 struct encap_vxlan_ipv4_data {
 	struct rte_ether_hdr ether;
 	struct rte_ipv4_hdr ipv4;
-	struct udp_hdr udp;
+	struct rte_udp_hdr udp;
 	struct rte_vxlan_hdr vxlan;
 } __attribute__((__packed__));
 
@@ -500,14 +500,14 @@ struct encap_vxlan_ipv4_vlan_data {
 	struct rte_ether_hdr ether;
 	struct rte_vlan_hdr vlan;
 	struct rte_ipv4_hdr ipv4;
-	struct udp_hdr udp;
+	struct rte_udp_hdr udp;
 	struct rte_vxlan_hdr vxlan;
 } __attribute__((__packed__));
 
 struct encap_vxlan_ipv6_data {
 	struct rte_ether_hdr ether;
 	struct rte_ipv6_hdr ipv6;
-	struct udp_hdr udp;
+	struct rte_udp_hdr udp;
 	struct rte_vxlan_hdr vxlan;
 } __attribute__((__packed__));
 
@@ -515,7 +515,7 @@ struct encap_vxlan_ipv6_vlan_data {
 	struct rte_ether_hdr ether;
 	struct rte_vlan_hdr vlan;
 	struct rte_ipv6_hdr ipv6;
-	struct udp_hdr udp;
+	struct rte_udp_hdr udp;
 	struct rte_vxlan_hdr vxlan;
 } __attribute__((__packed__));
 
@@ -998,13 +998,13 @@ pkt_work_encap_vxlan_ipv4(struct rte_mbuf *mbuf,
 	ether_length = (uint16_t)mbuf->pkt_len;
 	ipv4_total_length = ether_length +
 		(sizeof(struct rte_vxlan_hdr) +
-		sizeof(struct udp_hdr) +
+		sizeof(struct rte_udp_hdr) +
 		sizeof(struct rte_ipv4_hdr));
 	ipv4_hdr_cksum = encap_vxlan_ipv4_checksum_update(vxlan_tbl->ipv4.hdr_checksum,
 		rte_htons(ipv4_total_length));
 	udp_length = ether_length +
 		(sizeof(struct rte_vxlan_hdr) +
-		sizeof(struct udp_hdr));
+		sizeof(struct rte_udp_hdr));
 
 	vxlan_pkt = encap(ether, vxlan_tbl, sizeof(*vxlan_tbl));
 	vxlan_pkt->ipv4.total_length = rte_htons(ipv4_total_length);
@@ -1028,13 +1028,13 @@ pkt_work_encap_vxlan_ipv4_vlan(struct rte_mbuf *mbuf,
 	ether_length = (uint16_t)mbuf->pkt_len;
 	ipv4_total_length = ether_length +
 		(sizeof(struct rte_vxlan_hdr) +
-		sizeof(struct udp_hdr) +
+		sizeof(struct rte_udp_hdr) +
 		sizeof(struct rte_ipv4_hdr));
 	ipv4_hdr_cksum = encap_vxlan_ipv4_checksum_update(vxlan_tbl->ipv4.hdr_checksum,
 		rte_htons(ipv4_total_length));
 	udp_length = ether_length +
 		(sizeof(struct rte_vxlan_hdr) +
-		sizeof(struct udp_hdr));
+		sizeof(struct rte_udp_hdr));
 
 	vxlan_pkt = encap(ether, vxlan_tbl, sizeof(*vxlan_tbl));
 	vxlan_pkt->ipv4.total_length = rte_htons(ipv4_total_length);
@@ -1058,10 +1058,10 @@ pkt_work_encap_vxlan_ipv6(struct rte_mbuf *mbuf,
 	ether_length = (uint16_t)mbuf->pkt_len;
 	ipv6_payload_length = ether_length +
 		(sizeof(struct rte_vxlan_hdr) +
-		sizeof(struct udp_hdr));
+		sizeof(struct rte_udp_hdr));
 	udp_length = ether_length +
 		(sizeof(struct rte_vxlan_hdr) +
-		sizeof(struct udp_hdr));
+		sizeof(struct rte_udp_hdr));
 
 	vxlan_pkt = encap(ether, vxlan_tbl, sizeof(*vxlan_tbl));
 	vxlan_pkt->ipv6.payload_len = rte_htons(ipv6_payload_length);
@@ -1084,10 +1084,10 @@ pkt_work_encap_vxlan_ipv6_vlan(struct rte_mbuf *mbuf,
 	ether_length = (uint16_t)mbuf->pkt_len;
 	ipv6_payload_length = ether_length +
 		(sizeof(struct rte_vxlan_hdr) +
-		sizeof(struct udp_hdr));
+		sizeof(struct rte_udp_hdr));
 	udp_length = ether_length +
 		(sizeof(struct rte_vxlan_hdr) +
-		sizeof(struct udp_hdr));
+		sizeof(struct rte_udp_hdr));
 
 	vxlan_pkt = encap(ether, vxlan_tbl, sizeof(*vxlan_tbl));
 	vxlan_pkt->ipv6.payload_len = rte_htons(ipv6_payload_length);
@@ -1358,7 +1358,7 @@ pkt_ipv4_work_nat(struct rte_ipv4_hdr *ip,
 			tcp->src_port = data->port;
 			tcp->cksum = tcp_cksum;
 		} else {
-			struct udp_hdr *udp = (struct udp_hdr *) &ip[1];
+			struct rte_udp_hdr *udp = (struct rte_udp_hdr *) &ip[1];
 			uint16_t ip_cksum, udp_cksum;
 
 			ip_cksum = nat_ipv4_checksum_update(ip->hdr_checksum,
@@ -1397,7 +1397,7 @@ pkt_ipv4_work_nat(struct rte_ipv4_hdr *ip,
 			tcp->dst_port = data->port;
 			tcp->cksum = tcp_cksum;
 		} else {
-			struct udp_hdr *udp = (struct udp_hdr *) &ip[1];
+			struct rte_udp_hdr *udp = (struct rte_udp_hdr *) &ip[1];
 			uint16_t ip_cksum, udp_cksum;
 
 			ip_cksum = nat_ipv4_checksum_update(ip->hdr_checksum,
@@ -1439,7 +1439,7 @@ pkt_ipv6_work_nat(struct rte_ipv6_hdr *ip,
 			tcp->src_port = data->port;
 			tcp->cksum = tcp_cksum;
 		} else {
-			struct udp_hdr *udp = (struct udp_hdr *) &ip[1];
+			struct rte_udp_hdr *udp = (struct rte_udp_hdr *) &ip[1];
 			uint16_t udp_cksum;
 
 			udp_cksum = nat_ipv6_tcp_udp_checksum_update(udp->dgram_cksum,
@@ -1467,7 +1467,7 @@ pkt_ipv6_work_nat(struct rte_ipv6_hdr *ip,
 			tcp->dst_port = data->port;
 			tcp->cksum = tcp_cksum;
 		} else {
-			struct udp_hdr *udp = (struct udp_hdr *) &ip[1];
+			struct rte_udp_hdr *udp = (struct rte_udp_hdr *) &ip[1];
 			uint16_t udp_cksum;
 
 			udp_cksum = nat_ipv6_tcp_udp_checksum_update(udp->dgram_cksum,
lib/librte_vhost/virtio_net.c +3 -3
index fadfa3288..d0e9e90fe 100644
@@ -222,7 +222,7 @@ virtio_enqueue_offload(struct rte_mbuf *m_buf, struct virtio_net_hdr *net_hdr)
 						cksum));
 			break;
 		case PKT_TX_UDP_CKSUM:
-			net_hdr->csum_offset = (offsetof(struct udp_hdr,
+			net_hdr->csum_offset = (offsetof(struct rte_udp_hdr,
 						dgram_cksum));
 			break;
 		case PKT_TX_SCTP_CKSUM:
@@ -1027,7 +1027,7 @@ vhost_dequeue_offload(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
 				if (l4_proto == IPPROTO_TCP)
 					m->ol_flags |= PKT_TX_TCP_CKSUM;
 				break;
-			case (offsetof(struct udp_hdr, dgram_cksum)):
+			case (offsetof(struct rte_udp_hdr, dgram_cksum)):
 				if (l4_proto == IPPROTO_UDP)
 					m->ol_flags |= PKT_TX_UDP_CKSUM;
 				break;
@@ -1053,7 +1053,7 @@ vhost_dequeue_offload(struct virtio_net_hdr *hdr, struct rte_mbuf *m)
 		case VIRTIO_NET_HDR_GSO_UDP:
 			m->ol_flags |= PKT_TX_UDP_SEG;
 			m->tso_segsz = hdr->gso_size;
-			m->l4_len = sizeof(struct udp_hdr);
+			m->l4_len = sizeof(struct rte_udp_hdr);
 			break;
 		default:
 			RTE_LOG(WARNING, VHOST_DATA,
Signature · 1 line
2.11.0
#57 lore raw
In reply to Olivier Matz
Quoted 17 lines · Olivier Matz

This RFC targets 19.08.

The rte_net headers conflict with the libc headers, because some definitions are duplicated, sometimes with few differences.

This RFC adds the rte_ (or RTE_) prefix to all structures, functions and defines in rte_net library. This is a big changeset, that will break the API of many functions, but not the ABI.

This was discussed in [1], and recently requested by the techboard [2].

v2:
* rebase on top of v19.05-rc1

[1] http://mails.dpdk.org/archives/dev/2018-January/087384.html
[2] http://mails.dpdk.org/archives/dev/2019-February/125033.html

Quoted 15 lines

Olivier Matz (14):
net: add rte prefix to arp structures
net: add rte prefix to arp defines
net: add rte prefix to ether structures
net: add rte prefix to ether functions
net: add rte prefix to ether defines
net: add rte prefix to esp structure
net: add rte prefix to gre structure
net: add rte prefix to icmp structure
net: add rte prefix to icmp defines
net: add rte prefix to ip structure
net: add rte prefix to ip defines
net: add rte prefix to sctp structure
net: add rte prefix to tcp structure
net: add rte prefix to udp structure

Hi Oliver,

This was planned as one of the early step for the 19.08. Should we continue with this patchset or are you planning to send a new version on top of latest head?

Thanks,
ferruh

#58 lore raw

Hi Ferruh,

Quoted 34 lines · Ferruh Yigit
Quoted 17 lines · Olivier Matz

This RFC targets 19.08.

The rte_net headers conflict with the libc headers, because some definitions are duplicated, sometimes with few differences.

This RFC adds the rte_ (or RTE_) prefix to all structures, functions and defines in rte_net library. This is a big changeset, that will break the API of many functions, but not the ABI.

This was discussed in [1], and recently requested by the techboard [2].

v2:
* rebase on top of v19.05-rc1

[1] http://mails.dpdk.org/archives/dev/2018-January/087384.html
[2] http://mails.dpdk.org/archives/dev/2019-February/125033.html

Quoted 15 lines

Olivier Matz (14):
net: add rte prefix to arp structures
net: add rte prefix to arp defines
net: add rte prefix to ether structures
net: add rte prefix to ether functions
net: add rte prefix to ether defines
net: add rte prefix to esp structure
net: add rte prefix to gre structure
net: add rte prefix to icmp structure
net: add rte prefix to icmp defines
net: add rte prefix to ip structure
net: add rte prefix to ip defines
net: add rte prefix to sctp structure
net: add rte prefix to tcp structure
net: add rte prefix to udp structure

Quoted 4 lines

Hi Oliver,

This was planned as one of the early step for the 19.08. Should we continue with this patchset or are you planning to send a new version on top of latest head?

I've just send an updated version.

Thanks,
Olivier

#59 lore raw

cover prefix network structures

In reply to Olivier Matz

The rte_net headers conflict with the libc headers, because some definitions are duplicated, sometimes with few differences.

This patchset adds the rte_ (or RTE_) prefix to all structures, functions and defines in rte_net library. This is a big changeset, that will break the API of many functions, but not the ABI.

This was discussed in [1], and requested by the techboard [2].

patch-v1:
* rease on top of v19.05
* remove uneeded renames in drivers/net/bonding/rte_eth_bond_pmd.c and app/test-pmd/icmpecho.c (arp-related variables)
* do not modify base drivers, except cxgbe, thunderx, enetc, qede:
only files that already contain dpdk definitions are modified.
* fix checkpatch issues when it does not impact the code style too much. Big warnings remain about the RTE_IPv4() macros because arguments are separated by ',' instead of ', '.
* add a release note patch
* tested compilation on x86_64-linux and x86_64-freebsd.

rfc-v2:
* rebase on top of v19.05-rc1

[1] http://mails.dpdk.org/archives/dev/2018-January/087384.html
[2] http://mails.dpdk.org/archives/dev/2019-February/125033.html

Olivier Matz (15):
net: add rte prefix to arp structures
net: add rte prefix to arp defines
net: add rte prefix to ether structures
net: add rte prefix to ether functions
net: add rte prefix to ether defines
net: add rte prefix to esp structure
net: add rte prefix to gre structure
net: add rte prefix to icmp structure
net: add rte prefix to icmp defines
net: add rte prefix to ip structure
net: add rte prefix to ip defines
net: add rte prefix to sctp structure
net: add rte prefix to tcp structure
net: add rte prefix to udp structure
doc: announce network api change

 app/pdump/main.c                                   |   2 +-
 app/test-acl/main.c                                |   2 +-
 app/test-eventdev/test_perf_common.c               |   2 +-
 app/test-eventdev/test_pipeline_common.c           |   2 +-
 app/test-pipeline/pipeline_acl.c                   |  19 +-
 app/test-pipeline/pipeline_hash.c                  |  12 +-
 app/test-pmd/cmdline.c                             |  90 +++---
 app/test-pmd/cmdline_flow.c                        |  86 +++---
 app/test-pmd/config.c                              |  35 ++-
 app/test-pmd/csumonly.c                            | 169 +++++-----
 app/test-pmd/flowgen.c                             |  30 +-
 app/test-pmd/icmpecho.c                            | 117 +++----
 app/test-pmd/ieee1588fwd.c                         |  18 +-
 app/test-pmd/macfwd.c                              |  12 +-
 app/test-pmd/macswap.h                             |  12 +-
 app/test-pmd/macswap_common.h                      |   4 +-
 app/test-pmd/macswap_neon.h                        |  12 +-
 app/test-pmd/macswap_sse.h                         |  12 +-
 app/test-pmd/parameters.c                          |   6 +-
 app/test-pmd/testpmd.c                             |  23 +-
 app/test-pmd/testpmd.h                             |  30 +-
 app/test-pmd/txonly.c                              |  45 +--
 app/test-pmd/util.c                                |  34 +-
 app/test/packet_burst_generator.c                  | 150 ++++-----
 app/test/packet_burst_generator.h                  |  33 +-
 app/test/test_acl.c                                |   8 +-
 app/test/test_acl.h                                | 122 ++++----
 app/test/test_cmdline_etheraddr.c                  |  16 +-
 app/test/test_efd.c                                |  20 +-
 app/test/test_event_eth_rx_adapter.c               |   2 +-
 app/test/test_event_eth_tx_adapter.c               |   2 +-
 app/test/test_flow_classify.c                      |  70 +++--
 app/test/test_hash.c                               |  20 +-
 app/test/test_ipsec.c                              |  13 +-
 app/test/test_link_bonding.c                       | 342 ++++++++++++---------
 app/test/test_link_bonding_mode4.c                 | 124 ++++----
 app/test/test_link_bonding_rssconf.c               |   6 +-
 app/test/test_lpm.c                                |  76 ++---
 app/test/test_lpm_perf.c                           |  10 +-
 app/test/test_member.c                             |  20 +-
 app/test/test_pmd_perf.c                           |  20 +-
 app/test/test_sched.c                              |  24 +-
 app/test/test_table_acl.c                          |   8 +-
 app/test/test_thash.c                              |  12 +-
 app/test/virtual_pmd.c                             |   6 +-
 app/test/virtual_pmd.h                             |   2 +-
 doc/guides/nics/kni.rst                            |   2 +-
 doc/guides/prog_guide/bbdev.rst                    |   6 +-
 .../prog_guide/packet_classif_access_ctrl.rst      |  18 +-
 doc/guides/prog_guide/rte_flow.rst                 |   4 +-
 doc/guides/rel_notes/deprecation.rst               |   4 -
 doc/guides/rel_notes/release_19_08.rst             |   3 +
 doc/guides/sample_app_ug/flow_classify.rst         |  28 +-
 doc/guides/sample_app_ug/flow_filtering.rst        |   6 +-
 doc/guides/sample_app_ug/ip_frag.rst               |  16 +-
 doc/guides/sample_app_ug/ip_reassembly.rst         |  16 +-
 doc/guides/sample_app_ug/ipv4_multicast.rst        |  16 +-
 doc/guides/sample_app_ug/l2_forward_job_stats.rst  |   6 +-
 .../sample_app_ug/l2_forward_real_virtual.rst      |   6 +-
 doc/guides/sample_app_ug/l3_forward.rst            |  12 +-
 doc/guides/sample_app_ug/link_status_intr.rst      |   6 +-
 doc/guides/sample_app_ug/ptpclient.rst             |   6 +-
 doc/guides/sample_app_ug/rxtx_callbacks.rst        |   2 +-
 doc/guides/sample_app_ug/server_node_efd.rst       |  12 +-
 doc/guides/sample_app_ug/skeleton.rst              |   4 +-
 doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst   |   4 +-
 drivers/bus/dpaa/include/compat.h                  |   2 +
 drivers/bus/dpaa/include/fman.h                    |   2 +-
 drivers/bus/dpaa/include/netcfg.h                  |   4 +-
 drivers/net/af_packet/rte_eth_af_packet.c          |   2 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c                |   8 +-
 drivers/net/ark/ark_ethdev.c                       |  19 +-
 drivers/net/ark/ark_ext.h                          |   4 +-
 drivers/net/ark/ark_global.h                       |   5 +-
 drivers/net/atlantic/atl_ethdev.c                  |  27 +-
 drivers/net/atlantic/hw_atl/hw_atl_utils.c         |   8 +-
 drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c    |   4 +-
 drivers/net/avp/avp_ethdev.c                       |  21 +-
 drivers/net/avp/rte_avp_common.h                   |   2 +-
 drivers/net/axgbe/axgbe_dev.c                      |   4 +-
 drivers/net/axgbe/axgbe_ethdev.c                   |  10 +-
 drivers/net/axgbe/axgbe_ethdev.h                   |   4 +-
 drivers/net/axgbe/axgbe_rxtx.c                     |   2 +-
 drivers/net/bnx2x/bnx2x.c                          |  16 +-
 drivers/net/bnx2x/bnx2x_ethdev.c                   |   5 +-
 drivers/net/bnx2x/bnx2x_ethdev.h                   |   3 +-
 drivers/net/bnx2x/bnx2x_vfpf.c                     |   8 +-
 drivers/net/bnx2x/bnx2x_vfpf.h                     |   2 +-
 drivers/net/bnx2x/ecore_sp.h                       |   2 +-
 drivers/net/bnxt/bnxt.h                            |   4 +-
 drivers/net/bnxt/bnxt_ethdev.c                     |  80 ++---
 drivers/net/bnxt/bnxt_filter.c                     |   4 +-
 drivers/net/bnxt/bnxt_filter.h                     |   8 +-
 drivers/net/bnxt/bnxt_flow.c                       |  27 +-
 drivers/net/bnxt/bnxt_hwrm.c                       |  41 +--
 drivers/net/bnxt/bnxt_hwrm.h                       |   2 +-
 drivers/net/bnxt/bnxt_ring.c                       |   8 +-
 drivers/net/bnxt/bnxt_rxq.c                        |   2 +-
 drivers/net/bnxt/bnxt_rxr.c                        |   4 +-
 drivers/net/bnxt/bnxt_vnic.c                       |   2 +-
 drivers/net/bnxt/rte_pmd_bnxt.c                    |  14 +-
 drivers/net/bnxt/rte_pmd_bnxt.h                    |   4 +-
 drivers/net/bonding/rte_eth_bond.h                 |   2 +-
 drivers/net/bonding/rte_eth_bond_8023ad.c          |  30 +-
 drivers/net/bonding/rte_eth_bond_8023ad.h          |  10 +-
 drivers/net/bonding/rte_eth_bond_8023ad_private.h  |   2 +-
 drivers/net/bonding/rte_eth_bond_alb.c             |  98 +++---
 drivers/net/bonding/rte_eth_bond_alb.h             |  10 +-
 drivers/net/bonding/rte_eth_bond_api.c             |   2 +-
 drivers/net/bonding/rte_eth_bond_args.c            |   2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c             | 203 ++++++------
 drivers/net/bonding/rte_eth_bond_private.h         |   8 +-
 drivers/net/cxgbe/base/adapter.h                   |   2 +-
 drivers/net/cxgbe/cxgbe.h                          |   5 +-
 drivers/net/cxgbe/cxgbe_compat.h                   |   1 +
 drivers/net/cxgbe/cxgbe_ethdev.c                   |  14 +-
 drivers/net/cxgbe/cxgbe_filter.h                   |   2 +-
 drivers/net/cxgbe/cxgbe_flow.c                     |  10 +-
 drivers/net/cxgbe/cxgbe_main.c                     |   4 +-
 drivers/net/cxgbe/cxgbe_pfvf.h                     |   2 +-
 drivers/net/cxgbe/cxgbevf_main.c                   |   2 +-
 drivers/net/cxgbe/l2t.c                            |   8 +-
 drivers/net/cxgbe/l2t.h                            |   2 +-
 drivers/net/cxgbe/mps_tcam.c                       |  14 +-
 drivers/net/cxgbe/mps_tcam.h                       |   4 +-
 drivers/net/cxgbe/sge.c                            |   9 +-
 drivers/net/dpaa/dpaa_ethdev.c                     |  20 +-
 drivers/net/dpaa/dpaa_rxtx.c                       |  23 +-
 drivers/net/dpaa2/dpaa2_ethdev.c                   |  37 +--
 drivers/net/dpaa2/dpaa2_flow.c                     |  18 +-
 drivers/net/e1000/e1000_ethdev.h                   |   5 +-
 drivers/net/e1000/em_ethdev.c                      |  39 +--
 drivers/net/e1000/em_rxtx.c                        |  24 +-
 drivers/net/e1000/igb_ethdev.c                     |  76 ++---
 drivers/net/e1000/igb_flow.c                       |  12 +-
 drivers/net/e1000/igb_pf.c                         |  17 +-
 drivers/net/e1000/igb_rxtx.c                       |  23 +-
 drivers/net/ena/ena_ethdev.c                       |  17 +-
 drivers/net/ena/ena_ethdev.h                       |   2 +-
 drivers/net/enetc/base/enetc_hw.h                  |   4 +-
 drivers/net/enetc/enetc_ethdev.c                   |  21 +-
 drivers/net/enic/enic.h                            |   4 +-
 drivers/net/enic/enic_clsf.c                       |  40 +--
 drivers/net/enic/enic_ethdev.c                     |  29 +-
 drivers/net/enic/enic_flow.c                       | 114 +++----
 drivers/net/enic/enic_main.c                       |   4 +-
 drivers/net/enic/enic_res.c                        |   5 +-
 drivers/net/failsafe/failsafe.c                    |   8 +-
 drivers/net/failsafe/failsafe_args.c               |   4 +-
 drivers/net/failsafe/failsafe_ether.c              |   7 +-
 drivers/net/failsafe/failsafe_ops.c                |   6 +-
 drivers/net/failsafe/failsafe_private.h            |   4 +-
 drivers/net/fm10k/fm10k.h                          |   2 +-
 drivers/net/fm10k/fm10k_ethdev.c                   |  18 +-
 drivers/net/i40e/i40e_ethdev.c                     | 143 +++++----
 drivers/net/i40e/i40e_ethdev.h                     |  23 +-
 drivers/net/i40e/i40e_ethdev_vf.c                  |  68 ++--
 drivers/net/i40e/i40e_fdir.c                       | 127 ++++----
 drivers/net/i40e/i40e_flow.c                       |  58 ++--
 drivers/net/i40e/i40e_pf.c                         |  18 +-
 drivers/net/i40e/i40e_rxtx.c                       |  28 +-
 drivers/net/i40e/i40e_vf_representor.c             |   2 +-
 drivers/net/i40e/rte_pmd_i40e.c                    |  31 +-
 drivers/net/i40e/rte_pmd_i40e.h                    |   8 +-
 drivers/net/iavf/iavf.h                            |   4 +-
 drivers/net/iavf/iavf_ethdev.c                     |  53 ++--
 drivers/net/iavf/iavf_rxtx.c                       |  14 +-
 drivers/net/iavf/iavf_vchnl.c                      |   8 +-
 drivers/net/ice/ice_ethdev.c                       |  64 ++--
 drivers/net/ice/ice_ethdev.h                       |   6 +-
 drivers/net/ice/ice_rxtx.c                         |  28 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.h                 |   6 +-
 drivers/net/ipn3ke/ipn3ke_flow.c                   |   4 +-
 drivers/net/ipn3ke/ipn3ke_representor.c            |  21 +-
 drivers/net/ixgbe/ixgbe_ethdev.c                   | 107 ++++---
 drivers/net/ixgbe/ixgbe_ethdev.h                   |   4 +-
 drivers/net/ixgbe/ixgbe_flow.c                     |  22 +-
 drivers/net/ixgbe/ixgbe_pf.c                       |  16 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                     |  18 +-
 drivers/net/ixgbe/ixgbe_vf_representor.c           |   4 +-
 drivers/net/ixgbe/rte_pmd_ixgbe.c                  |  11 +-
 drivers/net/ixgbe/rte_pmd_ixgbe.h                  |   2 +-
 drivers/net/kni/rte_eth_kni.c                      |   6 +-
 drivers/net/liquidio/lio_ethdev.c                  |  23 +-
 drivers/net/mlx4/mlx4.c                            |   4 +-
 drivers/net/mlx4/mlx4.h                            |  10 +-
 drivers/net/mlx4/mlx4_ethdev.c                     |  12 +-
 drivers/net/mlx4/mlx4_flow.c                       |  16 +-
 drivers/net/mlx4/mlx4_rxtx.c                       |   2 +-
 drivers/net/mlx5/mlx5.c                            |   4 +-
 drivers/net/mlx5/mlx5.h                            |  15 +-
 drivers/net/mlx5/mlx5_flow.c                       |  22 +-
 drivers/net/mlx5/mlx5_flow_dv.c                    |  44 +--
 drivers/net/mlx5/mlx5_flow_tcf.c                   |  66 ++--
 drivers/net/mlx5/mlx5_flow_verbs.c                 |  30 +-
 drivers/net/mlx5/mlx5_mac.c                        |  18 +-
 drivers/net/mlx5/mlx5_nl.c                         |  28 +-
 drivers/net/mlx5/mlx5_rxtx.c                       |   6 +-
 drivers/net/mlx5/mlx5_rxtx.h                       |   2 +-
 drivers/net/mlx5/mlx5_rxtx_vec_neon.h              |   8 +-
 drivers/net/mlx5/mlx5_rxtx_vec_sse.h               |  10 +-
 drivers/net/mlx5/mlx5_trigger.c                    |   6 +-
 drivers/net/mvneta/mvneta_ethdev.c                 |  22 +-
 drivers/net/mvneta/mvneta_ethdev.h                 |   6 +-
 drivers/net/mvpp2/mrvl_ethdev.c                    |  22 +-
 drivers/net/mvpp2/mrvl_ethdev.h                    |   6 +-
 drivers/net/mvpp2/mrvl_flow.c                      |   4 +-
 drivers/net/netvsc/hn_ethdev.c                     |   4 +-
 drivers/net/netvsc/hn_nvs.c                        |   2 +-
 drivers/net/netvsc/hn_rndis.c                      |   2 +-
 drivers/net/netvsc/hn_rxtx.c                       |  12 +-
 drivers/net/netvsc/hn_var.h                        |   4 +-
 drivers/net/netvsc/hn_vf.c                         |   8 +-
 drivers/net/nfb/nfb_ethdev.c                       |  16 +-
 drivers/net/nfp/nfp_net.c                          |  22 +-
 drivers/net/nfp/nfp_net_pmd.h                      |   2 +-
 drivers/net/null/rte_eth_null.c                    |   6 +-
 drivers/net/octeontx/octeontx_ethdev.c             |   9 +-
 drivers/net/octeontx/octeontx_ethdev.h             |   2 +-
 drivers/net/pcap/rte_eth_pcap.c                    |  22 +-
 drivers/net/qede/base/bcm_osal.h                   |   4 +-
 drivers/net/qede/qede_ethdev.c                     |  71 +++--
 drivers/net/qede/qede_ethdev.h                     |   6 +-
 drivers/net/qede/qede_filter.c                     |  68 ++--
 drivers/net/qede/qede_if.h                         |   4 +-
 drivers/net/qede/qede_main.c                       |   6 +-
 drivers/net/qede/qede_rxtx.c                       |  34 +-
 drivers/net/qede/qede_rxtx.h                       |   2 +-
 drivers/net/ring/rte_eth_ring.c                    |   4 +-
 drivers/net/sfc/sfc.h                              |   2 +-
 drivers/net/sfc/sfc_ef10_tx.c                      |   4 +-
 drivers/net/sfc/sfc_ethdev.c                       |  24 +-
 drivers/net/sfc/sfc_flow.c                         |  12 +-
 drivers/net/sfc/sfc_port.c                         |   8 +-
 drivers/net/sfc/sfc_tso.c                          |   4 +-
 drivers/net/sfc/sfc_tso.h                          |   4 +-
 drivers/net/softnic/parser.c                       |  18 +-
 drivers/net/softnic/parser.h                       |   2 +-
 drivers/net/softnic/rte_eth_softnic.c              |   2 +-
 drivers/net/softnic/rte_eth_softnic_flow.c         |   4 +-
 drivers/net/softnic/rte_eth_softnic_pipeline.c     |  40 +--
 drivers/net/szedata2/rte_eth_szedata2.c            |   8 +-
 drivers/net/tap/rte_eth_tap.c                      |  68 ++--
 drivers/net/tap/rte_eth_tap.h                      |   4 +-
 drivers/net/tap/tap_bpf_program.c                  |  14 +-
 drivers/net/tap/tap_flow.c                         |  16 +-
 drivers/net/thunderx/base/nicvf_plat.h             |   5 +-
 drivers/net/thunderx/nicvf_ethdev.c                |  19 +-
 drivers/net/thunderx/nicvf_struct.h                |   2 +-
 drivers/net/vdev_netvsc/vdev_netvsc.c              |  16 +-
 drivers/net/vhost/rte_eth_vhost.c                  |  12 +-
 drivers/net/virtio/virtio_ethdev.c                 |  78 ++---
 drivers/net/virtio/virtio_pci.h                    |   4 +-
 drivers/net/virtio/virtio_rxtx.c                   |  33 +-
 drivers/net/virtio/virtio_user/vhost_kernel_tap.c  |   2 +-
 drivers/net/virtio/virtio_user/virtio_user_dev.c   |   6 +-
 drivers/net/virtio/virtio_user/virtio_user_dev.h   |   2 +-
 drivers/net/virtio/virtio_user_ethdev.c            |   8 +-
 drivers/net/virtio/virtqueue.h                     |   2 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c               |  12 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.h               |   2 +-
 drivers/net/vmxnet3/vmxnet3_rxtx.c                 |  47 +--
 examples/bbdev_app/main.c                          |  41 +--
 examples/bond/main.c                               |  83 ++---
 examples/distributor/main.c                        |   4 +-
 examples/ethtool/ethtool-app/ethapp.c              |   8 +-
 examples/ethtool/ethtool-app/main.c                |  10 +-
 examples/ethtool/lib/rte_ethtool.c                 |   8 +-
 examples/ethtool/lib/rte_ethtool.h                 |   7 +-
 examples/eventdev_pipeline/main.c                  |   4 +-
 examples/eventdev_pipeline/pipeline_common.h       |  10 +-
 examples/flow_classify/flow_classify.c             |  30 +-
 examples/flow_filtering/main.c                     |  10 +-
 examples/ip_fragmentation/main.c                   |  69 +++--
 examples/ip_pipeline/cli.c                         |   4 +-
 examples/ip_pipeline/kni.c                         |   2 +-
 examples/ip_pipeline/parser.c                      |  18 +-
 examples/ip_pipeline/parser.h                      |   2 +-
 examples/ip_pipeline/pipeline.c                    |  40 +--
 examples/ip_reassembly/main.c                      |  51 +--
 examples/ipsec-secgw/esp.c                         |  47 +--
 examples/ipsec-secgw/ipsec-secgw.c                 |  43 +--
 examples/ipsec-secgw/ipsec.h                       |   2 +-
 examples/ipsec-secgw/parser.c                      |   4 +-
 examples/ipsec-secgw/sa.c                          |  16 +-
 examples/ipv4_multicast/main.c                     |  60 ++--
 examples/kni/main.c                                |  14 +-
 examples/l2fwd-cat/l2fwd-cat.c                     |   4 +-
 examples/l2fwd-crypto/main.c                       |  26 +-
 examples/l2fwd-jobstats/main.c                     |   8 +-
 examples/l2fwd-keepalive/main.c                    |   8 +-
 examples/l2fwd/main.c                              |   8 +-
 examples/l3fwd-acl/main.c                          | 106 ++++---
 examples/l3fwd-power/main.c                        | 102 +++---
 examples/l3fwd-vf/main.c                           |  68 ++--
 examples/l3fwd/l3fwd.h                             |   8 +-
 examples/l3fwd/l3fwd_altivec.h                     |  26 +-
 examples/l3fwd/l3fwd_common.h                      |   4 +-
 examples/l3fwd/l3fwd_em.c                          |  46 +--
 examples/l3fwd/l3fwd_em.h                          |  22 +-
 examples/l3fwd/l3fwd_em_hlm.h                      |  19 +-
 examples/l3fwd/l3fwd_em_hlm_neon.h                 |  20 +-
 examples/l3fwd/l3fwd_em_hlm_sse.h                  |  16 +-
 examples/l3fwd/l3fwd_em_sequential.h               |  19 +-
 examples/l3fwd/l3fwd_lpm.c                         |  50 +--
 examples/l3fwd/l3fwd_lpm.h                         |  22 +-
 examples/l3fwd/l3fwd_lpm_altivec.h                 |  20 +-
 examples/l3fwd/l3fwd_lpm_neon.h                    |  30 +-
 examples/l3fwd/l3fwd_lpm_sse.h                     |  20 +-
 examples/l3fwd/l3fwd_neon.h                        |  26 +-
 examples/l3fwd/l3fwd_sse.h                         |  26 +-
 examples/l3fwd/main.c                              |  20 +-
 examples/link_status_interrupt/main.c              |   8 +-
 examples/load_balancer/runtime.c                   |   8 +-
 .../client_server_mp/mp_server/main.c              |   2 +-
 examples/packet_ordering/main.c                    |   2 +-
 examples/performance-thread/l3fwd-thread/main.c    | 337 ++++++++++----------
 examples/ptpclient/ptpclient.c                     |  32 +-
 examples/qos_meter/main.c                          |   5 +-
 examples/qos_sched/init.c                          |   2 +-
 examples/quota_watermark/qw/main.c                 |   8 +-
 examples/rxtx_callbacks/main.c                     |   4 +-
 examples/server_node_efd/node/node.c               |   6 +-
 examples/server_node_efd/server/main.c             |   8 +-
 examples/skeleton/basicfwd.c                       |   4 +-
 examples/tep_termination/main.c                    |   2 +-
 examples/tep_termination/main.h                    |   2 +-
 examples/tep_termination/vxlan.c                   | 115 +++----
 examples/tep_termination/vxlan.h                   |   8 +-
 examples/tep_termination/vxlan_setup.c             |  32 +-
 examples/tep_termination/vxlan_setup.h             |   2 +-
 examples/vhost/main.c                              |  42 +--
 examples/vhost/main.h                              |   2 +-
 examples/vm_power_manager/channel_monitor.c        |  12 +-
 .../guest_cli/vm_power_cli_guest.c                 |   2 +-
 examples/vm_power_manager/main.c                   |   6 +-
 examples/vmdq/main.c                               |  12 +-
 examples/vmdq_dcb/main.c                           |  12 +-
 lib/librte_ethdev/rte_class_eth.c                  |   4 +-
 lib/librte_ethdev/rte_eth_ctrl.h                   |  12 +-
 lib/librte_ethdev/rte_ethdev.c                     |  59 ++--
 lib/librte_ethdev/rte_ethdev.h                     |  15 +-
 lib/librte_ethdev/rte_ethdev_core.h                |  12 +-
 lib/librte_ethdev/rte_flow.h                       |  34 +-
 lib/librte_eventdev/rte_event_eth_rx_adapter.c     |  33 +-
 lib/librte_gro/gro_tcp4.c                          |  26 +-
 lib/librte_gro/gro_tcp4.h                          |  22 +-
 lib/librte_gro/gro_vxlan_tcp4.c                    |  66 ++--
 lib/librte_gro/gro_vxlan_tcp4.h                    |   6 +-
 lib/librte_gso/gso_common.h                        |  16 +-
 lib/librte_gso/gso_tcp4.c                          |  12 +-
 lib/librte_gso/gso_tunnel_tcp4.c                   |  14 +-
 lib/librte_gso/gso_udp4.c                          |  10 +-
 lib/librte_gso/rte_gso.h                           |   8 +-
 lib/librte_hash/rte_thash.h                        |   3 +-
 lib/librte_ip_frag/rte_ip_frag.h                   |  13 +-
 lib/librte_ip_frag/rte_ipv4_fragmentation.c        |  42 +--
 lib/librte_ip_frag/rte_ipv4_reassembly.c           |  14 +-
 lib/librte_ip_frag/rte_ipv6_fragmentation.c        |  28 +-
 lib/librte_ip_frag/rte_ipv6_reassembly.c           |   6 +-
 lib/librte_ipsec/crypto.h                          |   2 +-
 lib/librte_ipsec/esp_inb.c                         |  10 +-
 lib/librte_ipsec/esp_outb.c                        |   8 +-
 lib/librte_ipsec/iph.h                             |   8 +-
 lib/librte_ipsec/sa.c                              |  10 +-
 lib/librte_kni/rte_kni.c                           |   4 +-
 lib/librte_kni/rte_kni.h                           |   2 +-
 lib/librte_net/rte_arp.c                           |  33 +-
 lib/librte_net/rte_arp.h                           |  36 +--
 lib/librte_net/rte_esp.h                           |   2 +-
 lib/librte_net/rte_ether.h                         | 189 ++++++------
 lib/librte_net/rte_gre.h                           |   2 +-
 lib/librte_net/rte_icmp.h                          |   6 +-
 lib/librte_net/rte_ip.h                            |  75 ++---
 lib/librte_net/rte_net.c                           |  94 +++---
 lib/librte_net/rte_net.h                           |  28 +-
 lib/librte_net/rte_sctp.h                          |   2 +-
 lib/librte_net/rte_tcp.h                           |   2 +-
 lib/librte_net/rte_udp.h                           |   2 +-
 lib/librte_pipeline/rte_table_action.c             | 242 ++++++++-------
 lib/librte_pipeline/rte_table_action.h             |   4 +-
 lib/librte_port/rte_port_ras.c                     |  10 +-
 lib/librte_port/rte_port_source_sink.c             |   6 +-
 lib/librte_vhost/vhost.h                           |   2 +-
 lib/librte_vhost/virtio_net.c                      |  43 +--
 385 files changed, 4563 insertions(+), 4234 deletions(-)
Signature · 1 line
2.11.0
#60 lore raw

PATCH 1/15 net: add rte prefix to arp structures

Also rename arp_hrd, arp_pro, arp_hln, arp_pln and arp_op fields to avoid conflict with the #defines in gnu libc.

---
 app/test-pmd/icmpecho.c                | 24 ++++++++++-----------
 app/test/packet_burst_generator.c      | 12 +++++------
 app/test/packet_burst_generator.h      |  2 +-
 app/test/test_link_bonding.c           | 38 +++++++++++++++++++++-------------
 drivers/net/bonding/rte_eth_bond_alb.c | 26 +++++++++++------------
 drivers/net/bonding/rte_eth_bond_pmd.c | 10 +++++----
 drivers/net/i40e/i40e_fdir.c           |  4 ++--
 examples/bond/main.c                   | 26 ++++++++++++-----------
 lib/librte_net/rte_arp.c               | 14 ++++++-------
 lib/librte_net/rte_arp.h               | 16 +++++++-------
 10 files changed, 93 insertions(+), 79 deletions(-)
app/test-pmd/icmpecho.c +12 -12
index 55d266d77..0f92d14ad 100644
@@ -38,7 +38,7 @@
 static const char *
 arp_op_name(uint16_t arp_op)
 {
-	switch (arp_op ) {
+	switch (arp_op) {
 	case ARP_OP_REQUEST:
 		return "ARP Request";
 	case ARP_OP_REPLY:
@@ -277,7 +277,7 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 	struct rte_mbuf *pkt;
 	struct ether_hdr *eth_h;
 	struct vlan_hdr *vlan_h;
-	struct arp_hdr  *arp_h;
+	struct rte_arp_hdr  *arp_h;
 	struct ipv4_hdr *ip_h;
 	struct icmp_hdr *icmp_h;
 	struct ether_addr eth_addr;
@@ -347,22 +347,22 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 
 		/* Reply to ARP requests */
 		if (eth_type == ETHER_TYPE_ARP) {
-			arp_h = (struct arp_hdr *) ((char *)eth_h + l2_len);
-			arp_op = RTE_BE_TO_CPU_16(arp_h->arp_op);
-			arp_pro = RTE_BE_TO_CPU_16(arp_h->arp_pro);
+			arp_h = (struct rte_arp_hdr *) ((char *)eth_h + l2_len);
+			arp_op = RTE_BE_TO_CPU_16(arp_h->arp_opcode);
+			arp_pro = RTE_BE_TO_CPU_16(arp_h->arp_protocol);
 			if (verbose_level > 0) {
 				printf("  ARP:  hrd=%d proto=0x%04x hln=%d "
 				       "pln=%d op=%u (%s)\n",
-				       RTE_BE_TO_CPU_16(arp_h->arp_hrd),
-				       arp_pro, arp_h->arp_hln,
-				       arp_h->arp_pln, arp_op,
+				       RTE_BE_TO_CPU_16(arp_h->arp_hardware),
+				       arp_pro, arp_h->arp_hlen,
+				       arp_h->arp_plen, arp_op,
 				       arp_op_name(arp_op));
 			}
-			if ((RTE_BE_TO_CPU_16(arp_h->arp_hrd) !=
+			if ((RTE_BE_TO_CPU_16(arp_h->arp_hardware) !=
 			     ARP_HRD_ETHER) ||
 			    (arp_pro != ETHER_TYPE_IPv4) ||
-			    (arp_h->arp_hln != 6) ||
-			    (arp_h->arp_pln != 4)
+			    (arp_h->arp_hlen != 6) ||
+			    (arp_h->arp_plen != 4)
 			    ) {
 				rte_pktmbuf_free(pkt);
 				if (verbose_level > 0)
@@ -396,7 +396,7 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 			ether_addr_copy(&ports[fs->tx_port].eth_addr,
 					&eth_h->s_addr);
 
-			arp_h->arp_op = rte_cpu_to_be_16(ARP_OP_REPLY);
+			arp_h->arp_opcode = rte_cpu_to_be_16(ARP_OP_REPLY);
 			ether_addr_copy(&arp_h->arp_data.arp_tha, &eth_addr);
 			ether_addr_copy(&arp_h->arp_data.arp_sha, &arp_h->arp_data.arp_tha);
 			ether_addr_copy(&eth_h->s_addr, &arp_h->arp_data.arp_sha);
app/test/packet_burst_generator.c +6 -6
index e894dc76f..0b12058bb 100644
@@ -74,15 +74,15 @@ initialize_eth_header(struct ether_hdr *eth_hdr, struct ether_addr *src_mac,
 }
 
 void
-initialize_arp_header(struct arp_hdr *arp_hdr, struct ether_addr *src_mac,
+initialize_arp_header(struct rte_arp_hdr *arp_hdr, struct ether_addr *src_mac,
 		struct ether_addr *dst_mac, uint32_t src_ip, uint32_t dst_ip,
 		uint32_t opcode)
 {
-	arp_hdr->arp_hrd = rte_cpu_to_be_16(ARP_HRD_ETHER);
-	arp_hdr->arp_pro = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
-	arp_hdr->arp_hln = ETHER_ADDR_LEN;
-	arp_hdr->arp_pln = sizeof(uint32_t);
-	arp_hdr->arp_op = rte_cpu_to_be_16(opcode);
+	arp_hdr->arp_hardware = rte_cpu_to_be_16(ARP_HRD_ETHER);
+	arp_hdr->arp_protocol = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+	arp_hdr->arp_hlen = ETHER_ADDR_LEN;
+	arp_hdr->arp_plen = sizeof(uint32_t);
+	arp_hdr->arp_opcode = rte_cpu_to_be_16(opcode);
 	ether_addr_copy(src_mac, &arp_hdr->arp_data.arp_sha);
 	arp_hdr->arp_data.arp_sip = src_ip;
 	ether_addr_copy(dst_mac, &arp_hdr->arp_data.arp_tha);
app/test/packet_burst_generator.h +1 -1
index c20cea6e9..b6e013a11 100644
@@ -29,7 +29,7 @@ initialize_eth_header(struct ether_hdr *eth_hdr, struct ether_addr *src_mac,
 		uint8_t vlan_enabled, uint16_t van_id);
 
 void
-initialize_arp_header(struct arp_hdr *arp_hdr, struct ether_addr *src_mac,
+initialize_arp_header(struct rte_arp_hdr *arp_hdr, struct ether_addr *src_mac,
 		struct ether_addr *dst_mac, uint32_t src_ip, uint32_t dst_ip,
 		uint32_t opcode);
 
app/test/test_link_bonding.c +24 -14
index 0438e76cc..6ff0f5b9c 100644
@@ -4469,7 +4469,7 @@ test_alb_change_mac_in_reply_sent(void)
 	struct rte_mbuf *pkts_sent[MAX_PKT_BURST];
 
 	struct ether_hdr *eth_pkt;
-	struct arp_hdr *arp_pkt;
+	struct rte_arp_hdr *arp_pkt;
 
 	int slave_idx, nb_pkts, pkt_idx;
 	int retval = 0;
@@ -4504,7 +4504,8 @@ test_alb_change_mac_in_reply_sent(void)
 	eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
 	initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
 			0);
-	arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
+					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client1,
 			ARP_OP_REPLY);
 	rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
@@ -4514,7 +4515,8 @@ test_alb_change_mac_in_reply_sent(void)
 	eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
 	initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
 			0);
-	arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
+					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client2,
 			ARP_OP_REPLY);
 	rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
@@ -4524,7 +4526,8 @@ test_alb_change_mac_in_reply_sent(void)
 	eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
 	initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
 			0);
-	arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
+					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client3,
 			ARP_OP_REPLY);
 	rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
@@ -4534,7 +4537,8 @@ test_alb_change_mac_in_reply_sent(void)
 	eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
 	initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
 			0);
-	arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
+					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client4,
 			ARP_OP_REPLY);
 	rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
@@ -4555,7 +4559,8 @@ test_alb_change_mac_in_reply_sent(void)
 
 		for (pkt_idx = 0; pkt_idx < nb_pkts; pkt_idx++) {
 			eth_pkt = rte_pktmbuf_mtod(pkts_sent[pkt_idx], struct ether_hdr *);
-			arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+			arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
+						sizeof(struct ether_hdr));
 
 			if (slave_idx%2 == 0) {
 				if (!is_same_ether_addr(slave_mac1, &arp_pkt->arp_data.arp_sha)) {
@@ -4580,7 +4585,7 @@ static int
 test_alb_reply_from_client(void)
 {
 	struct ether_hdr *eth_pkt;
-	struct arp_hdr *arp_pkt;
+	struct rte_arp_hdr *arp_pkt;
 
 	struct rte_mbuf *pkt;
 	struct rte_mbuf *pkts_sent[MAX_PKT_BURST];
@@ -4617,7 +4622,8 @@ test_alb_reply_from_client(void)
 	eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
 	initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
 			0);
-	arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
+					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client1, ip_host,
 			ARP_OP_REPLY);
 	virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
@@ -4628,7 +4634,8 @@ test_alb_reply_from_client(void)
 	eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
 	initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
 			0);
-	arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
+					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client2, ip_host,
 			ARP_OP_REPLY);
 	virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
@@ -4639,7 +4646,8 @@ test_alb_reply_from_client(void)
 	eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
 	initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
 			0);
-	arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
+					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client3, ip_host,
 			ARP_OP_REPLY);
 	virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
@@ -4650,7 +4658,8 @@ test_alb_reply_from_client(void)
 	eth_pkt = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
 	initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
 			0);
-	arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
+					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client4, ip_host,
 			ARP_OP_REPLY);
 	virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
@@ -4676,7 +4685,8 @@ test_alb_reply_from_client(void)
 
 		for (pkt_idx = 0; pkt_idx < nb_pkts; pkt_idx++) {
 			eth_pkt = rte_pktmbuf_mtod(pkts_sent[pkt_idx], struct ether_hdr *);
-			arp_pkt = (struct arp_hdr *)((char *)eth_pkt + sizeof(struct ether_hdr));
+			arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
+						sizeof(struct ether_hdr));
 
 			if (slave_idx%2 == 0) {
 				if (!is_same_ether_addr(slave_mac1, &arp_pkt->arp_data.arp_sha)) {
@@ -4708,7 +4718,7 @@ test_alb_receive_vlan_reply(void)
 {
 	struct ether_hdr *eth_pkt;
 	struct vlan_hdr *vlan_pkt;
-	struct arp_hdr *arp_pkt;
+	struct rte_arp_hdr *arp_pkt;
 
 	struct rte_mbuf *pkt;
 	struct rte_mbuf *pkts_sent[MAX_PKT_BURST];
@@ -4749,7 +4759,7 @@ test_alb_receive_vlan_reply(void)
 	vlan_pkt = vlan_pkt+1;
 	vlan_pkt->vlan_tci = rte_cpu_to_be_16(2);
 	vlan_pkt->eth_proto = rte_cpu_to_be_16(ETHER_TYPE_ARP);
-	arp_pkt = (struct arp_hdr *)((char *)(vlan_pkt + 1));
+	arp_pkt = (struct rte_arp_hdr *)((char *)(vlan_pkt + 1));
 	initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client1, ip_host,
 			ARP_OP_REPLY);
 	virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
drivers/net/bonding/rte_eth_bond_alb.c +13 -13
index d3e16d4bd..703223937 100644
@@ -74,17 +74,17 @@ bond_mode_alb_enable(struct rte_eth_dev *bond_dev)
 
 void bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
 		struct bond_dev_private *internals) {
-	struct arp_hdr *arp;
+	struct rte_arp_hdr *arp;
 
 	struct client_data *hash_table = internals->mode6.client_table;
 	struct client_data *client_info;
 
 	uint8_t hash_index;
 
-	arp = (struct arp_hdr *) ((char *) (eth_h + 1) + offset);
+	arp = (struct rte_arp_hdr *)((char *)(eth_h + 1) + offset);
 
 	/* ARP Requests are forwarded to the application with no changes */
-	if (arp->arp_op != rte_cpu_to_be_16(ARP_OP_REPLY))
+	if (arp->arp_opcode != rte_cpu_to_be_16(ARP_OP_REPLY))
 		return;
 
 	/* From now on, we analyze only ARP Reply packets */
@@ -123,7 +123,7 @@ uint16_t
 bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 		struct bond_dev_private *internals)
 {
-	struct arp_hdr *arp;
+	struct rte_arp_hdr *arp;
 
 	struct client_data *hash_table = internals->mode6.client_table;
 	struct client_data *client_info;
@@ -132,7 +132,7 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 
 	struct ether_addr bonding_mac;
 
-	arp = (struct arp_hdr *)((char *)(eth_h + 1) + offset);
+	arp = (struct rte_arp_hdr *)((char *)(eth_h + 1) + offset);
 
 	/*
 	 * Traffic with src MAC other than bonding should be sent on
@@ -150,7 +150,7 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 	client_info = &hash_table[hash_index];
 
 	rte_spinlock_lock(&internals->mode6.lock);
-	if (arp->arp_op == rte_cpu_to_be_16(ARP_OP_REPLY)) {
+	if (arp->arp_opcode == rte_cpu_to_be_16(ARP_OP_REPLY)) {
 		if (client_info->in_use) {
 			if (client_info->app_ip == arp->arp_data.arp_sip &&
 				client_info->cli_ip == arp->arp_data.arp_tip) {
@@ -196,7 +196,7 @@ bond_mode_alb_arp_upd(struct client_data *client_info,
 		struct rte_mbuf *pkt, struct bond_dev_private *internals)
 {
 	struct ether_hdr *eth_h;
-	struct arp_hdr *arp_h;
+	struct rte_arp_hdr *arp_h;
 	uint16_t slave_idx;
 
 	rte_spinlock_lock(&internals->mode6.lock);
@@ -209,7 +209,7 @@ bond_mode_alb_arp_upd(struct client_data *client_info,
 	else
 		eth_h->ether_type = rte_cpu_to_be_16(ETHER_TYPE_ARP);
 
-	arp_h = (struct arp_hdr *)((char *)eth_h + sizeof(struct ether_hdr)
+	arp_h = (struct rte_arp_hdr *)((char *)eth_h + sizeof(struct ether_hdr)
 			+ client_info->vlan_count * sizeof(struct vlan_hdr));
 
 	memcpy(eth_h + 1, client_info->vlan,
@@ -220,11 +220,11 @@ bond_mode_alb_arp_upd(struct client_data *client_info,
 	ether_addr_copy(&client_info->cli_mac, &arp_h->arp_data.arp_tha);
 	arp_h->arp_data.arp_tip = client_info->cli_ip;
 
-	arp_h->arp_hrd = rte_cpu_to_be_16(ARP_HRD_ETHER);
-	arp_h->arp_pro = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
-	arp_h->arp_hln = ETHER_ADDR_LEN;
-	arp_h->arp_pln = sizeof(uint32_t);
-	arp_h->arp_op = rte_cpu_to_be_16(ARP_OP_REPLY);
+	arp_h->arp_hardware = rte_cpu_to_be_16(ARP_HRD_ETHER);
+	arp_h->arp_protocol = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+	arp_h->arp_hlen = ETHER_ADDR_LEN;
+	arp_h->arp_plen = sizeof(uint32_t);
+	arp_h->arp_opcode = rte_cpu_to_be_16(ARP_OP_REPLY);
 
 	slave_idx = client_info->slave_idx;
 	rte_spinlock_unlock(&internals->mode6.lock);
drivers/net/bonding/rte_eth_bond_pmd.c +6 -4
index 2c4da90c6..fa8f81e2b 100644
@@ -589,7 +589,7 @@ mode6_debug(const char __attribute__((unused)) *info, struct ether_hdr *eth_h,
 {
 	struct ipv4_hdr *ipv4_h;
 #ifdef RTE_LIBRTE_BOND_DEBUG_ALB
-	struct arp_hdr *arp_h;
+	struct rte_arp_hdr *arp_h;
 	char dst_ip[16];
 	char ArpOp[24];
 	char buf[16];
@@ -614,7 +614,7 @@ mode6_debug(const char __attribute__((unused)) *info, struct ether_hdr *eth_h,
 	}
 #ifdef RTE_LIBRTE_BOND_DEBUG_ALB
 	else if (ether_type == rte_cpu_to_be_16(ETHER_TYPE_ARP)) {
-		arp_h = (struct arp_hdr *)((char *)(eth_h + 1) + offset);
+		arp_h = (struct rte_arp_hdr *)((char *)(eth_h + 1) + offset);
 		ipv4_addr_to_dot(arp_h->arp_data.arp_sip, src_ip, MaxIPv4String);
 		ipv4_addr_to_dot(arp_h->arp_data.arp_tip, dst_ip, MaxIPv4String);
 		arp_op_name(rte_be_to_cpu_16(arp_h->arp_op),
@@ -1132,8 +1132,10 @@ bond_ethdev_tx_burst_alb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 						     "Failed to allocate ARP packet from pool");
 					continue;
 				}
-				pkt_size = sizeof(struct ether_hdr) + sizeof(struct arp_hdr)
-						+ client_info->vlan_count * sizeof(struct vlan_hdr);
+				pkt_size = sizeof(struct ether_hdr) +
+					sizeof(struct rte_arp_hdr) +
+					client_info->vlan_count *
+					sizeof(struct vlan_hdr);
 				upd_pkt->data_len = pkt_size;
 				upd_pkt->pkt_len = pkt_size;
 
drivers/net/i40e/i40e_fdir.c +2 -2
index d41601a17..4b32fee1e 100644
@@ -911,7 +911,7 @@ i40e_fdir_construct_pkt(struct i40e_pf *pf,
 		 */
 		if (fdir_input->flow.l2_flow.ether_type ==
 				rte_cpu_to_be_16(ETHER_TYPE_ARP))
-			payload += sizeof(struct arp_hdr);
+			payload += sizeof(struct rte_arp_hdr);
 		set_idx = I40E_FLXPLD_L2_IDX;
 		break;
 	default:
@@ -1197,7 +1197,7 @@ i40e_flow_fdir_construct_pkt(struct i40e_pf *pf,
 		 */
 		if (fdir_input->flow.l2_flow.ether_type ==
 				rte_cpu_to_be_16(ETHER_TYPE_ARP))
-			payload += sizeof(struct arp_hdr);
+			payload += sizeof(struct rte_arp_hdr);
 		set_idx = I40E_FLXPLD_L2_IDX;
 	} else if (fdir_input->flow_ext.customized_pctype) {
 		/* If customized pctype is used */
examples/bond/main.c +14 -12
index ef86194ff..24479649e 100644
@@ -339,7 +339,7 @@ static int lcore_main(__attribute__((unused)) void *arg1)
 	struct ether_addr d_addr;
 
 	struct ether_hdr *eth_hdr;
-	struct arp_hdr *arp_hdr;
+	struct rte_arp_hdr *arp_hdr;
 	struct ipv4_hdr *ipv4_hdr;
 	uint16_t ether_type, offset;
 
@@ -382,10 +382,11 @@ static int lcore_main(__attribute__((unused)) void *arg1)
 					global_flag_stru_p->port_packets[1]++;
 					rte_spinlock_unlock(&global_flag_stru_p->lock);
 				}
-				arp_hdr = (struct arp_hdr *)((char *)(eth_hdr + 1) + offset);
+				arp_hdr = (struct rte_arp_hdr *)(
+					(char *)(eth_hdr + 1) + offset);
 				if (arp_hdr->arp_data.arp_tip == bond_ip) {
-					if (arp_hdr->arp_op == rte_cpu_to_be_16(ARP_OP_REQUEST)) {
-						arp_hdr->arp_op = rte_cpu_to_be_16(ARP_OP_REPLY);
+					if (arp_hdr->arp_opcode == rte_cpu_to_be_16(ARP_OP_REQUEST)) {
+						arp_hdr->arp_opcode = rte_cpu_to_be_16(ARP_OP_REPLY);
 						/* Switch src and dst data and set bonding MAC */
 						ether_addr_copy(&eth_hdr->s_addr, &eth_hdr->d_addr);
 						rte_eth_macaddr_get(BOND_PORT, &eth_hdr->s_addr);
@@ -450,7 +451,7 @@ static void cmd_obj_send_parsed(void *parsed_result,
 
 	struct rte_mbuf *created_pkt;
 	struct ether_hdr *eth_hdr;
-	struct arp_hdr *arp_hdr;
+	struct rte_arp_hdr *arp_hdr;
 
 	uint32_t bond_ip;
 	size_t pkt_size;
@@ -469,7 +470,7 @@ static void cmd_obj_send_parsed(void *parsed_result,
 		return;
 	}
 
-	pkt_size = sizeof(struct ether_hdr) + sizeof(struct arp_hdr);
+	pkt_size = sizeof(struct ether_hdr) + sizeof(struct rte_arp_hdr);
 	created_pkt->data_len = pkt_size;
 	created_pkt->pkt_len = pkt_size;
 
@@ -478,12 +479,13 @@ static void cmd_obj_send_parsed(void *parsed_result,
 	memset(&eth_hdr->d_addr, 0xFF, ETHER_ADDR_LEN);
 	eth_hdr->ether_type = rte_cpu_to_be_16(ETHER_TYPE_ARP);
 
-	arp_hdr = (struct arp_hdr *)((char *)eth_hdr + sizeof(struct ether_hdr));
-	arp_hdr->arp_hrd = rte_cpu_to_be_16(ARP_HRD_ETHER);
-	arp_hdr->arp_pro = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
-	arp_hdr->arp_hln = ETHER_ADDR_LEN;
-	arp_hdr->arp_pln = sizeof(uint32_t);
-	arp_hdr->arp_op = rte_cpu_to_be_16(ARP_OP_REQUEST);
+	arp_hdr = (struct rte_arp_hdr *)(
+		(char *)eth_hdr + sizeof(struct ether_hdr));
+	arp_hdr->arp_hardware = rte_cpu_to_be_16(ARP_HRD_ETHER);
+	arp_hdr->arp_protocol = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+	arp_hdr->arp_hlen = ETHER_ADDR_LEN;
+	arp_hdr->arp_plen = sizeof(uint32_t);
+	arp_hdr->arp_opcode = rte_cpu_to_be_16(ARP_OP_REQUEST);
 
 	rte_eth_macaddr_get(BOND_PORT, &arp_hdr->arp_data.arp_sha);
 	arp_hdr->arp_data.arp_sip = bond_ip;
lib/librte_net/rte_arp.c +7 -7
index f0ed9bd68..c80ebc7e1 100644
@@ -12,7 +12,7 @@ rte_net_make_rarp_packet(struct rte_mempool *mpool,
 		const struct ether_addr *mac)
 {
 	struct ether_hdr *eth_hdr;
-	struct arp_hdr *rarp;
+	struct rte_arp_hdr *rarp;
 	struct rte_mbuf *mbuf;
 
 	if (mpool == NULL)
@@ -34,12 +34,12 @@ rte_net_make_rarp_packet(struct rte_mempool *mpool,
 	eth_hdr->ether_type = htons(ETHER_TYPE_RARP);
 
 	/* RARP header. */
-	rarp = (struct arp_hdr *)(eth_hdr + 1);
-	rarp->arp_hrd = htons(ARP_HRD_ETHER);
-	rarp->arp_pro = htons(ETHER_TYPE_IPv4);
-	rarp->arp_hln = ETHER_ADDR_LEN;
-	rarp->arp_pln = 4;
-	rarp->arp_op  = htons(ARP_OP_REVREQUEST);
+	rarp = (struct rte_arp_hdr *)(eth_hdr + 1);
+	rarp->arp_hardware = htons(ARP_HRD_ETHER);
+	rarp->arp_protocol = htons(ETHER_TYPE_IPv4);
+	rarp->arp_hlen = ETHER_ADDR_LEN;
+	rarp->arp_plen = 4;
+	rarp->arp_opcode  = htons(ARP_OP_REVREQUEST);
 
 	ether_addr_copy(mac, &rarp->arp_data.arp_sha);
 	ether_addr_copy(mac, &rarp->arp_data.arp_tha);
lib/librte_net/rte_arp.h +8 -8
index 139a84ca5..c9b5cd49d 100644
@@ -21,7 +21,7 @@ extern "C" {
 /**
  * ARP header IPv4 payload.
  */
-struct arp_ipv4 {
+struct rte_arp_ipv4 {
 	struct ether_addr arp_sha;  /**< sender hardware address */
 	uint32_t          arp_sip;  /**< sender IP address */
 	struct ether_addr arp_tha;  /**< target hardware address */
@@ -31,14 +31,14 @@ struct arp_ipv4 {
 /**
  * ARP header.
  */
-struct arp_hdr {
-	uint16_t arp_hrd;    /* format of hardware address */
+struct rte_arp_hdr {
+	uint16_t arp_hardware;    /* format of hardware address */
 #define ARP_HRD_ETHER     1  /* ARP Ethernet address format */
 
-	uint16_t arp_pro;    /* format of protocol address */
-	uint8_t  arp_hln;    /* length of hardware address */
-	uint8_t  arp_pln;    /* length of protocol address */
-	uint16_t arp_op;     /* ARP opcode (command) */
+	uint16_t arp_protocol;    /* format of protocol address */
+	uint8_t  arp_hlen;    /* length of hardware address */
+	uint8_t  arp_plen;    /* length of protocol address */
+	uint16_t arp_opcode;     /* ARP opcode (command) */
 #define	ARP_OP_REQUEST    1 /* request to resolve address */
 #define	ARP_OP_REPLY      2 /* response to previous request */
 #define	ARP_OP_REVREQUEST 3 /* request proto addr given hardware */
@@ -46,7 +46,7 @@ struct arp_hdr {
 #define	ARP_OP_INVREQUEST 8 /* request to identify peer */
 #define	ARP_OP_INVREPLY   9 /* response identifying peer */
 
-	struct arp_ipv4 arp_data;
+	struct rte_arp_ipv4 arp_data;
 } __attribute__((__packed__));
 
 /**
Signature · 1 line
2.11.0
#61 lore raw

Re: [dpdk-dev] [PATCH 01/15] net: add rte prefix to arp structures

Quoted 4 lines · Olivier Matz

Also rename arp_hrd, arp_pro, arp_hln, arp_pln and arp_op fields to avoid conflict with the #defines in gnu libc.

<...>

drivers/net/bonding/rte_eth_bond_pmd.c mode6_debug(const char __attribute__((unused)) *info, struct ether_hdr *eth_h, · line 620

Quoted 9 lines
drivers/net/bonding/rte_eth_bond_pmd.c +1 -1
@@ -614,7 +614,7 @@ mode6_debug(const char __attribute__((unused)) *info, struct ether_hdr *eth_h,
 	}
 #ifdef RTE_LIBRTE_BOND_DEBUG_ALB
 	else if (ether_type == rte_cpu_to_be_16(ETHER_TYPE_ARP)) {
-		arp_h = (struct arp_hdr *)((char *)(eth_h + 1) + offset);
+		arp_h = (struct rte_arp_hdr *)((char *)(eth_h + 1) + offset);
 		ipv4_addr_to_dot(arp_h->arp_data.arp_sip, src_ip, MaxIPv4String);
 		ipv4_addr_to_dot(arp_h->arp_data.arp_tip, dst_ip, MaxIPv4String);
 		arp_op_name(rte_be_to_cpu_16(arp_h->arp_op),

There is one 'arp_op' seems left here (should be 'arp_opcode'), I am fixing while merging.

#62 lore raw

PATCH 2/15 net: add rte prefix to arp defines

In reply to Olivier Matz

Add 'RTE_' prefix to defines:
- rename ARP_HRD_ETHER as RTE_ARP_HRD_ETHER.
- rename ARP_OP_REQUEST as RTE_ARP_OP_REQUEST.
- rename ARP_OP_REPLY as RTE_ARP_OP_REPLY.
- rename ARP_OP_REVREQUEST as RTE_ARP_OP_REVREQUEST.
- rename ARP_OP_REVREPLY as RTE_ARP_OP_REVREPLY.
- rename ARP_OP_INVREQUEST as RTE_ARP_OP_INVREQUEST.
- rename ARP_OP_INVREPLY as RTE_ARP_OP_INVREPLY.

---
 app/test-pmd/icmpecho.c                | 18 +++++++++---------
 app/test/packet_burst_generator.c      |  2 +-
 app/test/test_link_bonding.c           | 18 +++++++++---------
 drivers/net/bonding/rte_eth_bond_alb.c |  8 ++++----
 drivers/net/bonding/rte_eth_bond_pmd.c | 12 ++++++------
 examples/bond/main.c                   |  8 ++++----
 lib/librte_net/rte_arp.c               |  4 ++--
 lib/librte_net/rte_arp.h               | 14 +++++++-------
 8 files changed, 42 insertions(+), 42 deletions(-)
app/test-pmd/icmpecho.c +9 -9
index 0f92d14ad..b0767f22b 100644
@@ -39,17 +39,17 @@ static const char *
 arp_op_name(uint16_t arp_op)
 {
 	switch (arp_op) {
-	case ARP_OP_REQUEST:
+	case RTE_ARP_OP_REQUEST:
 		return "ARP Request";
-	case ARP_OP_REPLY:
+	case RTE_ARP_OP_REPLY:
 		return "ARP Reply";
-	case ARP_OP_REVREQUEST:
+	case RTE_ARP_OP_REVREQUEST:
 		return "Reverse ARP Request";
-	case ARP_OP_REVREPLY:
+	case RTE_ARP_OP_REVREPLY:
 		return "Reverse ARP Reply";
-	case ARP_OP_INVREQUEST:
+	case RTE_ARP_OP_INVREQUEST:
 		return "Peer Identify Request";
-	case ARP_OP_INVREPLY:
+	case RTE_ARP_OP_INVREPLY:
 		return "Peer Identify Reply";
 	default:
 		break;
@@ -359,7 +359,7 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 				       arp_op_name(arp_op));
 			}
 			if ((RTE_BE_TO_CPU_16(arp_h->arp_hardware) !=
-			     ARP_HRD_ETHER) ||
+			     RTE_ARP_HRD_ETHER) ||
 			    (arp_pro != ETHER_TYPE_IPv4) ||
 			    (arp_h->arp_hlen != 6) ||
 			    (arp_h->arp_plen != 4)
@@ -381,7 +381,7 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 				ipv4_addr_dump(" tip=", ip_addr);
 				printf("\n");
 			}
-			if (arp_op != ARP_OP_REQUEST) {
+			if (arp_op != RTE_ARP_OP_REQUEST) {
 				rte_pktmbuf_free(pkt);
 				continue;
 			}
@@ -396,7 +396,7 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 			ether_addr_copy(&ports[fs->tx_port].eth_addr,
 					&eth_h->s_addr);
 
-			arp_h->arp_opcode = rte_cpu_to_be_16(ARP_OP_REPLY);
+			arp_h->arp_opcode = rte_cpu_to_be_16(RTE_ARP_OP_REPLY);
 			ether_addr_copy(&arp_h->arp_data.arp_tha, &eth_addr);
 			ether_addr_copy(&arp_h->arp_data.arp_sha, &arp_h->arp_data.arp_tha);
 			ether_addr_copy(&eth_h->s_addr, &arp_h->arp_data.arp_sha);
app/test/packet_burst_generator.c +1 -1
index 0b12058bb..ccc0bd591 100644
@@ -78,7 +78,7 @@ initialize_arp_header(struct rte_arp_hdr *arp_hdr, struct ether_addr *src_mac,
 		struct ether_addr *dst_mac, uint32_t src_ip, uint32_t dst_ip,
 		uint32_t opcode)
 {
-	arp_hdr->arp_hardware = rte_cpu_to_be_16(ARP_HRD_ETHER);
+	arp_hdr->arp_hardware = rte_cpu_to_be_16(RTE_ARP_HRD_ETHER);
 	arp_hdr->arp_protocol = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
 	arp_hdr->arp_hlen = ETHER_ADDR_LEN;
 	arp_hdr->arp_plen = sizeof(uint32_t);
app/test/test_link_bonding.c +9 -9
index 6ff0f5b9c..451c693d6 100644
@@ -4507,7 +4507,7 @@ test_alb_change_mac_in_reply_sent(void)
 	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
 					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client1,
-			ARP_OP_REPLY);
+			RTE_ARP_OP_REPLY);
 	rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
 
 	pkt = rte_pktmbuf_alloc(test_params->mbuf_pool);
@@ -4518,7 +4518,7 @@ test_alb_change_mac_in_reply_sent(void)
 	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
 					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client2,
-			ARP_OP_REPLY);
+			RTE_ARP_OP_REPLY);
 	rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
 
 	pkt = rte_pktmbuf_alloc(test_params->mbuf_pool);
@@ -4529,7 +4529,7 @@ test_alb_change_mac_in_reply_sent(void)
 	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
 					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client3,
-			ARP_OP_REPLY);
+			RTE_ARP_OP_REPLY);
 	rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
 
 	pkt = rte_pktmbuf_alloc(test_params->mbuf_pool);
@@ -4540,7 +4540,7 @@ test_alb_change_mac_in_reply_sent(void)
 	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
 					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client4,
-			ARP_OP_REPLY);
+			RTE_ARP_OP_REPLY);
 	rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
 
 	slave_mac1 =
@@ -4625,7 +4625,7 @@ test_alb_reply_from_client(void)
 	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
 					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client1, ip_host,
-			ARP_OP_REPLY);
+			RTE_ARP_OP_REPLY);
 	virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
 			1);
 
@@ -4637,7 +4637,7 @@ test_alb_reply_from_client(void)
 	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
 					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client2, ip_host,
-			ARP_OP_REPLY);
+			RTE_ARP_OP_REPLY);
 	virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
 			1);
 
@@ -4649,7 +4649,7 @@ test_alb_reply_from_client(void)
 	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
 					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client3, ip_host,
-			ARP_OP_REPLY);
+			RTE_ARP_OP_REPLY);
 	virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
 			1);
 
@@ -4661,7 +4661,7 @@ test_alb_reply_from_client(void)
 	arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
 					sizeof(struct ether_hdr));
 	initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client4, ip_host,
-			ARP_OP_REPLY);
+			RTE_ARP_OP_REPLY);
 	virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
 			1);
 
@@ -4761,7 +4761,7 @@ test_alb_receive_vlan_reply(void)
 	vlan_pkt->eth_proto = rte_cpu_to_be_16(ETHER_TYPE_ARP);
 	arp_pkt = (struct rte_arp_hdr *)((char *)(vlan_pkt + 1));
 	initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client1, ip_host,
-			ARP_OP_REPLY);
+			RTE_ARP_OP_REPLY);
 	virtual_ethdev_add_mbufs_to_rx_queue(test_params->slave_port_ids[0], &pkt,
 			1);
 
drivers/net/bonding/rte_eth_bond_alb.c +4 -4
index 703223937..f16ae8f21 100644
@@ -84,7 +84,7 @@ void bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
 	arp = (struct rte_arp_hdr *)((char *)(eth_h + 1) + offset);
 
 	/* ARP Requests are forwarded to the application with no changes */
-	if (arp->arp_opcode != rte_cpu_to_be_16(ARP_OP_REPLY))
+	if (arp->arp_opcode != rte_cpu_to_be_16(RTE_ARP_OP_REPLY))
 		return;
 
 	/* From now on, we analyze only ARP Reply packets */
@@ -150,7 +150,7 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 	client_info = &hash_table[hash_index];
 
 	rte_spinlock_lock(&internals->mode6.lock);
-	if (arp->arp_opcode == rte_cpu_to_be_16(ARP_OP_REPLY)) {
+	if (arp->arp_opcode == rte_cpu_to_be_16(RTE_ARP_OP_REPLY)) {
 		if (client_info->in_use) {
 			if (client_info->app_ip == arp->arp_data.arp_sip &&
 				client_info->cli_ip == arp->arp_data.arp_tip) {
@@ -220,11 +220,11 @@ bond_mode_alb_arp_upd(struct client_data *client_info,
 	ether_addr_copy(&client_info->cli_mac, &arp_h->arp_data.arp_tha);
 	arp_h->arp_data.arp_tip = client_info->cli_ip;
 
-	arp_h->arp_hardware = rte_cpu_to_be_16(ARP_HRD_ETHER);
+	arp_h->arp_hardware = rte_cpu_to_be_16(RTE_ARP_HRD_ETHER);
 	arp_h->arp_protocol = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
 	arp_h->arp_hlen = ETHER_ADDR_LEN;
 	arp_h->arp_plen = sizeof(uint32_t);
-	arp_h->arp_opcode = rte_cpu_to_be_16(ARP_OP_REPLY);
+	arp_h->arp_opcode = rte_cpu_to_be_16(RTE_ARP_OP_REPLY);
 
 	slave_idx = client_info->slave_idx;
 	rte_spinlock_unlock(&internals->mode6.lock);
drivers/net/bonding/rte_eth_bond_pmd.c +6 -6
index fa8f81e2b..b5300df12 100644
@@ -492,22 +492,22 @@ static void
 arp_op_name(uint16_t arp_op, char *buf, size_t buf_len)
 {
 	switch (arp_op) {
-	case ARP_OP_REQUEST:
+	case RTE_ARP_OP_REQUEST:
 		strlcpy(buf, "ARP Request", buf_len);
 		return;
-	case ARP_OP_REPLY:
+	case RTE_ARP_OP_REPLY:
 		strlcpy(buf, "ARP Reply", buf_len);
 		return;
-	case ARP_OP_REVREQUEST:
+	case RTE_ARP_OP_REVREQUEST:
 		strlcpy(buf, "Reverse ARP Request", buf_len);
 		return;
-	case ARP_OP_REVREPLY:
+	case RTE_ARP_OP_REVREPLY:
 		strlcpy(buf, "Reverse ARP Reply", buf_len);
 		return;
-	case ARP_OP_INVREQUEST:
+	case RTE_ARP_OP_INVREQUEST:
 		strlcpy(buf, "Peer Identify Request", buf_len);
 		return;
-	case ARP_OP_INVREPLY:
+	case RTE_ARP_OP_INVREPLY:
 		strlcpy(buf, "Peer Identify Reply", buf_len);
 		return;
 	default:
examples/bond/main.c +4 -4
index 24479649e..21a67e531 100644
@@ -385,8 +385,8 @@ static int lcore_main(__attribute__((unused)) void *arg1)
 				arp_hdr = (struct rte_arp_hdr *)(
 					(char *)(eth_hdr + 1) + offset);
 				if (arp_hdr->arp_data.arp_tip == bond_ip) {
-					if (arp_hdr->arp_opcode == rte_cpu_to_be_16(ARP_OP_REQUEST)) {
-						arp_hdr->arp_opcode = rte_cpu_to_be_16(ARP_OP_REPLY);
+					if (arp_hdr->arp_opcode == rte_cpu_to_be_16(RTE_ARP_OP_REQUEST)) {
+						arp_hdr->arp_opcode = rte_cpu_to_be_16(RTE_ARP_OP_REPLY);
 						/* Switch src and dst data and set bonding MAC */
 						ether_addr_copy(&eth_hdr->s_addr, &eth_hdr->d_addr);
 						rte_eth_macaddr_get(BOND_PORT, &eth_hdr->s_addr);
@@ -481,11 +481,11 @@ static void cmd_obj_send_parsed(void *parsed_result,
 
 	arp_hdr = (struct rte_arp_hdr *)(
 		(char *)eth_hdr + sizeof(struct ether_hdr));
-	arp_hdr->arp_hardware = rte_cpu_to_be_16(ARP_HRD_ETHER);
+	arp_hdr->arp_hardware = rte_cpu_to_be_16(RTE_ARP_HRD_ETHER);
 	arp_hdr->arp_protocol = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
 	arp_hdr->arp_hlen = ETHER_ADDR_LEN;
 	arp_hdr->arp_plen = sizeof(uint32_t);
-	arp_hdr->arp_opcode = rte_cpu_to_be_16(ARP_OP_REQUEST);
+	arp_hdr->arp_opcode = rte_cpu_to_be_16(RTE_ARP_OP_REQUEST);
 
 	rte_eth_macaddr_get(BOND_PORT, &arp_hdr->arp_data.arp_sha);
 	arp_hdr->arp_data.arp_sip = bond_ip;
lib/librte_net/rte_arp.c +2 -2
index c80ebc7e1..877874a5e 100644
@@ -35,11 +35,11 @@ rte_net_make_rarp_packet(struct rte_mempool *mpool,
 
 	/* RARP header. */
 	rarp = (struct rte_arp_hdr *)(eth_hdr + 1);
-	rarp->arp_hardware = htons(ARP_HRD_ETHER);
+	rarp->arp_hardware = htons(RTE_ARP_HRD_ETHER);
 	rarp->arp_protocol = htons(ETHER_TYPE_IPv4);
 	rarp->arp_hlen = ETHER_ADDR_LEN;
 	rarp->arp_plen = 4;
-	rarp->arp_opcode  = htons(ARP_OP_REVREQUEST);
+	rarp->arp_opcode  = htons(RTE_ARP_OP_REVREQUEST);
 
 	ether_addr_copy(mac, &rarp->arp_data.arp_sha);
 	ether_addr_copy(mac, &rarp->arp_data.arp_tha);
lib/librte_net/rte_arp.h +7 -7
index c9b5cd49d..a94fa6a00 100644
@@ -33,18 +33,18 @@ struct rte_arp_ipv4 {
  */
 struct rte_arp_hdr {
 	uint16_t arp_hardware;    /* format of hardware address */
-#define ARP_HRD_ETHER     1  /* ARP Ethernet address format */
+#define RTE_ARP_HRD_ETHER     1  /* ARP Ethernet address format */
 
 	uint16_t arp_protocol;    /* format of protocol address */
 	uint8_t  arp_hlen;    /* length of hardware address */
 	uint8_t  arp_plen;    /* length of protocol address */
 	uint16_t arp_opcode;     /* ARP opcode (command) */
-#define	ARP_OP_REQUEST    1 /* request to resolve address */
-#define	ARP_OP_REPLY      2 /* response to previous request */
-#define	ARP_OP_REVREQUEST 3 /* request proto addr given hardware */
-#define	ARP_OP_REVREPLY   4 /* response giving protocol address */
-#define	ARP_OP_INVREQUEST 8 /* request to identify peer */
-#define	ARP_OP_INVREPLY   9 /* response identifying peer */
+#define	RTE_ARP_OP_REQUEST    1 /* request to resolve address */
+#define	RTE_ARP_OP_REPLY      2 /* response to previous request */
+#define	RTE_ARP_OP_REVREQUEST 3 /* request proto addr given hardware */
+#define	RTE_ARP_OP_REVREPLY   4 /* response giving protocol address */
+#define	RTE_ARP_OP_INVREQUEST 8 /* request to identify peer */
+#define	RTE_ARP_OP_INVREPLY   9 /* response identifying peer */
 
 	struct rte_arp_ipv4 arp_data;
 } __attribute__((__packed__));
Signature · 1 line
2.11.0
#63 lore raw

PATCH 3/15 net: add rte prefix to ether structures

In reply to Olivier Matz

Add 'rte_' prefix to structures:
- rename struct ether_addr as struct rte_ether_addr.
- rename struct ether_hdr as struct rte_ether_hdr.
- rename struct vlan_hdr as struct rte_vlan_hdr.
- rename struct vxlan_hdr as struct rte_vxlan_hdr.
- rename struct vxlan_gpe_hdr as struct rte_vxlan_gpe_hdr.

Do not update the command line library to avoid adding a dependency to librte_net.

---
 app/pdump/main.c                                   |   2 +-
 app/test-pipeline/pipeline_acl.c                   |  13 +-
 app/test-pipeline/pipeline_hash.c                  |   4 +-
 app/test-pmd/cmdline.c                             |  50 +++---
 app/test-pmd/cmdline_flow.c                        |   2 +-
 app/test-pmd/config.c                              |  25 +--
 app/test-pmd/csumonly.c                            |  31 ++--
 app/test-pmd/flowgen.c                             |  10 +-
 app/test-pmd/icmpecho.c                            |  18 +--
 app/test-pmd/ieee1588fwd.c                         |   8 +-
 app/test-pmd/macfwd.c                              |   6 +-
 app/test-pmd/macswap.h                             |   6 +-
 app/test-pmd/macswap_common.h                      |   2 +-
 app/test-pmd/macswap_neon.h                        |  12 +-
 app/test-pmd/macswap_sse.h                         |  12 +-
 app/test-pmd/testpmd.c                             |   4 +-
 app/test-pmd/testpmd.h                             |  10 +-
 app/test-pmd/txonly.c                              |  19 +--
 app/test-pmd/util.c                                |  12 +-
 app/test/packet_burst_generator.c                  |  36 +++--
 app/test/packet_burst_generator.h                  |  21 +--
 app/test/test_cmdline_etheraddr.c                  |  14 +-
 app/test/test_event_eth_rx_adapter.c               |   2 +-
 app/test/test_event_eth_tx_adapter.c               |   2 +-
 app/test/test_flow_classify.c                      |  34 ++---
 app/test/test_link_bonding.c                       | 169 ++++++++++++---------
 app/test/test_link_bonding_mode4.c                 |  55 +++----
 app/test/test_link_bonding_rssconf.c               |   2 +-
 app/test/test_pmd_perf.c                           |  10 +-
 app/test/test_sched.c                              |  18 ++-
 app/test/virtual_pmd.c                             |   4 +-
 app/test/virtual_pmd.h                             |   2 +-
 doc/guides/prog_guide/bbdev.rst                    |   6 +-
 doc/guides/sample_app_ug/flow_classify.rst         |  12 +-
 doc/guides/sample_app_ug/flow_filtering.rst        |   6 +-
 doc/guides/sample_app_ug/ipv4_multicast.rst        |   8 +-
 doc/guides/sample_app_ug/l2_forward_job_stats.rst  |   4 +-
 .../sample_app_ug/l2_forward_real_virtual.rst      |   4 +-
 doc/guides/sample_app_ug/l3_forward.rst            |   8 +-
 doc/guides/sample_app_ug/link_status_intr.rst      |   4 +-
 doc/guides/sample_app_ug/ptpclient.rst             |   6 +-
 doc/guides/sample_app_ug/rxtx_callbacks.rst        |   2 +-
 doc/guides/sample_app_ug/server_node_efd.rst       |   4 +-
 doc/guides/sample_app_ug/skeleton.rst              |   2 +-
 doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst   |   4 +-
 drivers/bus/dpaa/include/fman.h                    |   2 +-
 drivers/bus/dpaa/include/netcfg.h                  |   4 +-
 drivers/net/af_packet/rte_eth_af_packet.c          |   2 +-
 drivers/net/af_xdp/rte_eth_af_xdp.c                |   4 +-
 drivers/net/ark/ark_ethdev.c                       |  14 +-
 drivers/net/ark/ark_ext.h                          |   4 +-
 drivers/net/ark/ark_global.h                       |   5 +-
 drivers/net/atlantic/atl_ethdev.c                  |  12 +-
 drivers/net/atlantic/hw_atl/hw_atl_utils.c         |   8 +-
 drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c    |   4 +-
 drivers/net/avp/avp_ethdev.c                       |   6 +-
 drivers/net/axgbe/axgbe_ethdev.h                   |   2 +-
 drivers/net/bnx2x/bnx2x.c                          |   8 +-
 drivers/net/bnx2x/bnx2x_ethdev.c                   |   5 +-
 drivers/net/bnx2x/bnx2x_ethdev.h                   |   3 +-
 drivers/net/bnx2x/bnx2x_vfpf.c                     |   2 +-
 drivers/net/bnx2x/bnx2x_vfpf.h                     |   2 +-
 drivers/net/bnxt/bnxt_ethdev.c                     |   7 +-
 drivers/net/bnxt/bnxt_hwrm.c                       |   4 +-
 drivers/net/bnxt/bnxt_hwrm.h                       |   2 +-
 drivers/net/bnxt/rte_pmd_bnxt.c                    |   6 +-
 drivers/net/bnxt/rte_pmd_bnxt.h                    |   4 +-
 drivers/net/bonding/rte_eth_bond.h                 |   2 +-
 drivers/net/bonding/rte_eth_bond_8023ad.c          |   6 +-
 drivers/net/bonding/rte_eth_bond_8023ad.h          |  10 +-
 drivers/net/bonding/rte_eth_bond_8023ad_private.h  |   2 +-
 drivers/net/bonding/rte_eth_bond_alb.c             |  28 ++--
 drivers/net/bonding/rte_eth_bond_alb.h             |  10 +-
 drivers/net/bonding/rte_eth_bond_api.c             |   2 +-
 drivers/net/bonding/rte_eth_bond_args.c            |   2 +-
 drivers/net/bonding/rte_eth_bond_pmd.c             |  93 +++++++-----
 drivers/net/bonding/rte_eth_bond_private.h         |   8 +-
 drivers/net/cxgbe/base/adapter.h                   |   2 +-
 drivers/net/cxgbe/cxgbe_ethdev.c                   |   2 +-
 drivers/net/cxgbe/cxgbe_pfvf.h                     |   2 +-
 drivers/net/dpaa/dpaa_ethdev.c                     |   4 +-
 drivers/net/dpaa/dpaa_rxtx.c                       |   3 +-
 drivers/net/dpaa2/dpaa2_ethdev.c                   |  19 +--
 drivers/net/dpaa2/dpaa2_flow.c                     |  18 +--
 drivers/net/e1000/em_ethdev.c                      |  17 ++-
 drivers/net/e1000/igb_ethdev.c                     |  26 ++--
 drivers/net/e1000/igb_pf.c                         |   4 +-
 drivers/net/ena/ena_ethdev.c                       |   8 +-
 drivers/net/enetc/enetc_ethdev.c                   |   2 +-
 drivers/net/enic/enic.h                            |   2 +-
 drivers/net/enic/enic_ethdev.c                     |  12 +-
 drivers/net/enic/enic_flow.c                       |  34 ++---
 drivers/net/enic/enic_main.c                       |   4 +-
 drivers/net/failsafe/failsafe.c                    |   2 +-
 drivers/net/failsafe/failsafe_args.c               |   2 +-
 drivers/net/failsafe/failsafe_ether.c              |   2 +-
 drivers/net/failsafe/failsafe_ops.c                |   6 +-
 drivers/net/failsafe/failsafe_private.h            |   4 +-
 drivers/net/fm10k/fm10k_ethdev.c                   |   8 +-
 drivers/net/i40e/i40e_ethdev.c                     |  58 +++----
 drivers/net/i40e/i40e_ethdev.h                     |  21 +--
 drivers/net/i40e/i40e_ethdev_vf.c                  |  32 ++--
 drivers/net/i40e/i40e_fdir.c                       |   8 +-
 drivers/net/i40e/i40e_flow.c                       |   8 +-
 drivers/net/i40e/i40e_pf.c                         |  10 +-
 drivers/net/i40e/i40e_vf_representor.c             |   2 +-
 drivers/net/i40e/rte_pmd_i40e.c                    |  15 +-
 drivers/net/i40e/rte_pmd_i40e.h                    |   8 +-
 drivers/net/iavf/iavf.h                            |   2 +-
 drivers/net/iavf/iavf_ethdev.c                     |  23 +--
 drivers/net/iavf/iavf_vchnl.c                      |   4 +-
 drivers/net/ice/ice_ethdev.c                       |  31 ++--
 drivers/net/ice/ice_ethdev.h                       |   4 +-
 drivers/net/ipn3ke/ipn3ke_ethdev.h                 |   4 +-
 drivers/net/ipn3ke/ipn3ke_representor.c            |   4 +-
 drivers/net/ixgbe/ixgbe_ethdev.c                   |  52 ++++---
 drivers/net/ixgbe/ixgbe_pf.c                       |   2 +-
 drivers/net/ixgbe/ixgbe_vf_representor.c           |   4 +-
 drivers/net/ixgbe/rte_pmd_ixgbe.c                  |   4 +-
 drivers/net/ixgbe/rte_pmd_ixgbe.h                  |   2 +-
 drivers/net/kni/rte_eth_kni.c                      |   2 +-
 drivers/net/liquidio/lio_ethdev.c                  |   3 +-
 drivers/net/mlx4/mlx4.c                            |   2 +-
 drivers/net/mlx4/mlx4.h                            |   8 +-
 drivers/net/mlx4/mlx4_ethdev.c                     |   6 +-
 drivers/net/mlx4/mlx4_flow.c                       |   4 +-
 drivers/net/mlx5/mlx5.c                            |   2 +-
 drivers/net/mlx5/mlx5.h                            |  13 +-
 drivers/net/mlx5/mlx5_flow_dv.c                    |  16 +-
 drivers/net/mlx5/mlx5_flow_tcf.c                   |  10 +-
 drivers/net/mlx5/mlx5_mac.c                        |  10 +-
 drivers/net/mlx5/mlx5_nl.c                         |  14 +-
 drivers/net/mlx5/mlx5_rxtx.h                       |   2 +-
 drivers/net/mlx5/mlx5_trigger.c                    |   4 +-
 drivers/net/mvneta/mvneta_ethdev.c                 |   4 +-
 drivers/net/mvpp2/mrvl_ethdev.c                    |   4 +-
 drivers/net/mvpp2/mrvl_flow.c                      |   2 +-
 drivers/net/netvsc/hn_ethdev.c                     |   2 +-
 drivers/net/netvsc/hn_rxtx.c                       |   4 +-
 drivers/net/netvsc/hn_var.h                        |   4 +-
 drivers/net/netvsc/hn_vf.c                         |   6 +-
 drivers/net/nfb/nfb_ethdev.c                       |   8 +-
 drivers/net/nfp/nfp_net.c                          |   9 +-
 drivers/net/null/rte_eth_null.c                    |   4 +-
 drivers/net/octeontx/octeontx_ethdev.c             |   2 +-
 drivers/net/pcap/rte_eth_pcap.c                    |   4 +-
 drivers/net/qede/qede_ethdev.c                     |  34 +++--
 drivers/net/qede/qede_ethdev.h                     |   6 +-
 drivers/net/qede/qede_filter.c                     |   4 +-
 drivers/net/qede/qede_if.h                         |   2 +-
 drivers/net/qede/qede_rxtx.c                       |  14 +-
 drivers/net/ring/rte_eth_ring.c                    |   4 +-
 drivers/net/sfc/sfc.h                              |   2 +-
 drivers/net/sfc/sfc_ethdev.c                       |  12 +-
 drivers/net/sfc/sfc_port.c                         |   6 +-
 drivers/net/softnic/parser.c                       |  12 +-
 drivers/net/softnic/parser.h                       |   2 +-
 drivers/net/softnic/rte_eth_softnic.c              |   2 +-
 drivers/net/szedata2/rte_eth_szedata2.c            |   6 +-
 drivers/net/tap/rte_eth_tap.c                      |  21 +--
 drivers/net/tap/rte_eth_tap.h                      |   4 +-
 drivers/net/tap/tap_bpf_program.c                  |   8 +-
 drivers/net/thunderx/base/nicvf_plat.h             |   3 +
 drivers/net/thunderx/nicvf_ethdev.c                |   4 +-
 drivers/net/vdev_netvsc/vdev_netvsc.c              |  12 +-
 drivers/net/vhost/rte_eth_vhost.c                  |   8 +-
 drivers/net/virtio/virtio_ethdev.c                 |  18 +--
 drivers/net/virtio/virtio_rxtx.c                   |   4 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c               |   8 +-
 drivers/net/vmxnet3/vmxnet3_rxtx.c                 |   6 +-
 examples/bbdev_app/main.c                          |  39 ++---
 examples/bond/main.c                               |  30 ++--
 examples/distributor/main.c                        |   2 +-
 examples/ethtool/ethtool-app/ethapp.c              |   4 +-
 examples/ethtool/ethtool-app/main.c                |   6 +-
 examples/ethtool/lib/rte_ethtool.c                 |   6 +-
 examples/ethtool/lib/rte_ethtool.h                 |   7 +-
 examples/eventdev_pipeline/main.c                  |   2 +-
 examples/eventdev_pipeline/pipeline_common.h       |   6 +-
 examples/flow_classify/flow_classify.c             |  12 +-
 examples/flow_filtering/main.c                     |   6 +-
 examples/ip_fragmentation/main.c                   |  19 +--
 examples/ip_pipeline/cli.c                         |   4 +-
 examples/ip_pipeline/parser.c                      |  12 +-
 examples/ip_pipeline/parser.h                      |   2 +-
 examples/ip_reassembly/main.c                      |  13 +-
 examples/ipsec-secgw/ipsec-secgw.c                 |  19 +--
 examples/ipsec-secgw/ipsec.h                       |   2 +-
 examples/ipsec-secgw/parser.c                      |   4 +-
 examples/ipv4_multicast/main.c                     |  16 +-
 examples/kni/main.c                                |   8 +-
 examples/l2fwd-cat/l2fwd-cat.c                     |   2 +-
 examples/l2fwd-crypto/main.c                       |  12 +-
 examples/l2fwd-jobstats/main.c                     |   6 +-
 examples/l2fwd-keepalive/main.c                    |   6 +-
 examples/l2fwd/main.c                              |   6 +-
 examples/l3fwd-acl/main.c                          |  20 +--
 examples/l3fwd-power/main.c                        |  16 +-
 examples/l3fwd-vf/main.c                           |  10 +-
 examples/l3fwd/l3fwd.h                             |   2 +-
 examples/l3fwd/l3fwd_altivec.h                     |  12 +-
 examples/l3fwd/l3fwd_em.c                          |   6 +-
 examples/l3fwd/l3fwd_em.h                          |   8 +-
 examples/l3fwd/l3fwd_em_hlm.h                      |  11 +-
 examples/l3fwd/l3fwd_em_hlm_neon.h                 |   8 +-
 examples/l3fwd/l3fwd_em_hlm_sse.h                  |   8 +-
 examples/l3fwd/l3fwd_em_sequential.h               |  11 +-
 examples/l3fwd/l3fwd_lpm.c                         |  14 +-
 examples/l3fwd/l3fwd_lpm.h                         |   8 +-
 examples/l3fwd/l3fwd_lpm_altivec.h                 |  10 +-
 examples/l3fwd/l3fwd_lpm_neon.h                    |  20 +--
 examples/l3fwd/l3fwd_lpm_sse.h                     |  10 +-
 examples/l3fwd/l3fwd_neon.h                        |  12 +-
 examples/l3fwd/l3fwd_sse.h                         |  12 +-
 examples/l3fwd/main.c                              |   8 +-
 examples/link_status_interrupt/main.c              |   6 +-
 examples/load_balancer/runtime.c                   |   6 +-
 .../client_server_mp/mp_server/main.c              |   2 +-
 examples/packet_ordering/main.c                    |   2 +-
 examples/performance-thread/l3fwd-thread/main.c    | 136 ++++++++---------
 examples/ptpclient/ptpclient.c                     |  28 ++--
 examples/qos_meter/main.c                          |   3 +-
 examples/quota_watermark/qw/main.c                 |   6 +-
 examples/rxtx_callbacks/main.c                     |   2 +-
 examples/server_node_efd/node/node.c               |   2 +-
 examples/server_node_efd/server/main.c             |   4 +-
 examples/skeleton/basicfwd.c                       |   2 +-
 examples/tep_termination/main.c                    |   2 +-
 examples/tep_termination/main.h                    |   2 +-
 examples/tep_termination/vxlan.c                   |  44 +++---
 examples/tep_termination/vxlan.h                   |   6 +-
 examples/tep_termination/vxlan_setup.c             |   6 +-
 examples/tep_termination/vxlan_setup.h             |   2 +-
 examples/vhost/main.c                              |  26 ++--
 examples/vhost/main.h                              |   2 +-
 examples/vm_power_manager/channel_monitor.c        |   6 +-
 .../guest_cli/vm_power_cli_guest.c                 |   2 +-
 examples/vm_power_manager/main.c                   |   4 +-
 examples/vmdq/main.c                               |  10 +-
 examples/vmdq_dcb/main.c                           |  10 +-
 lib/librte_ethdev/rte_class_eth.c                  |   2 +-
 lib/librte_ethdev/rte_eth_ctrl.h                   |  12 +-
 lib/librte_ethdev/rte_ethdev.c                     |  20 +--
 lib/librte_ethdev/rte_ethdev.h                     |  13 +-
 lib/librte_ethdev/rte_ethdev_core.h                |  12 +-
 lib/librte_ethdev/rte_flow.h                       |  12 +-
 lib/librte_eventdev/rte_event_eth_rx_adapter.c     |   7 +-
 lib/librte_gro/gro_tcp4.c                          |   4 +-
 lib/librte_gro/gro_tcp4.h                          |   4 +-
 lib/librte_gro/gro_vxlan_tcp4.c                    |  12 +-
 lib/librte_gro/gro_vxlan_tcp4.h                    |   6 +-
 lib/librte_gso/rte_gso.h                           |   4 +-
 lib/librte_kni/rte_kni.c                           |   2 +-
 lib/librte_net/rte_arp.c                           |   7 +-
 lib/librte_net/rte_arp.h                           |   6 +-
 lib/librte_net/rte_ether.h                         |  64 ++++----
 lib/librte_net/rte_net.c                           |  20 +--
 lib/librte_pipeline/rte_table_action.c             |  60 ++++----
 lib/librte_pipeline/rte_table_action.h             |   4 +-
 lib/librte_vhost/vhost.h                           |   2 +-
 lib/librte_vhost/virtio_net.c                      |  11 +-
 261 files changed, 1480 insertions(+), 1372 deletions(-)
app/pdump/main.c +1 -1
index 3d208548f..80dc924cf 100644
@@ -549,7 +549,7 @@ signal_handler(int sig_num)
 static inline int
 configure_vdev(uint16_t port_id)
 {
-	struct ether_addr addr;
+	struct rte_ether_addr addr;
 	const uint16_t rxRings = 0, txRings = 1;
 	int ret;
 	uint16_t q;
app/test-pipeline/pipeline_acl.c +7 -6
index 524d2212d..e53e5ecef 100644
@@ -39,7 +39,7 @@ struct rte_acl_field_def ipv4_field_formats[NUM_FIELDS_IPV4] = {
 		.size = sizeof(uint8_t),
 		.field_index = PROTO_FIELD_IPV4,
 		.input_index = PROTO_FIELD_IPV4,
-		.offset = sizeof(struct ether_hdr) +
+		.offset = sizeof(struct rte_ether_hdr) +
 			offsetof(struct ipv4_hdr, next_proto_id),
 	},
 	{
@@ -47,7 +47,7 @@ struct rte_acl_field_def ipv4_field_formats[NUM_FIELDS_IPV4] = {
 		.size = sizeof(uint32_t),
 		.field_index = SRC_FIELD_IPV4,
 		.input_index = SRC_FIELD_IPV4,
-		.offset = sizeof(struct ether_hdr) +
+		.offset = sizeof(struct rte_ether_hdr) +
 			offsetof(struct ipv4_hdr, src_addr),
 	},
 	{
@@ -55,7 +55,7 @@ struct rte_acl_field_def ipv4_field_formats[NUM_FIELDS_IPV4] = {
 		.size = sizeof(uint32_t),
 		.field_index = DST_FIELD_IPV4,
 		.input_index = DST_FIELD_IPV4,
-		.offset = sizeof(struct ether_hdr) +
+		.offset = sizeof(struct rte_ether_hdr) +
 			offsetof(struct ipv4_hdr, dst_addr),
 	},
 	{
@@ -63,15 +63,16 @@ struct rte_acl_field_def ipv4_field_formats[NUM_FIELDS_IPV4] = {
 		.size = sizeof(uint16_t),
 		.field_index = SRCP_FIELD_IPV4,
 		.input_index = SRCP_FIELD_IPV4,
-		.offset = sizeof(struct ether_hdr) + sizeof(struct ipv4_hdr),
+		.offset = sizeof(struct rte_ether_hdr) +
+			sizeof(struct ipv4_hdr),
 	},
 	{
 		.type = RTE_ACL_FIELD_TYPE_RANGE,
 		.size = sizeof(uint16_t),
 		.field_index = DSTP_FIELD_IPV4,
 		.input_index = SRCP_FIELD_IPV4,
-		.offset = sizeof(struct ether_hdr) + sizeof(struct ipv4_hdr) +
-			sizeof(uint16_t),
+		.offset = sizeof(struct rte_ether_hdr) +
+			sizeof(struct ipv4_hdr) + sizeof(uint16_t),
 	},
 };
 
app/test-pipeline/pipeline_hash.c +2 -2
index c20147234..3e4a0a1bb 100644
@@ -441,14 +441,14 @@ app_main_loop_rx_metadata(void) {
 
 			if (RTE_ETH_IS_IPV4_HDR(m->packet_type)) {
 				ip_hdr = (struct ipv4_hdr *)
-					&m_data[sizeof(struct ether_hdr)];
+					&m_data[sizeof(struct rte_ether_hdr)];
 				ip_dst = ip_hdr->dst_addr;
 
 				k32 = (uint32_t *) key;
 				k32[0] = ip_dst & 0xFFFFFF00;
 			} else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) {
 				ipv6_hdr = (struct ipv6_hdr *)
-					&m_data[sizeof(struct ether_hdr)];
+					&m_data[sizeof(struct rte_ether_hdr)];
 				ipv6_dst = ipv6_hdr->dst_addr;
 
 				memcpy(key, ipv6_dst, 16);
app/test-pmd/cmdline.c +25 -25

162 lines not on this page · raw message

app/test-pmd/cmdline_flow.c +1 -1
index 3070e0e0d..2e274f9b1 100644
@@ -4613,7 +4613,7 @@ parse_mac_addr(struct context *ctx, const struct token *token,
 	       void *buf, unsigned int size)
 {
 	const struct arg *arg = pop_args(ctx);
-	struct ether_addr tmp;
+	struct rte_ether_addr tmp;
 	int ret;
 
 	(void)token;
app/test-pmd/config.c +13 -12
index f9cb12964..03ce502ba 100644
@@ -108,7 +108,7 @@ const struct rss_type_info rss_type_table[] = {
 };
 
 static void
-print_ethaddr(const char *name, struct ether_addr *eth_addr)
+print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
 	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
@@ -391,7 +391,7 @@ void
 port_infos_display(portid_t port_id)
 {
 	struct rte_port *port;
-	struct ether_addr mac_addr;
+	struct rte_ether_addr mac_addr;
 	struct rte_eth_link link;
 	struct rte_eth_dev_info dev_info;
 	int vlan_offload;
@@ -538,7 +538,7 @@ port_summary_header_display(void)
 void
 port_summary_display(portid_t port_id)
 {
-	struct ether_addr mac_addr;
+	struct rte_ether_addr mac_addr;
 	struct rte_eth_link link;
 	struct rte_eth_dev_info dev_info;
 	char name[RTE_ETH_NAME_MAX_LEN];
@@ -2519,7 +2519,8 @@ set_tx_pkt_segments(unsigned *seg_lengths, unsigned nb_segs)
 	 * Check that each segment length is greater or equal than
 	 * the mbuf data sise.
 	 * Check also that the total packet length is greater or equal than the
-	 * size of an empty UDP/IP packet (sizeof(struct ether_hdr) + 20 + 8).
+	 * size of an empty UDP/IP packet (sizeof(struct rte_ether_hdr) +
+	 * 20 + 8).
 	 */
 	tx_pkt_len = 0;
 	for (i = 0; i < nb_segs; i++) {
@@ -2530,10 +2531,10 @@ set_tx_pkt_segments(unsigned *seg_lengths, unsigned nb_segs)
 		}
 		tx_pkt_len = (uint16_t)(tx_pkt_len + seg_lengths[i]);
 	}
-	if (tx_pkt_len < (sizeof(struct ether_hdr) + 20 + 8)) {
+	if (tx_pkt_len < (sizeof(struct rte_ether_hdr) + 20 + 8)) {
 		printf("total packet length=%u < %d - give up\n",
 				(unsigned) tx_pkt_len,
-				(int)(sizeof(struct ether_hdr) + 20 + 8));
+				(int)(sizeof(struct rte_ether_hdr) + 20 + 8));
 		return;
 	}
 
@@ -3453,7 +3454,7 @@ set_vf_rate_limit(portid_t port_id, uint16_t vf, uint16_t rate, uint64_t q_msk)
 static int
 mcast_addr_pool_extend(struct rte_port *port)
 {
-	struct ether_addr *mc_pool;
+	struct rte_ether_addr *mc_pool;
 	size_t mc_pool_size;
 
 	/*
@@ -3470,9 +3471,9 @@ mcast_addr_pool_extend(struct rte_port *port)
 	 * The previous test guarantees that port->mc_addr_nb is a multiple
 	 * of MCAST_POOL_INC.
 	 */
-	mc_pool_size = sizeof(struct ether_addr) * (port->mc_addr_nb +
+	mc_pool_size = sizeof(struct rte_ether_addr) * (port->mc_addr_nb +
 						    MCAST_POOL_INC);
-	mc_pool = (struct ether_addr *) realloc(port->mc_addr_pool,
+	mc_pool = (struct rte_ether_addr *) realloc(port->mc_addr_pool,
 						mc_pool_size);
 	if (mc_pool == NULL) {
 		printf("allocation of pool of %u multicast addresses failed\n",
@@ -3501,7 +3502,7 @@ mcast_addr_pool_remove(struct rte_port *port, uint32_t addr_idx)
 	}
 	memmove(&port->mc_addr_pool[addr_idx],
 		&port->mc_addr_pool[addr_idx + 1],
-		sizeof(struct ether_addr) * (port->mc_addr_nb - addr_idx));
+		sizeof(struct rte_ether_addr) * (port->mc_addr_nb - addr_idx));
 }
 
 static void
@@ -3520,7 +3521,7 @@ eth_port_multicast_addr_list_set(portid_t port_id)
 }
 
 void
-mcast_addr_add(portid_t port_id, struct ether_addr *mc_addr)
+mcast_addr_add(portid_t port_id, struct rte_ether_addr *mc_addr)
 {
 	struct rte_port *port;
 	uint32_t i;
@@ -3548,7 +3549,7 @@ mcast_addr_add(portid_t port_id, struct ether_addr *mc_addr)
 }
 
 void
-mcast_addr_remove(portid_t port_id, struct ether_addr *mc_addr)
+mcast_addr_remove(portid_t port_id, struct rte_ether_addr *mc_addr)
 {
 	struct rte_port *port;
 	uint32_t i;
app/test-pmd/csumonly.c +16 -15
index f4f2a7b29..481b91a26 100644
@@ -142,18 +142,19 @@ parse_ipv6(struct ipv6_hdr *ipv6_hdr, struct testpmd_offload_info *info)
  * header. The l4_len argument is only set in case of TCP (useful for TSO).
  */
 static void
-parse_ethernet(struct ether_hdr *eth_hdr, struct testpmd_offload_info *info)
+parse_ethernet(struct rte_ether_hdr *eth_hdr, struct testpmd_offload_info *info)
 {
 	struct ipv4_hdr *ipv4_hdr;
 	struct ipv6_hdr *ipv6_hdr;
 
-	info->l2_len = sizeof(struct ether_hdr);
+	info->l2_len = sizeof(struct rte_ether_hdr);
 	info->ethertype = eth_hdr->ether_type;
 
 	if (info->ethertype == _htons(ETHER_TYPE_VLAN)) {
-		struct vlan_hdr *vlan_hdr = (struct vlan_hdr *)(eth_hdr + 1);
+		struct rte_vlan_hdr *vlan_hdr = (
+			struct rte_vlan_hdr *)(eth_hdr + 1);
 
-		info->l2_len  += sizeof(struct vlan_hdr);
+		info->l2_len  += sizeof(struct rte_vlan_hdr);
 		info->ethertype = vlan_hdr->eth_proto;
 	}
 
@@ -180,7 +181,7 @@ parse_vxlan(struct udp_hdr *udp_hdr,
 	    struct testpmd_offload_info *info,
 	    uint32_t pkt_type)
 {
-	struct ether_hdr *eth_hdr;
+	struct rte_ether_hdr *eth_hdr;
 
 	/* check udp destination port, 4789 is the default vxlan port
 	 * (rfc7348) or that the rx offload flag is set (i40e only
@@ -195,9 +196,9 @@ parse_vxlan(struct udp_hdr *udp_hdr,
 	info->outer_l3_len = info->l3_len;
 	info->outer_l4_proto = info->l4_proto;
 
-	eth_hdr = (struct ether_hdr *)((char *)udp_hdr +
+	eth_hdr = (struct rte_ether_hdr *)((char *)udp_hdr +
 		sizeof(struct udp_hdr) +
-		sizeof(struct vxlan_hdr));
+		sizeof(struct rte_vxlan_hdr));
 
 	parse_ethernet(eth_hdr, info);
 	info->l2_len += ETHER_VXLAN_HLEN; /* add udp + vxlan */
@@ -208,17 +209,17 @@ static void
 parse_vxlan_gpe(struct udp_hdr *udp_hdr,
 	    struct testpmd_offload_info *info)
 {
-	struct ether_hdr *eth_hdr;
+	struct rte_ether_hdr *eth_hdr;
 	struct ipv4_hdr *ipv4_hdr;
 	struct ipv6_hdr *ipv6_hdr;
-	struct vxlan_gpe_hdr *vxlan_gpe_hdr;
+	struct rte_vxlan_gpe_hdr *vxlan_gpe_hdr;
 	uint8_t vxlan_gpe_len = sizeof(*vxlan_gpe_hdr);
 
 	/* Check udp destination port. */
 	if (udp_hdr->dst_port != _htons(vxlan_gpe_udp_port))
 		return;
 
-	vxlan_gpe_hdr = (struct vxlan_gpe_hdr *)((char *)udp_hdr +
+	vxlan_gpe_hdr = (struct rte_vxlan_gpe_hdr *)((char *)udp_hdr +
 				sizeof(struct udp_hdr));
 
 	if (!vxlan_gpe_hdr->proto || vxlan_gpe_hdr->proto ==
@@ -257,7 +258,7 @@ parse_vxlan_gpe(struct udp_hdr *udp_hdr,
 		info->outer_l3_len = info->l3_len;
 		info->outer_l4_proto = info->l4_proto;
 
-		eth_hdr = (struct ether_hdr *)((char *)vxlan_gpe_hdr +
+		eth_hdr = (struct rte_ether_hdr *)((char *)vxlan_gpe_hdr +
 			  vxlan_gpe_len);
 
 		parse_ethernet(eth_hdr, info);
@@ -271,7 +272,7 @@ parse_vxlan_gpe(struct udp_hdr *udp_hdr,
 static void
 parse_gre(struct simple_gre_hdr *gre_hdr, struct testpmd_offload_info *info)
 {
-	struct ether_hdr *eth_hdr;
+	struct rte_ether_hdr *eth_hdr;
 	struct ipv4_hdr *ipv4_hdr;
 	struct ipv6_hdr *ipv6_hdr;
 	uint8_t gre_len = 0;
@@ -318,7 +319,7 @@ parse_gre(struct simple_gre_hdr *gre_hdr, struct testpmd_offload_info *info)
 		info->outer_l3_len = info->l3_len;
 		info->outer_l4_proto = info->l4_proto;
 
-		eth_hdr = (struct ether_hdr *)((char *)gre_hdr + gre_len);
+		eth_hdr = (struct rte_ether_hdr *)((char *)gre_hdr + gre_len);
 
 		parse_ethernet(eth_hdr, info);
 	} else
@@ -691,7 +692,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 	struct rte_mbuf **tx_pkts_burst;
 	struct rte_port *txp;
 	struct rte_mbuf *m, *p;
-	struct ether_hdr *eth_hdr;
+	struct rte_ether_hdr *eth_hdr;
 	void *l3_hdr = NULL, *outer_l3_hdr = NULL; /* can be IPv4 or IPv6 */
 	void **gro_ctx;
 	uint16_t gro_pkts_num;
@@ -765,7 +766,7 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 		/* step 1: dissect packet, parsing optional vlan, ip4/ip6, vxlan
 		 * and inner headers */
 
-		eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);
+		eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
 		ether_addr_copy(&peer_eth_addrs[fs->peer_addr],
 				&eth_hdr->d_addr);
 		ether_addr_copy(&ports[fs->tx_port].eth_addr,
app/test-pmd/flowgen.c +5 -5
index 3214e3c95..ac56ca1d8 100644
@@ -76,9 +76,9 @@ static uint32_t cfg_ip_src	= IPv4(10, 254, 0, 0);
 static uint32_t cfg_ip_dst	= IPv4(10, 253, 0, 0);
 static uint16_t cfg_udp_src	= 1000;
 static uint16_t cfg_udp_dst	= 1001;
-static struct ether_addr cfg_ether_src	=
+static struct rte_ether_addr cfg_ether_src =
 	{{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x00 }};
-static struct ether_addr cfg_ether_dst	=
+static struct rte_ether_addr cfg_ether_dst =
 	{{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x01 }};
 
 #define IP_DEFTTL  64   /* from RFC 1340. */
@@ -119,7 +119,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 	struct rte_mbuf  *pkts_burst[MAX_PKT_BURST];
 	struct rte_mempool *mbp;
 	struct rte_mbuf  *pkt;
-	struct ether_hdr *eth_hdr;
+	struct rte_ether_hdr *eth_hdr;
 	struct ipv4_hdr *ip_hdr;
 	struct udp_hdr *udp_hdr;
 	uint16_t vlan_tci, vlan_tci_outer;
@@ -170,7 +170,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 		pkt->next = NULL;
 
 		/* Initialize Ethernet header. */
-		eth_hdr = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
+		eth_hdr = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
 		ether_addr_copy(&cfg_ether_dst, &eth_hdr->d_addr);
 		ether_addr_copy(&cfg_ether_src, &eth_hdr->s_addr);
 		eth_hdr->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
@@ -205,7 +205,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 		pkt->ol_flags		= ol_flags;
 		pkt->vlan_tci		= vlan_tci;
 		pkt->vlan_tci_outer	= vlan_tci_outer;
-		pkt->l2_len		= sizeof(struct ether_hdr);
+		pkt->l2_len		= sizeof(struct rte_ether_hdr);
 		pkt->l3_len		= sizeof(struct ipv4_hdr);
 		pkts_burst[nb_pkt]	= pkt;
 
app/test-pmd/icmpecho.c +9 -9
index b0767f22b..3cc4d25a4 100644
@@ -221,7 +221,7 @@ ipv4_addr_to_dot(uint32_t be_ipv4_addr, char *buf)
 }
 
 static void
-ether_addr_dump(const char *what, const struct ether_addr *ea)
+ether_addr_dump(const char *what, const struct rte_ether_addr *ea)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
 
@@ -275,12 +275,12 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 {
 	struct rte_mbuf *pkts_burst[MAX_PKT_BURST];
 	struct rte_mbuf *pkt;
-	struct ether_hdr *eth_h;
-	struct vlan_hdr *vlan_h;
+	struct rte_ether_hdr *eth_h;
+	struct rte_vlan_hdr *vlan_h;
 	struct rte_arp_hdr  *arp_h;
 	struct ipv4_hdr *ip_h;
 	struct icmp_hdr *icmp_h;
-	struct ether_addr eth_addr;
+	struct rte_ether_addr eth_addr;
 	uint32_t retry;
 	uint32_t ip_addr;
 	uint16_t nb_rx;
@@ -321,9 +321,9 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 			rte_prefetch0(rte_pktmbuf_mtod(pkts_burst[i + 1],
 						       void *));
 		pkt = pkts_burst[i];
-		eth_h = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
+		eth_h = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
 		eth_type = RTE_BE_TO_CPU_16(eth_h->ether_type);
-		l2_len = sizeof(struct ether_hdr);
+		l2_len = sizeof(struct rte_ether_hdr);
 		if (verbose_level > 0) {
 			printf("\nPort %d pkt-len=%u nb-segs=%u\n",
 			       fs->rx_port, pkt->pkt_len, pkt->nb_segs);
@@ -331,9 +331,9 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 			ether_addr_dump(" dst=", &eth_h->d_addr);
 		}
 		if (eth_type == ETHER_TYPE_VLAN) {
-			vlan_h = (struct vlan_hdr *)
-				((char *)eth_h + sizeof(struct ether_hdr));
-			l2_len  += sizeof(struct vlan_hdr);
+			vlan_h = (struct rte_vlan_hdr *)
+				((char *)eth_h + sizeof(struct rte_ether_hdr));
+			l2_len  += sizeof(struct rte_vlan_hdr);
 			eth_type = rte_be_to_cpu_16(vlan_h->eth_proto);
 			if (verbose_level > 0) {
 				vlan_id = rte_be_to_cpu_16(vlan_h->vlan_tci)
app/test-pmd/ieee1588fwd.c +4 -4
index 6ae802c86..c6aa3c618 100644
@@ -93,8 +93,8 @@ static void
 ieee1588_packet_fwd(struct fwd_stream *fs)
 {
 	struct rte_mbuf  *mb;
-	struct ether_hdr *eth_hdr;
-	struct ether_addr addr;
+	struct rte_ether_hdr *eth_hdr;
+	struct rte_ether_addr addr;
 	struct ptpv2_msg *ptp_hdr;
 	uint16_t eth_type;
 	uint32_t timesync_index;
@@ -111,7 +111,7 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	 * Check that the received packet is a PTP packet that was detected
 	 * by the hardware.
 	 */
-	eth_hdr = rte_pktmbuf_mtod(mb, struct ether_hdr *);
+	eth_hdr = rte_pktmbuf_mtod(mb, struct rte_ether_hdr *);
 	eth_type = rte_be_to_cpu_16(eth_hdr->ether_type);
 
 	if (! (mb->ol_flags & PKT_RX_IEEE1588_PTP)) {
@@ -141,7 +141,7 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	 * PTP_SYNC_MESSAGE.
 	 */
 	ptp_hdr = (struct ptpv2_msg *) (rte_pktmbuf_mtod(mb, char *) +
-					sizeof(struct ether_hdr));
+					sizeof(struct rte_ether_hdr));
 	if (ptp_hdr->version != 0x02) {
 		printf("Port %u Received PTP V2 Ethernet frame with wrong PTP"
 		       " protocol version 0x%x (should be 0x02)\n",
app/test-pmd/macfwd.c +3 -3
index 7cac757a0..631f86f3e 100644
@@ -49,7 +49,7 @@ pkt_burst_mac_forward(struct fwd_stream *fs)
 	struct rte_mbuf  *pkts_burst[MAX_PKT_BURST];
 	struct rte_port  *txp;
 	struct rte_mbuf  *mb;
-	struct ether_hdr *eth_hdr;
+	struct rte_ether_hdr *eth_hdr;
 	uint32_t retry;
 	uint16_t nb_rx;
 	uint16_t nb_tx;
@@ -91,14 +91,14 @@ pkt_burst_mac_forward(struct fwd_stream *fs)
 			rte_prefetch0(rte_pktmbuf_mtod(pkts_burst[i + 1],
 						       void *));
 		mb = pkts_burst[i];
-		eth_hdr = rte_pktmbuf_mtod(mb, struct ether_hdr *);
+		eth_hdr = rte_pktmbuf_mtod(mb, struct rte_ether_hdr *);
 		ether_addr_copy(&peer_eth_addrs[fs->peer_addr],
 				&eth_hdr->d_addr);
 		ether_addr_copy(&ports[fs->tx_port].eth_addr,
 				&eth_hdr->s_addr);
 		mb->ol_flags &= IND_ATTACHED_MBUF | EXT_ATTACHED_MBUF;
 		mb->ol_flags |= ol_flags;
-		mb->l2_len = sizeof(struct ether_hdr);
+		mb->l2_len = sizeof(struct rte_ether_hdr);
 		mb->l3_len = sizeof(struct ipv4_hdr);
 		mb->vlan_tci = txp->tx_vlan_id;
 		mb->vlan_tci_outer = txp->tx_vlan_id_outer;
app/test-pmd/macswap.h +3 -3
index bfa9b0eda..d53e5d482 100644
@@ -11,9 +11,9 @@ static inline void
 do_macswap(struct rte_mbuf *pkts[], uint16_t nb,
 		struct rte_port *txp)
 {
-	struct ether_hdr *eth_hdr;
+	struct rte_ether_hdr *eth_hdr;
 	struct rte_mbuf *mb;
-	struct ether_addr addr;
+	struct rte_ether_addr addr;
 	uint64_t ol_flags;
 	int i;
 
@@ -26,7 +26,7 @@ do_macswap(struct rte_mbuf *pkts[], uint16_t nb,
 			rte_prefetch0(rte_pktmbuf_mtod(pkts[i+1], void *));
 		mb = pkts[i];
 
-		eth_hdr = rte_pktmbuf_mtod(mb, struct ether_hdr *);
+		eth_hdr = rte_pktmbuf_mtod(mb, struct rte_ether_hdr *);
 
 		/* Swap dest and src mac addresses. */
 		ether_addr_copy(&eth_hdr->d_addr, &addr);
app/test-pmd/macswap_common.h +1 -1
index 19754cdd1..56f86baad 100644
@@ -39,7 +39,7 @@ mbuf_field_set(struct rte_mbuf *mb, uint64_t ol_flags)
 {
 	mb->ol_flags &= IND_ATTACHED_MBUF | EXT_ATTACHED_MBUF;
 	mb->ol_flags |= ol_flags;
-	mb->l2_len = sizeof(struct ether_hdr);
+	mb->l2_len = sizeof(struct rte_ether_hdr);
 	mb->l3_len = sizeof(struct ipv4_hdr);
 }
 
app/test-pmd/macswap_neon.h +6 -6
index bdf416aa2..df6c260cd 100644
@@ -16,7 +16,7 @@ static inline void
 do_macswap(struct rte_mbuf *pkts[], uint16_t nb,
 		struct rte_port *txp)
 {
-	struct ether_hdr *eth_hdr[4];
+	struct rte_ether_hdr *eth_hdr[4];
 	struct rte_mbuf *mb[4];
 	uint64_t ol_flags;
 	int i;
@@ -46,16 +46,16 @@ do_macswap(struct rte_mbuf *pkts[], uint16_t nb,
 		}
 
 		mb[0] = pkts[i++];
-		eth_hdr[0] = rte_pktmbuf_mtod(mb[0], struct ether_hdr *);
+		eth_hdr[0] = rte_pktmbuf_mtod(mb[0], struct rte_ether_hdr *);
 
 		mb[1] = pkts[i++];
-		eth_hdr[1] = rte_pktmbuf_mtod(mb[1], struct ether_hdr *);
+		eth_hdr[1] = rte_pktmbuf_mtod(mb[1], struct rte_ether_hdr *);
 
 		mb[2] = pkts[i++];
-		eth_hdr[2] = rte_pktmbuf_mtod(mb[2], struct ether_hdr *);
+		eth_hdr[2] = rte_pktmbuf_mtod(mb[2], struct rte_ether_hdr *);
 
 		mb[3] = pkts[i++];
-		eth_hdr[3] = rte_pktmbuf_mtod(mb[3], struct ether_hdr *);
+		eth_hdr[3] = rte_pktmbuf_mtod(mb[3], struct rte_ether_hdr *);
 
 		v0 = vld1q_u8((uint8_t const *)eth_hdr[0]);
 		v1 = vld1q_u8((uint8_t const *)eth_hdr[1]);
@@ -83,7 +83,7 @@ do_macswap(struct rte_mbuf *pkts[], uint16_t nb,
 		if (i < nb - 1)
 			rte_prefetch0(rte_pktmbuf_mtod(pkts[i+1], void *));
 		mb[0] = pkts[i];
-		eth_hdr[0] = rte_pktmbuf_mtod(mb[0], struct ether_hdr *);
+		eth_hdr[0] = rte_pktmbuf_mtod(mb[0], struct rte_ether_hdr *);
 
 		/* Swap dest and src mac addresses. */
 		v0 = vld1q_u8((uint8_t const *)eth_hdr[0]);
app/test-pmd/macswap_sse.h +6 -6
index 2b6e7324d..223f87a53 100644
@@ -11,7 +11,7 @@ static inline void
 do_macswap(struct rte_mbuf *pkts[], uint16_t nb,
 		struct rte_port *txp)
 {
-	struct ether_hdr *eth_hdr[4];
+	struct rte_ether_hdr *eth_hdr[4];
 	struct rte_mbuf *mb[4];
 	uint64_t ol_flags;
 	int i;
@@ -43,20 +43,20 @@ do_macswap(struct rte_mbuf *pkts[], uint16_t nb,
 		}
 
 		mb[0] = pkts[i++];
-		eth_hdr[0] = rte_pktmbuf_mtod(mb[0], struct ether_hdr *);
+		eth_hdr[0] = rte_pktmbuf_mtod(mb[0], struct rte_ether_hdr *);
 		addr0 = _mm_loadu_si128((__m128i *)eth_hdr[0]);
 
 		mb[1] = pkts[i++];
-		eth_hdr[1] = rte_pktmbuf_mtod(mb[1], struct ether_hdr *);
+		eth_hdr[1] = rte_pktmbuf_mtod(mb[1], struct rte_ether_hdr *);
 		addr1 = _mm_loadu_si128((__m128i *)eth_hdr[1]);
 
 
 		mb[2] = pkts[i++];
-		eth_hdr[2] = rte_pktmbuf_mtod(mb[2], struct ether_hdr *);
+		eth_hdr[2] = rte_pktmbuf_mtod(mb[2], struct rte_ether_hdr *);
 		addr2 = _mm_loadu_si128((__m128i *)eth_hdr[2]);
 
 		mb[3] = pkts[i++];
-		eth_hdr[3] = rte_pktmbuf_mtod(mb[3], struct ether_hdr *);
+		eth_hdr[3] = rte_pktmbuf_mtod(mb[3], struct rte_ether_hdr *);
 		addr3 = _mm_loadu_si128((__m128i *)eth_hdr[3]);
 
 		addr0 = _mm_shuffle_epi8(addr0, shfl_msk);
@@ -80,7 +80,7 @@ do_macswap(struct rte_mbuf *pkts[], uint16_t nb,
 		if (i < nb - 1)
 			rte_prefetch0(rte_pktmbuf_mtod(pkts[i+1], void *));
 		mb[0] = pkts[i];
-		eth_hdr[0] = rte_pktmbuf_mtod(mb[0], struct ether_hdr *);
+		eth_hdr[0] = rte_pktmbuf_mtod(mb[0], struct rte_ether_hdr *);
 
 		/* Swap dest and src mac addresses. */
 		addr0 = _mm_loadu_si128((__m128i *)eth_hdr[0]);
app/test-pmd/testpmd.c +2 -2
index f0061d99f..2c736ecac 100644
@@ -137,7 +137,7 @@ uint8_t txring_numa[RTE_MAX_ETHPORTS];
  * Must be instantiated with the ethernet addresses of peer traffic generator
  * ports.
  */
-struct ether_addr peer_eth_addrs[RTE_MAX_ETHPORTS];
+struct rte_ether_addr peer_eth_addrs[RTE_MAX_ETHPORTS];
 portid_t nb_peer_eth_addrs = 0;
 
 /*
@@ -2018,7 +2018,7 @@ start_port(portid_t pid)
 	portid_t pi;
 	queueid_t qi;
 	struct rte_port *port;
-	struct ether_addr mac_addr;
+	struct rte_ether_addr mac_addr;
 
 	if (port_id_is_invalid(pid, ENABLED_WARN))
 		return 0;
app/test-pmd/testpmd.h +5 -5
index 1d9b7a245..abee0a952 100644
@@ -162,7 +162,7 @@ struct softnic_port {
 struct rte_port {
 	struct rte_eth_dev_info dev_info;   /**< PCI info + driver name */
 	struct rte_eth_conf     dev_conf;   /**< Port configuration. */
-	struct ether_addr       eth_addr;   /**< Port ethernet address */
+	struct rte_ether_addr       eth_addr;   /**< Port ethernet address */
 	struct rte_eth_stats    stats;      /**< Last port statistics */
 	unsigned int            socket_id;  /**< For NUMA support */
 	uint16_t		parse_tunnel:1; /**< Parse internal headers */
@@ -182,7 +182,7 @@ struct rte_port {
 	uint16_t                nb_tx_desc[MAX_QUEUE_ID+1]; /**< per queue tx desc number */
 	struct rte_eth_rxconf   rx_conf[MAX_QUEUE_ID+1]; /**< per queue rx configuration */
 	struct rte_eth_txconf   tx_conf[MAX_QUEUE_ID+1]; /**< per queue tx configuration */
-	struct ether_addr       *mc_addr_pool; /**< pool of multicast addrs */
+	struct rte_ether_addr   *mc_addr_pool; /**< pool of multicast addrs */
 	uint32_t                mc_addr_nb; /**< nb. of addr. in mc_addr_pool */
 	uint8_t                 slave_flag; /**< bonding slave port */
 	struct port_flow        *flow_list; /**< Associated flows. */
@@ -460,7 +460,7 @@ extern struct fwd_stream **fwd_streams;
 extern uint16_t vxlan_gpe_udp_port; /**< UDP port of tunnel VXLAN-GPE. */
 
 extern portid_t nb_peer_eth_addrs; /**< Number of peer ethernet addresses. */
-extern struct ether_addr peer_eth_addrs[RTE_MAX_ETHPORTS];
+extern struct rte_ether_addr peer_eth_addrs[RTE_MAX_ETHPORTS];
 
 extern uint32_t burst_tx_delay_time; /**< Burst tx delay time(us) for mac-retry. */
 extern uint32_t burst_tx_retry_num;  /**< Burst tx retry number for mac-retry. */
@@ -819,8 +819,8 @@ void show_gro(portid_t port_id);
 void setup_gso(const char *mode, portid_t port_id);
 
 /* Functions to manage the set of filtered Multicast MAC addresses */
-void mcast_addr_add(portid_t port_id, struct ether_addr *mc_addr);
-void mcast_addr_remove(portid_t port_id, struct ether_addr *mc_addr);
+void mcast_addr_add(portid_t port_id, struct rte_ether_addr *mc_addr);
+void mcast_addr_remove(portid_t port_id, struct rte_ether_addr *mc_addr);
 void port_dcb_info_display(portid_t port_id);
 
 uint8_t *open_file(const char *file_path, uint32_t *size);
app/test-pmd/txonly.c +10 -9
index fdfca14cb..e558b4018 100644
@@ -152,7 +152,7 @@ setup_pkt_udp_ip_headers(struct ipv4_hdr *ip_hdr,
 
 static inline bool
 pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
-		struct ether_hdr *eth_hdr, const uint16_t vlan_tci,
+		struct rte_ether_hdr *eth_hdr, const uint16_t vlan_tci,
 		const uint16_t vlan_tci_outer, const uint64_t ol_flags)
 {
 	struct rte_mbuf *pkt_segs[RTE_MAX_SEGS_PER_PKT];
@@ -176,7 +176,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
 	pkt->ol_flags = ol_flags;
 	pkt->vlan_tci = vlan_tci;
 	pkt->vlan_tci_outer = vlan_tci_outer;
-	pkt->l2_len = sizeof(struct ether_hdr);
+	pkt->l2_len = sizeof(struct rte_ether_hdr);
 	pkt->l3_len = sizeof(struct ipv4_hdr);
 
 	pkt_len = pkt->data_len;
@@ -193,14 +193,14 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
 	 */
 	copy_buf_to_pkt(eth_hdr, sizeof(*eth_hdr), pkt, 0);
 	copy_buf_to_pkt(&pkt_ip_hdr, sizeof(pkt_ip_hdr), pkt,
-			sizeof(struct ether_hdr));
+			sizeof(struct rte_ether_hdr));
 	if (txonly_multi_flow) {
 		struct ipv4_hdr *ip_hdr;
 		uint32_t addr;
 
 		ip_hdr = rte_pktmbuf_mtod_offset(pkt,
 				struct ipv4_hdr *,
-				sizeof(struct ether_hdr));
+				sizeof(struct rte_ether_hdr));
 		/*
 		 * Generate multiple flows by varying IP src addr. This
 		 * enables packets are well distributed by RSS in
@@ -212,7 +212,7 @@ pkt_burst_prepare(struct rte_mbuf *pkt, struct rte_mempool *mbp,
 		ip_hdr->src_addr = rte_cpu_to_be_32(addr);
 	}
 	copy_buf_to_pkt(&pkt_udp_hdr, sizeof(pkt_udp_hdr), pkt,
-			sizeof(struct ether_hdr) +
+			sizeof(struct rte_ether_hdr) +
 			sizeof(struct ipv4_hdr));
 	/*
 	 * Complete first mbuf of packet and append it to the
@@ -234,7 +234,7 @@ pkt_burst_transmit(struct fwd_stream *fs)
 	struct rte_port *txp;
 	struct rte_mbuf *pkt;
 	struct rte_mempool *mbp;
-	struct ether_hdr eth_hdr;
+	struct rte_ether_hdr eth_hdr;
 	uint16_t nb_tx;
 	uint16_t nb_pkt;
 	uint16_t vlan_tci, vlan_tci_outer;
@@ -347,9 +347,10 @@ tx_only_begin(__attribute__((unused)) portid_t pi)
 {
 	uint16_t pkt_data_len;
 
-	pkt_data_len = (uint16_t) (tx_pkt_length - (sizeof(struct ether_hdr) +
-						    sizeof(struct ipv4_hdr) +
-						    sizeof(struct udp_hdr)));
+	pkt_data_len = (uint16_t) (tx_pkt_length - (
+					sizeof(struct rte_ether_hdr) +
+					sizeof(struct ipv4_hdr) +
+					sizeof(struct udp_hdr)));
 	setup_pkt_udp_ip_headers(&pkt_ip_hdr, &pkt_udp_hdr, pkt_data_len);
 }
 
app/test-pmd/util.c +6 -6
index 6b0791daa..0544b8e53 100644
@@ -14,7 +14,7 @@
 #include "testpmd.h"
 
 static inline void
-print_ether_addr(const char *what, struct ether_addr *eth_addr)
+print_ether_addr(const char *what, struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
 	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
@@ -26,7 +26,7 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 	      uint16_t nb_pkts, int is_rx)
 {
 	struct rte_mbuf  *mb;
-	struct ether_hdr *eth_hdr;
+	struct rte_ether_hdr *eth_hdr;
 	uint16_t eth_type;
 	uint64_t ol_flags;
 	uint16_t i, packet_type;
@@ -46,7 +46,7 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 	       (unsigned int) nb_pkts);
 	for (i = 0; i < nb_pkts; i++) {
 		mb = pkts[i];
-		eth_hdr = rte_pktmbuf_mtod(mb, struct ether_hdr *);
+		eth_hdr = rte_pktmbuf_mtod(mb, struct rte_ether_hdr *);
 		eth_type = RTE_BE_TO_CPU_16(eth_hdr->ether_type);
 		ol_flags = mb->ol_flags;
 		packet_type = mb->packet_type;
@@ -110,9 +110,9 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 			uint8_t l3_len;
 			uint8_t l4_len;
 			uint8_t l4_proto;
-			struct  vxlan_hdr *vxlan_hdr;
+			struct  rte_vxlan_hdr *vxlan_hdr;
 
-			l2_len  = sizeof(struct ether_hdr);
+			l2_len  = sizeof(struct rte_ether_hdr);
 
 			/* Do not support ipv4 option field */
 			if (RTE_ETH_IS_IPV4_HDR(packet_type)) {
@@ -134,7 +134,7 @@ dump_pkt_burst(uint16_t port_id, uint16_t queue, struct rte_mbuf *pkts[],
 				l2_len + l3_len);
 				l4_len = sizeof(struct udp_hdr);
 				vxlan_hdr = rte_pktmbuf_mtod_offset(mb,
-				struct vxlan_hdr *,
+				struct rte_vxlan_hdr *,
 				l2_len + l3_len + l4_len);
 				udp_port = RTE_BE_TO_CPU_16(udp_hdr->dst_port);
 				vx_vni = rte_be_to_cpu_32(vxlan_hdr->vx_vni);
app/test/packet_burst_generator.c +20 -16
index ccc0bd591..a05e3c86c 100644
@@ -53,16 +53,17 @@ copy_buf_to_pkt(void *buf, unsigned len, struct rte_mbuf *pkt, unsigned offset)
 }
 
 void
-initialize_eth_header(struct ether_hdr *eth_hdr, struct ether_addr *src_mac,
-		struct ether_addr *dst_mac, uint16_t ether_type,
+initialize_eth_header(struct rte_ether_hdr *eth_hdr,
+		struct rte_ether_addr *src_mac,
+		struct rte_ether_addr *dst_mac, uint16_t ether_type,
 		uint8_t vlan_enabled, uint16_t van_id)
 {
 	ether_addr_copy(dst_mac, &eth_hdr->d_addr);
 	ether_addr_copy(src_mac, &eth_hdr->s_addr);
 
 	if (vlan_enabled) {
-		struct vlan_hdr *vhdr = (struct vlan_hdr *)((uint8_t *)eth_hdr +
-				sizeof(struct ether_hdr));
+		struct rte_vlan_hdr *vhdr = (struct rte_vlan_hdr *)(
+			(uint8_t *)eth_hdr + sizeof(struct rte_ether_hdr));
 
 		eth_hdr->ether_type = rte_cpu_to_be_16(ETHER_TYPE_VLAN);
 
@@ -74,8 +75,10 @@ initialize_eth_header(struct ether_hdr *eth_hdr, struct ether_addr *src_mac,
 }
 
 void
-initialize_arp_header(struct rte_arp_hdr *arp_hdr, struct ether_addr *src_mac,
-		struct ether_addr *dst_mac, uint32_t src_ip, uint32_t dst_ip,
+initialize_arp_header(struct rte_arp_hdr *arp_hdr,
+		struct rte_ether_addr *src_mac,
+		struct rte_ether_addr *dst_mac,
+		uint32_t src_ip, uint32_t dst_ip,
 		uint32_t opcode)
 {
 	arp_hdr->arp_hardware = rte_cpu_to_be_16(RTE_ARP_HRD_ETHER);
@@ -256,9 +259,9 @@ initialize_ipv4_header_proto(struct ipv4_hdr *ip_hdr, uint32_t src_addr,
 
 int
 generate_packet_burst(struct rte_mempool *mp, struct rte_mbuf **pkts_burst,
-		struct ether_hdr *eth_hdr, uint8_t vlan_enabled, void *ip_hdr,
-		uint8_t ipv4, struct udp_hdr *udp_hdr, int nb_pkt_per_burst,
-		uint8_t pkt_len, uint8_t nb_pkt_segs)
+		struct rte_ether_hdr *eth_hdr, uint8_t vlan_enabled,
+		void *ip_hdr, uint8_t ipv4, struct udp_hdr *udp_hdr,
+		int nb_pkt_per_burst, uint8_t pkt_len, uint8_t nb_pkt_segs)
 {
 	int i, nb_pkt = 0;
 	size_t eth_hdr_size;
@@ -293,9 +296,10 @@ generate_packet_burst(struct rte_mempool *mp, struct rte_mbuf **pkts_burst,
 		 * Copy headers in first packet segment(s).
 		 */
 		if (vlan_enabled)
-			eth_hdr_size = sizeof(struct ether_hdr) + sizeof(struct vlan_hdr);
+			eth_hdr_size = sizeof(struct rte_ether_hdr) +
+				sizeof(struct rte_vlan_hdr);
 		else
-			eth_hdr_size = sizeof(struct ether_hdr);
+			eth_hdr_size = sizeof(struct rte_ether_hdr);
 
 		copy_buf_to_pkt(eth_hdr, eth_hdr_size, pkt, 0);
 
@@ -333,8 +337,8 @@ generate_packet_burst(struct rte_mempool *mp, struct rte_mbuf **pkts_burst,
 
 int
 generate_packet_burst_proto(struct rte_mempool *mp,
-		struct rte_mbuf **pkts_burst,
-		struct ether_hdr *eth_hdr, uint8_t vlan_enabled, void *ip_hdr,
+		struct rte_mbuf **pkts_burst, struct rte_ether_hdr *eth_hdr,
+		uint8_t vlan_enabled, void *ip_hdr,
 		uint8_t ipv4, uint8_t proto, void *proto_hdr,
 		int nb_pkt_per_burst, uint8_t pkt_len, uint8_t nb_pkt_segs)
 {
@@ -371,10 +375,10 @@ generate_packet_burst_proto(struct rte_mempool *mp,
 		 * Copy headers in first packet segment(s).
 		 */
 		if (vlan_enabled)
-			eth_hdr_size = sizeof(struct ether_hdr) +
-				sizeof(struct vlan_hdr);
+			eth_hdr_size = sizeof(struct rte_ether_hdr) +
+				sizeof(struct rte_vlan_hdr);
 		else
-			eth_hdr_size = sizeof(struct ether_hdr);
+			eth_hdr_size = sizeof(struct rte_ether_hdr);
 
 		copy_buf_to_pkt(eth_hdr, eth_hdr_size, pkt, 0);
 
app/test/packet_burst_generator.h +11 -10
index b6e013a11..744e21a1f 100644
@@ -24,14 +24,15 @@ extern "C" {
 #define PACKET_BURST_GEN_PKT_LEN_128 128
 
 void
-initialize_eth_header(struct ether_hdr *eth_hdr, struct ether_addr *src_mac,
-		struct ether_addr *dst_mac, uint16_t ether_type,
+initialize_eth_header(struct rte_ether_hdr *eth_hdr,
+		struct rte_ether_addr *src_mac,
+		struct rte_ether_addr *dst_mac, uint16_t ether_type,
 		uint8_t vlan_enabled, uint16_t van_id);
 
 void
-initialize_arp_header(struct rte_arp_hdr *arp_hdr, struct ether_addr *src_mac,
-		struct ether_addr *dst_mac, uint32_t src_ip, uint32_t dst_ip,
-		uint32_t opcode);
+initialize_arp_header(struct rte_arp_hdr *arp_hdr,
+		struct rte_ether_addr *src_mac, struct rte_ether_addr *dst_mac,
+		uint32_t src_ip, uint32_t dst_ip, uint32_t opcode);
 
 uint16_t
 initialize_udp_header(struct udp_hdr *udp_hdr, uint16_t src_port,
@@ -59,14 +60,14 @@ initialize_ipv4_header_proto(struct ipv4_hdr *ip_hdr, uint32_t src_addr,
 
 int
 generate_packet_burst(struct rte_mempool *mp, struct rte_mbuf **pkts_burst,
-		struct ether_hdr *eth_hdr, uint8_t vlan_enabled, void *ip_hdr,
-		uint8_t ipv4, struct udp_hdr *udp_hdr, int nb_pkt_per_burst,
-		uint8_t pkt_len, uint8_t nb_pkt_segs);
+		struct rte_ether_hdr *eth_hdr, uint8_t vlan_enabled,
+		void *ip_hdr, uint8_t ipv4, struct udp_hdr *udp_hdr,
+		int nb_pkt_per_burst, uint8_t pkt_len, uint8_t nb_pkt_segs);
 
 int
 generate_packet_burst_proto(struct rte_mempool *mp,
-		struct rte_mbuf **pkts_burst,
-		struct ether_hdr *eth_hdr, uint8_t vlan_enabled, void *ip_hdr,
+		struct rte_mbuf **pkts_burst, struct rte_ether_hdr *eth_hdr,
+		uint8_t vlan_enabled, void *ip_hdr,
 		uint8_t ipv4, uint8_t proto, void *proto_hdr,
 		int nb_pkt_per_burst, uint8_t pkt_len, uint8_t nb_pkt_segs);
 
app/test/test_cmdline_etheraddr.c +7 -7
index 086108ab2..90943c2b4 100644
@@ -82,7 +82,7 @@ const char * ether_addr_invalid_strs[] = {
 
 
 static int
-is_addr_different(const struct ether_addr addr, uint64_t num)
+is_addr_different(const struct rte_ether_addr addr, uint64_t num)
 {
 	int i;
 	for (i = 0; i < ETHER_ADDR_LEN; i++, num >>= 8)
@@ -97,7 +97,7 @@ int
 test_parse_etheraddr_invalid_param(void)
 {
 	char buf[CMDLINE_TEST_BUFSIZE];
-	struct ether_addr result;
+	struct rte_ether_addr result;
 	int ret = 0;
 
 	/* try all null */
@@ -148,12 +148,12 @@ test_parse_etheraddr_invalid_data(void)
 {
 	int ret = 0;
 	unsigned i;
-	struct ether_addr result;
+	struct rte_ether_addr result;
 
 	/* test full strings */
 	for (i = 0; i < ETHERADDR_INVALID_STRS_SIZE; i++) {
 
-		memset(&result, 0, sizeof(struct ether_addr));
+		memset(&result, 0, sizeof(struct rte_ether_addr));
 
 		ret = cmdline_parse_etheraddr(NULL, ether_addr_invalid_strs[i],
 			(void*)&result, sizeof(result));
@@ -173,12 +173,12 @@ test_parse_etheraddr_valid(void)
 {
 	int ret = 0;
 	unsigned i;
-	struct ether_addr result;
+	struct rte_ether_addr result;
 
 	/* test full strings */
 	for (i = 0; i < ETHERADDR_VALID_STRS_SIZE; i++) {
 
-		memset(&result, 0, sizeof(struct ether_addr));
+		memset(&result, 0, sizeof(struct rte_ether_addr));
 
 		ret = cmdline_parse_etheraddr(NULL, ether_addr_valid_strs[i].str,
 			(void*)&result, sizeof(result));
@@ -197,7 +197,7 @@ test_parse_etheraddr_valid(void)
 	/* test garbage strings */
 	for (i = 0; i < ETHERADDR_GARBAGE_STRS_SIZE; i++) {
 
-		memset(&result, 0, sizeof(struct ether_addr));
+		memset(&result, 0, sizeof(struct rte_ether_addr));
 
 		ret = cmdline_parse_etheraddr(NULL, ether_addr_garbage_strs[i],
 			(void*)&result, sizeof(result));
app/test/test_event_eth_rx_adapter.c +1 -1
index 38f5c039f..953b82745 100644
@@ -78,7 +78,7 @@ port_init_common(uint16_t port, const struct rte_eth_conf *port_conf,
 		return retval;
 
 	/* Display the port MAC address. */
-	struct ether_addr addr;
+	struct rte_ether_addr addr;
 	rte_eth_macaddr_get(port, &addr);
 	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
 			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
app/test/test_event_eth_tx_adapter.c +1 -1
index c26c5152c..208d20c53 100644
@@ -84,7 +84,7 @@ port_init_common(uint8_t port, const struct rte_eth_conf *port_conf,
 		return retval;
 
 	/* Display the port MAC address. */
-	struct ether_addr addr;
+	struct rte_ether_addr addr;
 	rte_eth_macaddr_get(port, &addr);
 	printf("Port %u MAC: %02" PRIx8 " %02" PRIx8 " %02" PRIx8
 			   " %02" PRIx8 " %02" PRIx8 " %02" PRIx8 "\n",
app/test/test_flow_classify.c +17 -17
index 5f5beeee7..f81bbba3a 100644
@@ -39,7 +39,7 @@ static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
 		.size = sizeof(uint8_t),
 		.field_index = PROTO_FIELD_IPV4,
 		.input_index = PROTO_INPUT_IPV4,
-		.offset = sizeof(struct ether_hdr) +
+		.offset = sizeof(struct rte_ether_hdr) +
 			offsetof(struct ipv4_hdr, next_proto_id),
 	},
 	/* next input field (IPv4 source address) - 4 consecutive bytes. */
@@ -49,7 +49,7 @@ static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
 		.size = sizeof(uint32_t),
 		.field_index = SRC_FIELD_IPV4,
 		.input_index = SRC_INPUT_IPV4,
-		.offset = sizeof(struct ether_hdr) +
+		.offset = sizeof(struct rte_ether_hdr) +
 			offsetof(struct ipv4_hdr, src_addr),
 	},
 	/* next input field (IPv4 destination address) - 4 consecutive bytes. */
@@ -59,7 +59,7 @@ static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
 		.size = sizeof(uint32_t),
 		.field_index = DST_FIELD_IPV4,
 		.input_index = DST_INPUT_IPV4,
-		.offset = sizeof(struct ether_hdr) +
+		.offset = sizeof(struct rte_ether_hdr) +
 			offsetof(struct ipv4_hdr, dst_addr),
 	},
 	/*
@@ -72,7 +72,7 @@ static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
 		.size = sizeof(uint16_t),
 		.field_index = SRCP_FIELD_IPV4,
 		.input_index = SRCP_DESTP_INPUT_IPV4,
-		.offset = sizeof(struct ether_hdr) +
+		.offset = sizeof(struct rte_ether_hdr) +
 			sizeof(struct ipv4_hdr) +
 			offsetof(struct tcp_hdr, src_port),
 	},
@@ -82,7 +82,7 @@ static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] = {
 		.size = sizeof(uint16_t),
 		.field_index = DSTP_FIELD_IPV4,
 		.input_index = SRCP_DESTP_INPUT_IPV4,
-		.offset = sizeof(struct ether_hdr) +
+		.offset = sizeof(struct rte_ether_hdr) +
 			sizeof(struct ipv4_hdr) +
 			offsetof(struct tcp_hdr, dst_port),
 	},
@@ -489,7 +489,7 @@ static int
 init_ipv4_udp_traffic(struct rte_mempool *mp,
 	     struct rte_mbuf **pkts_burst, uint32_t burst_size)
 {
-	struct ether_hdr pkt_eth_hdr;
+	struct rte_ether_hdr pkt_eth_hdr;
 	struct ipv4_hdr pkt_ipv4_hdr;
 	struct udp_hdr pkt_udp_hdr;
 	uint32_t src_addr = IPV4_ADDR(2, 2, 2, 3);
@@ -503,9 +503,9 @@ init_ipv4_udp_traffic(struct rte_mempool *mp,
 
 	printf("Set up IPv4 UDP traffic\n");
 	initialize_eth_header(&pkt_eth_hdr,
-		(struct ether_addr *)src_mac,
-		(struct ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
-	pktlen = (uint16_t)(sizeof(struct ether_hdr));
+		(struct rte_ether_addr *)src_mac,
+		(struct rte_ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
+	pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
 	printf("ETH  pktlen %u\n", pktlen);
 
 	pktlen = initialize_ipv4_header(&pkt_ipv4_hdr, src_addr, dst_addr,
@@ -526,7 +526,7 @@ static int
 init_ipv4_tcp_traffic(struct rte_mempool *mp,
 	     struct rte_mbuf **pkts_burst, uint32_t burst_size)
 {
-	struct ether_hdr pkt_eth_hdr;
+	struct rte_ether_hdr pkt_eth_hdr;
 	struct ipv4_hdr pkt_ipv4_hdr;
 	struct tcp_hdr pkt_tcp_hdr;
 	uint32_t src_addr = IPV4_ADDR(1, 2, 3, 4);
@@ -540,9 +540,9 @@ init_ipv4_tcp_traffic(struct rte_mempool *mp,
 
 	printf("Set up IPv4 TCP traffic\n");
 	initialize_eth_header(&pkt_eth_hdr,
-		(struct ether_addr *)src_mac,
-		(struct ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
-	pktlen = (uint16_t)(sizeof(struct ether_hdr));
+		(struct rte_ether_addr *)src_mac,
+		(struct rte_ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
+	pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
 	printf("ETH  pktlen %u\n", pktlen);
 
 	pktlen = initialize_ipv4_header_proto(&pkt_ipv4_hdr, src_addr,
@@ -563,7 +563,7 @@ static int
 init_ipv4_sctp_traffic(struct rte_mempool *mp,
 	     struct rte_mbuf **pkts_burst, uint32_t burst_size)
 {
-	struct ether_hdr pkt_eth_hdr;
+	struct rte_ether_hdr pkt_eth_hdr;
 	struct ipv4_hdr pkt_ipv4_hdr;
 	struct sctp_hdr pkt_sctp_hdr;
 	uint32_t src_addr = IPV4_ADDR(11, 12, 13, 14);
@@ -577,9 +577,9 @@ init_ipv4_sctp_traffic(struct rte_mempool *mp,
 
 	printf("Set up IPv4 SCTP traffic\n");
 	initialize_eth_header(&pkt_eth_hdr,
-		(struct ether_addr *)src_mac,
-		(struct ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
-	pktlen = (uint16_t)(sizeof(struct ether_hdr));
+		(struct rte_ether_addr *)src_mac,
+		(struct rte_ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
+	pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
 	printf("ETH  pktlen %u\n", pktlen);
 
 	pktlen = initialize_ipv4_header_proto(&pkt_ipv4_hdr, src_addr,
app/test/test_link_bonding.c +96 -73

475 lines not on this page · raw message

app/test/test_link_bonding_mode4.c +29 -26

157 lines not on this page · raw message

app/test/test_link_bonding_rssconf.c +1 -1
index d82de2cef..4392522ea 100644
@@ -495,7 +495,7 @@ test_setup(void)
 	int port_id;
 	char name[256];
 	struct slave_conf *port;
-	struct ether_addr mac_addr = { .addr_bytes = {0} };
+	struct rte_ether_addr mac_addr = { .addr_bytes = {0} };
 
 	if (test_params.mbuf_pool == NULL) {
 
app/test/test_pmd_perf.c +5 -5
index ed8524a17..b85da914c 100644
@@ -58,7 +58,7 @@
 
 static struct rte_mempool *mbufpool[NB_SOCKETS];
 /* ethernet addresses of ports */
-static struct ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
+static struct rte_ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
 
 static struct rte_eth_conf port_conf = {
 	.rxmode = {
@@ -171,7 +171,7 @@ check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)
 }
 
 static void
-print_ethaddr(const char *name, const struct ether_addr *eth_addr)
+print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
 	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
@@ -182,7 +182,7 @@ static int
 init_traffic(struct rte_mempool *mp,
 	     struct rte_mbuf **pkts_burst, uint32_t burst_size)
 {
-	struct ether_hdr pkt_eth_hdr;
+	struct rte_ether_hdr pkt_eth_hdr;
 	struct ipv4_hdr pkt_ipv4_hdr;
 	struct udp_hdr pkt_udp_hdr;
 	uint32_t pktlen;
@@ -191,8 +191,8 @@ init_traffic(struct rte_mempool *mp,
 
 
 	initialize_eth_header(&pkt_eth_hdr,
-		(struct ether_addr *)src_mac,
-		(struct ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
+		(struct rte_ether_addr *)src_mac,
+		(struct rte_ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
 
 	pktlen = initialize_ipv4_header(&pkt_ipv4_hdr,
 					IPV4_ADDR(10, 0, 0, 1),
app/test/test_sched.c +11 -7
index 4eed8dbde..a782bf3e5 100644
@@ -78,16 +78,20 @@ create_mempool(void)
 static void
 prepare_pkt(struct rte_sched_port *port, struct rte_mbuf *mbuf)
 {
-	struct ether_hdr *eth_hdr;
-	struct vlan_hdr *vlan1, *vlan2;
+	struct rte_ether_hdr *eth_hdr;
+	struct rte_vlan_hdr *vlan1, *vlan2;
 	struct ipv4_hdr *ip_hdr;
 
 	/* Simulate a classifier */
-	eth_hdr = rte_pktmbuf_mtod(mbuf, struct ether_hdr *);
-	vlan1 = (struct vlan_hdr *)(&eth_hdr->ether_type );
-	vlan2 = (struct vlan_hdr *)((uintptr_t)&eth_hdr->ether_type + sizeof(struct vlan_hdr));
-	eth_hdr = (struct ether_hdr *)((uintptr_t)&eth_hdr->ether_type + 2 *sizeof(struct vlan_hdr));
-	ip_hdr = (struct ipv4_hdr *)((uintptr_t)eth_hdr +  sizeof(eth_hdr->ether_type));
+	eth_hdr = rte_pktmbuf_mtod(mbuf, struct rte_ether_hdr *);
+	vlan1 = (struct rte_vlan_hdr *)(&eth_hdr->ether_type);
+	vlan2 = (struct rte_vlan_hdr *)(
+		(uintptr_t)&eth_hdr->ether_type + sizeof(struct rte_vlan_hdr));
+	eth_hdr = (struct rte_ether_hdr *)(
+		(uintptr_t)&eth_hdr->ether_type +
+		2 * sizeof(struct rte_vlan_hdr));
+	ip_hdr = (struct ipv4_hdr *)(
+		(uintptr_t)eth_hdr + sizeof(eth_hdr->ether_type));
 
 	vlan1->vlan_tci = rte_cpu_to_be_16(SUBPORT);
 	vlan2->vlan_tci = rte_cpu_to_be_16(PIPE);
app/test/virtual_pmd.c +2 -2
index f8ddc2db8..15ce64445 100644
@@ -218,7 +218,7 @@ virtual_ethdev_promiscuous_mode_disable(struct rte_eth_dev *dev __rte_unused)
 
 static int
 virtual_ethdev_mac_address_set(__rte_unused struct rte_eth_dev *dev,
-			       __rte_unused struct ether_addr *addr)
+			       __rte_unused struct rte_ether_addr *addr)
 {
 	return 0;
 }
@@ -496,7 +496,7 @@ virtual_ethdev_get_mbufs_from_tx_queue(uint16_t port_id,
 
 
 int
-virtual_ethdev_create(const char *name, struct ether_addr *mac_addr,
+virtual_ethdev_create(const char *name, struct rte_ether_addr *mac_addr,
 		uint8_t socket_id, uint8_t isr_support)
 {
 	struct rte_pci_device *pci_dev = NULL;
app/test/virtual_pmd.h +1 -1
index 5ca02bb50..120b58b27 100644
@@ -15,7 +15,7 @@ int
 virtual_ethdev_init(void);
 
 int
-virtual_ethdev_create(const char *name, struct ether_addr *mac_addr,
+virtual_ethdev_create(const char *name, struct rte_ether_addr *mac_addr,
 		uint8_t socket_id, uint8_t isr_support);
 
 void
doc/guides/prog_guide/bbdev.rst +3 -3
index 658ffd400..038bc6ed1 100644
@@ -752,12 +752,12 @@ buffers using (**sw_turbo**) bbdev PMD.
         for (j = 0; j < op_num; j++) {
             /* Append the size of the ethernet header */
             rte_pktmbuf_append(input_pkts_burst[j],
-                    sizeof(struct ether_hdr));
+                    sizeof(struct rte_ether_hdr));
 
             /* set op */
 
             ops_burst[j]->turbo_enc.input.offset =
-                sizeof(struct ether_hdr);
+                sizeof(struct rte_ether_hdr);
 
             ops_burst[j]->turbo_enc->input.length =
                 rte_pktmbuf_pkt_len(bbdev_pkts[j]);
@@ -766,7 +766,7 @@ buffers using (**sw_turbo**) bbdev PMD.
                 input_pkts_burst[j];
 
             ops_burst[j]->turbo_enc->output.offset =
-                sizeof(struct ether_hdr);
+                sizeof(struct rte_ether_hdr);
 
             ops_burst[j]->turbo_enc->output.data =
                     output_pkts_burst[j];
doc/guides/sample_app_ug/flow_classify.rst +6 -6
index a6383b3c7..9582b9376 100644
@@ -91,7 +91,7 @@ initialisation of the ``Flow Classify`` application..
             .size = sizeof(uint8_t),
             .field_index = PROTO_FIELD_IPV4,
             .input_index = PROTO_INPUT_IPV4,
-            .offset = sizeof(struct ether_hdr) +
+            .offset = sizeof(struct rte_ether_hdr) +
                 offsetof(struct ipv4_hdr, next_proto_id),
         },
         /* next input field (IPv4 source address) - 4 consecutive bytes. */
@@ -101,7 +101,7 @@ initialisation of the ``Flow Classify`` application..
             .size = sizeof(uint32_t),
             .field_index = SRC_FIELD_IPV4,
             .input_index = SRC_INPUT_IPV4,
-            .offset = sizeof(struct ether_hdr) +
+            .offset = sizeof(struct rte_ether_hdr) +
                 offsetof(struct ipv4_hdr, src_addr),
         },
         /* next input field (IPv4 destination address) - 4 consecutive bytes. */
@@ -111,7 +111,7 @@ initialisation of the ``Flow Classify`` application..
             .size = sizeof(uint32_t),
             .field_index = DST_FIELD_IPV4,
             .input_index = DST_INPUT_IPV4,
-            .offset = sizeof(struct ether_hdr) +
+            .offset = sizeof(struct rte_ether_hdr) +
                 offsetof(struct ipv4_hdr, dst_addr),
         },
         /*
@@ -124,7 +124,7 @@ initialisation of the ``Flow Classify`` application..
             .size = sizeof(uint16_t),
             .field_index = SRCP_FIELD_IPV4,
             .input_index = SRCP_DESTP_INPUT_IPV4,
-            .offset = sizeof(struct ether_hdr) +
+            .offset = sizeof(struct rte_ether_hdr) +
                 sizeof(struct ipv4_hdr) +
                 offsetof(struct tcp_hdr, src_port),
         },
@@ -134,7 +134,7 @@ initialisation of the ``Flow Classify`` application..
              .size = sizeof(uint16_t),
              .field_index = DSTP_FIELD_IPV4,
              .input_index = SRCP_DESTP_INPUT_IPV4,
-             .offset = sizeof(struct ether_hdr) +
+             .offset = sizeof(struct rte_ether_hdr) +
                  sizeof(struct ipv4_hdr) +
                  offsetof(struct tcp_hdr, dst_port),
         },
@@ -275,7 +275,7 @@ Forwarding application is shown below:
     {
         struct rte_eth_conf port_conf = port_conf_default;
         const uint16_t rx_rings = 1, tx_rings = 1;
-        struct ether_addr addr;
+        struct rte_ether_addr addr;
         int retval;
         uint16_t q;
 
doc/guides/sample_app_ug/flow_filtering.rst +3 -3
index be3d63f90..02fc67550 100644
@@ -304,7 +304,7 @@ looks like the following:
    main_loop(void)
    {
            struct rte_mbuf *mbufs[32];
-           struct ether_hdr *eth_hdr;
+           struct rte_ether_hdr *eth_hdr;
            uint16_t nb_rx;
            uint16_t i;
            uint16_t j;
@@ -318,7 +318,7 @@ looks like the following:
                                            struct rte_mbuf *m = mbufs[j];
 
                                            eth_hdr = rte_pktmbuf_mtod(m,
-                                                        struct ether_hdr *);
+                                                        struct rte_ether_hdr *);
                                            print_ether_addr("src=",
                                                         &eth_hdr->s_addr);
                                            print_ether_addr(" - dst=",
@@ -348,7 +348,7 @@ queues and printing for each packet the destination queue:
                 if (nb_rx) {
                         for (j = 0; j < nb_rx; j++) {
                              struct rte_mbuf *m = mbufs[j];
-                             eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);
+                             eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
                              print_ether_addr("src=", &eth_hdr->s_addr);
                              print_ether_addr(" - dst=", &eth_hdr->d_addr);
                              printf(" - queue=0x%x", (unsigned int)i);
doc/guides/sample_app_ug/ipv4_multicast.rst +4 -4
index f6efa7f6f..1fe6bf113 100644
@@ -146,7 +146,7 @@ Firstly, the Ethernet* header is removed from the packet and the IPv4 address is
 
     /* Remove the Ethernet header from the input packet */
 
-    iphdr = (struct ipv4_hdr *)rte_pktmbuf_adj(m, sizeof(struct ether_hdr));
+    iphdr = (struct ipv4_hdr *)rte_pktmbuf_adj(m, sizeof(struct rte_ether_hdr));
     RTE_ASSERT(iphdr != NULL);
     dest_addr = rte_be_to_cpu_32(iphdr->dst_addr);
 
@@ -216,14 +216,14 @@ The actual packet transmission is done in the mcast_send_pkt() function:
 
 .. code-block:: c
 
-    static inline void mcast_send_pkt(struct rte_mbuf *pkt, struct ether_addr *dest_addr, struct lcore_queue_conf *qconf, uint16_t port)
+    static inline void mcast_send_pkt(struct rte_mbuf *pkt, struct rte_ether_addr *dest_addr, struct lcore_queue_conf *qconf, uint16_t port)
     {
-        struct ether_hdr *ethdr;
+        struct rte_ether_hdr *ethdr;
         uint16_t len;
 
         /* Construct Ethernet header. */
 
-        ethdr = (struct ether_hdr *)rte_pktmbuf_prepend(pkt, (uint16_t) sizeof(*ethdr));
+        ethdr = (struct rte_ether_hdr *)rte_pktmbuf_prepend(pkt, (uint16_t) sizeof(*ethdr));
 
         RTE_ASSERT(ethdr != NULL);
 
doc/guides/sample_app_ug/l2_forward_job_stats.rst +2 -2
index dfc1ed9ca..02c1367f5 100644
@@ -451,13 +451,13 @@ Naturally, the number of ports in the portmask must be even, otherwise, the appl
     static void
     l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid)
     {
-        struct ether_hdr *eth;
+        struct rte_ether_hdr *eth;
         void *tmp;
         unsigned dst_port;
 
         dst_port = l2fwd_dst_ports[portid];
 
-        eth = rte_pktmbuf_mtod(m, struct ether_hdr *);
+        eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
 
         /* 02:00:00:00:00:xx */
 
doc/guides/sample_app_ug/l2_forward_real_virtual.rst +2 -2
index e5b28e425..54e5b8022 100644
@@ -367,13 +367,13 @@ Naturally, the number of ports in the portmask must be even, otherwise, the appl
     static void
     l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid)
     {
-        struct ether_hdr *eth;
+        struct rte_ether_hdr *eth;
         void *tmp;
         unsigned dst_port;
 
         dst_port = l2fwd_dst_ports[portid];
 
-        eth = rte_pktmbuf_mtod(m, struct ether_hdr *);
+        eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
 
         /* 02:00:00:00:00:xx */
 
doc/guides/sample_app_ug/l3_forward.rst +4 -4
index 670918c57..2d759170c 100644
@@ -273,10 +273,10 @@ The key code snippet of simple_ipv4_fwd_4pkts() is shown below:
     {
         // ...
 
-        data[0] = _mm_loadu_si128(( m128i*)(rte_pktmbuf_mtod(m[0], unsigned char *) + sizeof(struct ether_hdr) + offsetof(struct ipv4_hdr, time_to_live)));
-        data[1] = _mm_loadu_si128(( m128i*)(rte_pktmbuf_mtod(m[1], unsigned char *) + sizeof(struct ether_hdr) + offsetof(struct ipv4_hdr, time_to_live)));
-        data[2] = _mm_loadu_si128(( m128i*)(rte_pktmbuf_mtod(m[2], unsigned char *) + sizeof(struct ether_hdr) + offsetof(struct ipv4_hdr, time_to_live)));
-        data[3] = _mm_loadu_si128(( m128i*)(rte_pktmbuf_mtod(m[3], unsigned char *) + sizeof(struct ether_hdr) + offsetof(struct ipv4_hdr, time_to_live)));
+        data[0] = _mm_loadu_si128(( m128i*)(rte_pktmbuf_mtod(m[0], unsigned char *) + sizeof(struct rte_ether_hdr) + offsetof(struct ipv4_hdr, time_to_live)));
+        data[1] = _mm_loadu_si128(( m128i*)(rte_pktmbuf_mtod(m[1], unsigned char *) + sizeof(struct rte_ether_hdr) + offsetof(struct ipv4_hdr, time_to_live)));
+        data[2] = _mm_loadu_si128(( m128i*)(rte_pktmbuf_mtod(m[2], unsigned char *) + sizeof(struct rte_ether_hdr) + offsetof(struct ipv4_hdr, time_to_live)));
+        data[3] = _mm_loadu_si128(( m128i*)(rte_pktmbuf_mtod(m[3], unsigned char *) + sizeof(struct rte_ether_hdr) + offsetof(struct ipv4_hdr, time_to_live)));
 
         key[0].xmm = _mm_and_si128(data[0], mask0);
         key[1].xmm = _mm_and_si128(data[1], mask0);
doc/guides/sample_app_ug/link_status_intr.rst +2 -2
index 571cd2d60..3fd043e82 100644
@@ -311,11 +311,11 @@ The processing is very simple: processes the TX port from the RX port and then r
     static void
     lsi_simple_forward(struct rte_mbuf *m, unsigned portid)
     {
-        struct ether_hdr *eth;
+        struct rte_ether_hdr *eth;
         void *tmp;
         unsigned dst_port = lsi_dst_ports[portid];
 
-        eth = rte_pktmbuf_mtod(m, struct ether_hdr *);
+        eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
 
         /* 02:00:00:00:00:xx */
 
doc/guides/sample_app_ug/ptpclient.rst +3 -3
index 9d7446d5f..12b4f13d5 100644
@@ -212,17 +212,17 @@ PTP IEEE1588 L2 functionality.
     void
     parse_ptp_frames(uint16_t portid, struct rte_mbuf *m) {
         struct ptp_header *ptp_hdr;
-        struct ether_hdr *eth_hdr;
+        struct rte_ether_hdr *eth_hdr;
         uint16_t eth_type;
 
-        eth_hdr = rte_pktmbuf_mtod(m, struct ether_hdr *);
+        eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
         eth_type = rte_be_to_cpu_16(eth_hdr->ether_type);
 
         if (eth_type == PTP_PROTOCOL) {
             ptp_data.m = m;
             ptp_data.portid = portid;
             ptp_hdr = (struct ptp_header *)(rte_pktmbuf_mtod(m, char *)
-                        + sizeof(struct ether_hdr));
+                        + sizeof(struct rte_ether_hdr));
 
             switch (ptp_hdr->msgtype) {
             case SYNC:
doc/guides/sample_app_ug/rxtx_callbacks.rst +1 -1
index 81463d28d..1ca959c55 100644
@@ -79,7 +79,7 @@ comments:
     {
         struct rte_eth_conf port_conf = port_conf_default;
         const uint16_t rx_rings = 1, tx_rings = 1;
-        struct ether_addr addr;
+        struct rte_ether_addr addr;
         int retval;
         uint16_t q;
 
doc/guides/sample_app_ug/server_node_efd.rst +2 -2
index adf258c0d..f7dab9e98 100644
@@ -197,7 +197,7 @@ which tells the node where the packet has to be distributed.
         for (i = 0; i < rx_count; i++) {
             /* Handle IPv4 header.*/
             ipv4_hdr = rte_pktmbuf_mtod_offset(pkts[i], struct ipv4_hdr *,
-                    sizeof(struct ether_hdr));
+                    sizeof(struct rte_ether_hdr));
             ipv4_dst_ip[i] = ipv4_hdr->dst_addr;
             key_ptrs[i] = (void *)&ipv4_dst_ip[i];
         }
@@ -357,7 +357,7 @@ flow is not handled by the node.
         for (i = 0; i < num_packets; i++) {
             /* Handle IPv4 header.*/
             ipv4_hdr = rte_pktmbuf_mtod_offset(bufs[i], struct ipv4_hdr *,
-                    sizeof(struct ether_hdr));
+                    sizeof(struct rte_ether_hdr));
             ipv4_dst_ip[i] = ipv4_hdr->dst_addr;
             key_ptrs[i] = &ipv4_dst_ip[i];
         }
doc/guides/sample_app_ug/skeleton.rst +1 -1
index 11ee521b3..715f5e91a 100644
@@ -115,7 +115,7 @@ Forwarding application is shown below:
     {
         struct rte_eth_conf port_conf = port_conf_default;
         const uint16_t rx_rings = 1, tx_rings = 1;
-        struct ether_addr addr;
+        struct rte_ether_addr addr;
         int retval;
         uint16_t q;
 
doc/guides/sample_app_ug/vmdq_dcb_forwarding.rst +2 -2
index 707afe91a..8e1774d9e 100644
@@ -165,7 +165,7 @@ the MAC of VMDQ pool 2 on port 1 is 52:54:00:12:01:02.
     };
 
     /* pool mac addr template, pool mac addr is like: 52 54 00 12 port# pool# */
-    static struct ether_addr pool_addr_template = {
+    static struct rte_ether_addr pool_addr_template = {
         .addr_bytes = {0x52, 0x54, 0x00, 0x12, 0x00, 0x00}
     };
 
@@ -225,7 +225,7 @@ the MAC of VMDQ pool 2 on port 1 is 52:54:00:12:01:02.
 
     /* Set mac for each pool.*/
     for (q = 0; q < num_pools; q++) {
-        struct ether_addr mac;
+        struct rte_ether_addr mac;
         mac = pool_addr_template;
         mac.addr_bytes[4] = port;
         mac.addr_bytes[5] = q;
drivers/bus/dpaa/include/fman.h +1 -1
index 15bf73a40..d6eebc877 100644
@@ -314,7 +314,7 @@ struct fman_if {
 	/* The index of this MAC (within the Fman it belongs to) */
 	uint8_t mac_idx;
 	/* The MAC address */
-	struct ether_addr mac_addr;
+	struct rte_ether_addr mac_addr;
 	/* The Qman channel to schedule Tx FQs to */
 	u16 tx_channel_id;
 	/* The hard-coded FQIDs for this interface. Note: this doesn't cover
drivers/bus/dpaa/include/netcfg.h +2 -2
index 7818de68b..bf7bfae8c 100644
@@ -30,8 +30,8 @@ struct netcfg_info {
 
 struct interface_info {
 	char *name;
-	struct ether_addr mac_addr;
-	struct ether_addr peer_mac;
+	struct rte_ether_addr mac_addr;
+	struct rte_ether_addr peer_mac;
 	int mac_present;
 	int fman_enabled_mac_interface;
 };
drivers/net/af_packet/rte_eth_af_packet.c +1 -1
index 99e13fe48..b5c4befce 100644
@@ -73,7 +73,7 @@ struct pmd_internals {
 
 	int if_index;
 	char *if_name;
-	struct ether_addr eth_addr;
+	struct rte_ether_addr eth_addr;
 
 	struct tpacket_req req;
 
drivers/net/af_xdp/rte_eth_af_xdp.c +2 -2
index 35c72272c..893c9ed9f 100644
@@ -109,7 +109,7 @@ struct pmd_internals {
 	int if_index;
 	char if_name[IFNAMSIZ];
 	uint16_t queue_idx;
-	struct ether_addr eth_addr;
+	struct rte_ether_addr eth_addr;
 	struct xsk_umem_info *umem;
 	struct rte_mempool *mb_pool_share;
 
@@ -798,7 +798,7 @@ parse_parameters(struct rte_kvargs *kvlist,
 
 static int
 get_iface_info(const char *if_name,
-	       struct ether_addr *eth_addr,
+	       struct rte_ether_addr *eth_addr,
 	       int *if_index)
 {
 	struct ifreq ifr;
drivers/net/ark/ark_ethdev.c +7 -7
index 4f52e2bd1..6a1530aa2 100644
@@ -41,9 +41,9 @@ static int eth_ark_dev_stats_get(struct rte_eth_dev *dev,
 				  struct rte_eth_stats *stats);
 static void eth_ark_dev_stats_reset(struct rte_eth_dev *dev);
 static int eth_ark_set_default_mac_addr(struct rte_eth_dev *dev,
-					 struct ether_addr *mac_addr);
+					 struct rte_ether_addr *mac_addr);
 static int eth_ark_macaddr_add(struct rte_eth_dev *dev,
-			       struct ether_addr *mac_addr,
+			       struct rte_ether_addr *mac_addr,
 			       uint32_t index,
 			       uint32_t pool);
 static void eth_ark_macaddr_remove(struct rte_eth_dev *dev,
@@ -220,14 +220,14 @@ check_for_ext(struct ark_adapter *ark)
 		(void (*)(struct rte_eth_dev *, void *))
 		dlsym(ark->d_handle, "stats_reset");
 	ark->user_ext.mac_addr_add =
-		(void (*)(struct rte_eth_dev *, struct ether_addr *, uint32_t,
-			  uint32_t, void *))
+		(void (*)(struct rte_eth_dev *, struct rte_ether_addr *,
+			uint32_t, uint32_t, void *))
 		dlsym(ark->d_handle, "mac_addr_add");
 	ark->user_ext.mac_addr_remove =
 		(void (*)(struct rte_eth_dev *, uint32_t, void *))
 		dlsym(ark->d_handle, "mac_addr_remove");
 	ark->user_ext.mac_addr_set =
-		(void (*)(struct rte_eth_dev *, struct ether_addr *,
+		(void (*)(struct rte_eth_dev *, struct rte_ether_addr *,
 			  void *))
 		dlsym(ark->d_handle, "mac_addr_set");
 	ark->user_ext.set_mtu =
@@ -833,7 +833,7 @@ eth_ark_dev_stats_reset(struct rte_eth_dev *dev)
 
 static int
 eth_ark_macaddr_add(struct rte_eth_dev *dev,
-		    struct ether_addr *mac_addr,
+		    struct rte_ether_addr *mac_addr,
 		    uint32_t index,
 		    uint32_t pool)
 {
@@ -864,7 +864,7 @@ eth_ark_macaddr_remove(struct rte_eth_dev *dev, uint32_t index)
 
 static int
 eth_ark_set_default_mac_addr(struct rte_eth_dev *dev,
-			     struct ether_addr *mac_addr)
+			     struct rte_ether_addr *mac_addr)
 {
 	struct ark_adapter *ark =
 		(struct ark_adapter *)dev->data->dev_private;
drivers/net/ark/ark_ext.h +2 -2
index f5af21538..5a987e4d6 100644
@@ -70,7 +70,7 @@ void stats_reset(struct rte_eth_dev *dev,
 		 void *user_data);
 
 void mac_addr_add(struct rte_eth_dev *dev,
-		  struct ether_addr *macadr,
+		  struct rte_ether_addr *macadr,
 		  uint32_t index,
 		  uint32_t pool,
 		  void *user_data);
@@ -80,7 +80,7 @@ void mac_addr_remove(struct rte_eth_dev *dev,
 		     void *user_data);
 
 void mac_addr_set(struct rte_eth_dev *dev,
-		  struct ether_addr *mac_addr,
+		  struct rte_ether_addr *mac_addr,
 		  void *user_data);
 
 int set_mtu(struct rte_eth_dev *dev,
drivers/net/ark/ark_global.h +3 -2
index f820091d7..403df5900 100644
@@ -71,12 +71,13 @@ struct ark_user_ext {
 	int (*stats_get)(struct rte_eth_dev *, struct rte_eth_stats *, void *);
 	void (*stats_reset)(struct rte_eth_dev *, void *);
 	void (*mac_addr_add)(struct rte_eth_dev *,
-						  struct ether_addr *,
+						  struct rte_ether_addr *,
 						 uint32_t,
 						 uint32_t,
 						 void *);
 	void (*mac_addr_remove)(struct rte_eth_dev *, uint32_t, void *);
-	void (*mac_addr_set)(struct rte_eth_dev *, struct ether_addr *, void *);
+	void (*mac_addr_set)(struct rte_eth_dev *, struct rte_ether_addr *,
+			void *);
 	int (*set_mtu)(struct rte_eth_dev *, uint16_t, void *);
 };
 
drivers/net/atlantic/atl_ethdev.c +6 -6
index c9c1795a1..9460318ae 100644
@@ -93,14 +93,14 @@ static void atl_dev_interrupt_handler(void *param);
 
 
 static int atl_add_mac_addr(struct rte_eth_dev *dev,
-			    struct ether_addr *mac_addr,
+			    struct rte_ether_addr *mac_addr,
 			    uint32_t index, uint32_t pool);
 static void atl_remove_mac_addr(struct rte_eth_dev *dev, uint32_t index);
 static int atl_set_default_mac_addr(struct rte_eth_dev *dev,
-					   struct ether_addr *mac_addr);
+					   struct rte_ether_addr *mac_addr);
 
 static int atl_dev_set_mc_addr_list(struct rte_eth_dev *dev,
-				    struct ether_addr *mc_addr_set,
+				    struct rte_ether_addr *mc_addr_set,
 				    uint32_t nb_mc_addr);
 
 /* RSS */
@@ -1575,7 +1575,7 @@ atl_update_mac_addr(struct rte_eth_dev *dev, uint32_t index,
 }
 
 static int
-atl_add_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
+atl_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
 			uint32_t index __rte_unused, uint32_t pool __rte_unused)
 {
 	if (is_zero_ether_addr(mac_addr)) {
@@ -1593,7 +1593,7 @@ atl_remove_mac_addr(struct rte_eth_dev *dev, uint32_t index)
 }
 
 static int
-atl_set_default_mac_addr(struct rte_eth_dev *dev, struct ether_addr *addr)
+atl_set_default_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *addr)
 {
 	atl_remove_mac_addr(dev, 0);
 	atl_add_mac_addr(dev, addr, 0, 0);
@@ -1760,7 +1760,7 @@ atl_vlan_strip_queue_set(struct rte_eth_dev *dev, uint16_t queue_id, int on)
 
 static int
 atl_dev_set_mc_addr_list(struct rte_eth_dev *dev,
-			  struct ether_addr *mc_addr_set,
+			  struct rte_ether_addr *mc_addr_set,
 			  uint32_t nb_mc_addr)
 {
 	struct aq_hw_s *hw = ATL_DEV_PRIVATE_TO_HW(dev->data->dev_private);
drivers/net/atlantic/hw_atl/hw_atl_utils.c +4 -4
index b399ae392..26a53a203 100644
@@ -657,8 +657,8 @@ static int hw_atl_utils_get_mac_permanent(struct aq_hw_s *self,
 		mac_addr[1] = rte_constant_bswap32(mac_addr[1]);
 	}
 
-	ether_addr_copy((struct ether_addr *)mac_addr,
-			(struct ether_addr *)mac);
+	ether_addr_copy((struct rte_ether_addr *)mac_addr,
+			(struct rte_ether_addr *)mac);
 
 	if ((mac[0] & 0x01U) || ((mac[0] | mac[1] | mac[2]) == 0x00U)) {
 		/* chip revision */
@@ -868,8 +868,8 @@ static int aq_fw1x_set_wol(struct aq_hw_s *self, bool wol_enabled, u8 *mac)
 		prpc->msg_wol.pattern_id = 1U;
 		prpc->msg_wol.wol_packet_type = 2U; /* Magic Packet */
 
-		ether_addr_copy((struct ether_addr *)mac,
-			(struct ether_addr *)&prpc->msg_wol.wol_pattern);
+		ether_addr_copy((struct rte_ether_addr *)mac,
+			(struct rte_ether_addr *)&prpc->msg_wol.wol_pattern);
 	} else {
 		rpc_size = sizeof(prpc->msg_id) + sizeof(prpc->msg_del_id);
 
drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c +2 -2
index 5927d90f1..55b5ce3e3 100644
@@ -228,8 +228,8 @@ int aq_fw2x_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
 		mac_addr[1] = rte_constant_bswap32(mac_addr[1]);
 	}
 
-	ether_addr_copy((struct ether_addr *)mac_addr,
-			(struct ether_addr *)mac);
+	ether_addr_copy((struct rte_ether_addr *)mac_addr,
+			(struct rte_ether_addr *)mac);
 
 	if ((mac[0] & 0x01U) || ((mac[0] | mac[1] | mac[2]) == 0x00U)) {
 		unsigned int rnd = (uint32_t)rte_rand();
drivers/net/avp/avp_ethdev.c +3 -3
index 09388d05f..69a70d2cc 100644
@@ -159,7 +159,7 @@ static const struct eth_dev_ops avp_eth_dev_ops = {
 struct avp_dev {
 	uint32_t magic; /**< Memory validation marker */
 	uint64_t device_id; /**< Unique system identifier */
-	struct ether_addr ethaddr; /**< Host specified MAC address */
+	struct rte_ether_addr ethaddr; /**< Host specified MAC address */
 	struct rte_eth_dev_data *dev_data;
 	/**< Back pointer to ethernet device data */
 	volatile uint32_t flags; /**< Device operational flags */
@@ -1199,7 +1199,7 @@ avp_dev_tx_queue_setup(struct rte_eth_dev *eth_dev,
 }
 
 static inline int
-_avp_cmp_ether_addr(struct ether_addr *a, struct ether_addr *b)
+_avp_cmp_ether_addr(struct rte_ether_addr *a, struct rte_ether_addr *b)
 {
 	uint16_t *_a = (uint16_t *)&a->addr_bytes[0];
 	uint16_t *_b = (uint16_t *)&b->addr_bytes[0];
@@ -1209,7 +1209,7 @@ _avp_cmp_ether_addr(struct ether_addr *a, struct ether_addr *b)
 static inline int
 _avp_mac_filter(struct avp_dev *avp, struct rte_mbuf *m)
 {
-	struct ether_hdr *eth = rte_pktmbuf_mtod(m, struct ether_hdr *);
+	struct rte_ether_hdr *eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
 
 	if (likely(_avp_cmp_ether_addr(&avp->ethaddr, &eth->d_addr) == 0)) {
 		/* allow all packets destined to our address */
drivers/net/axgbe/axgbe_ethdev.h +1 -1
index b1cd2980b..810ac4a74 100644
@@ -539,7 +539,7 @@ struct axgbe_port {
 	/* Hardware features of the device */
 	struct axgbe_hw_features hw_feat;
 
-	struct ether_addr mac_addr;
+	struct rte_ether_addr mac_addr;
 
 	/* Software Tx/Rx structure pointers*/
 	void **rx_queues;
drivers/net/bnx2x/bnx2x.c +4 -4
index 3e705c7a1..17b6817b6 100644
@@ -2197,8 +2197,8 @@ int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, struct rte_mbuf *m0)
 			tx_start_bd->vlan_or_ethertype =
 			    rte_cpu_to_le_16(pkt_prod);
 		else {
-			struct ether_hdr *eh =
-			    rte_pktmbuf_mtod(m0, struct ether_hdr *);
+			struct rte_ether_hdr *eh =
+			    rte_pktmbuf_mtod(m0, struct rte_ether_hdr *);
 
 			tx_start_bd->vlan_or_ethertype =
 			    rte_cpu_to_le_16(rte_be_to_cpu_16(eh->ether_type));
@@ -2208,8 +2208,8 @@ int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, struct rte_mbuf *m0)
 	bd_prod = NEXT_TX_BD(bd_prod);
 	if (IS_VF(sc)) {
 		struct eth_tx_parse_bd_e2 *tx_parse_bd;
-		const struct ether_hdr *eh =
-		    rte_pktmbuf_mtod(m0, struct ether_hdr *);
+		const struct rte_ether_hdr *eh =
+		    rte_pktmbuf_mtod(m0, struct rte_ether_hdr *);
 		uint8_t mac_type = UNICAST_ADDRESS;
 
 		tx_parse_bd =
drivers/net/bnx2x/bnx2x_ethdev.c +3 -2
index 3063aea64..567dc5560 100644
@@ -501,7 +501,7 @@ bnx2x_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 }
 
 static int
-bnx2x_mac_addr_add(struct rte_eth_dev *dev, struct ether_addr *mac_addr,
+bnx2x_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
 		uint32_t index, uint32_t pool)
 {
 	struct bnx2x_softc *sc = dev->data->dev_private;
@@ -654,7 +654,8 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
 		}
 	}
 
-	eth_dev->data->mac_addrs = (struct ether_addr *)sc->link_params.mac_addr;
+	eth_dev->data->mac_addrs =
+		(struct rte_ether_addr *)sc->link_params.mac_addr;
 
 	if (IS_VF(sc)) {
 		rte_spinlock_init(&sc->vf2pf_lock);
drivers/net/bnx2x/bnx2x_ethdev.h +2 -1
index 45958db9a..bd3ef143b 100644
@@ -75,7 +75,8 @@ typedef int bool;
 
 /* MAC address operations */
 struct bnx2x_mac_ops {
-	void (*mac_addr_add)(struct rte_eth_dev *dev, struct ether_addr *addr,
+	void (*mac_addr_add)(struct rte_eth_dev *dev,
+			struct rte_ether_addr *addr,
 			uint16_t index, uint32_t pool);                           /* not implemented yet */
 	void (*mac_addr_remove)(struct rte_eth_dev *dev, uint16_t index); /* not implemented yet */
 };
drivers/net/bnx2x/bnx2x_vfpf.c +1 -1
index 048bf126f..cd5522d03 100644
@@ -302,7 +302,7 @@ int bnx2x_vf_get_resources(struct bnx2x_softc *sc, uint8_t tx_count, uint8_t rx_
 
 	if (is_valid_assigned_ether_addr(&sc_resp.resc.current_mac_addr))
 		ether_addr_copy(&sc_resp.resc.current_mac_addr,
-				(struct ether_addr *)sc->link_params.mac_addr);
+			(struct rte_ether_addr *)sc->link_params.mac_addr);
 	else
 		eth_random_addr(sc->link_params.mac_addr);
 
drivers/net/bnx2x/bnx2x_vfpf.h +1 -1
index cc6fef956..6964c9d98 100644
@@ -115,7 +115,7 @@ struct vf_resc {
 	uint8_t num_vlan_filters;
 	uint8_t num_mc_filters;
 	uint8_t permanent_mac_addr[ETH_ALEN];
-	struct ether_addr current_mac_addr;
+	struct rte_ether_addr current_mac_addr;
 	uint16_t pf_link_speed;
 	uint32_t pf_link_supported;
 };
drivers/net/bnxt/bnxt_ethdev.c +4 -3
index da0de211d..c64315053 100644
@@ -760,7 +760,7 @@ static void bnxt_mac_addr_remove_op(struct rte_eth_dev *eth_dev,
 }
 
 static int bnxt_mac_addr_add_op(struct rte_eth_dev *eth_dev,
-				struct ether_addr *mac_addr,
+				struct rte_ether_addr *mac_addr,
 				uint32_t index, uint32_t pool)
 {
 	struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
@@ -1451,7 +1451,8 @@ bnxt_vlan_offload_set_op(struct rte_eth_dev *dev, int mask)
 }
 
 static int
-bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev, struct ether_addr *addr)
+bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev,
+			struct rte_ether_addr *addr)
 {
 	struct bnxt *bp = (struct bnxt *)dev->data->dev_private;
 	/* Default Filter is tied to VNIC 0 */
@@ -1489,7 +1490,7 @@ bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev, struct ether_addr *addr)
 
 static int
 bnxt_dev_set_mc_addr_list_op(struct rte_eth_dev *eth_dev,
-			  struct ether_addr *mc_addr_set,
+			  struct rte_ether_addr *mc_addr_set,
 			  uint32_t nb_mc_addr)
 {
 	struct bnxt *bp = (struct bnxt *)eth_dev->data->dev_private;
drivers/net/bnxt/bnxt_hwrm.c +2 -2
index eb5c41ebb..59e75b0be 100644
@@ -2578,7 +2578,7 @@ static void add_random_mac_if_needed(struct bnxt *bp,
 				     struct hwrm_func_cfg_input *cfg_req,
 				     int vf)
 {
-	struct ether_addr mac;
+	struct rte_ether_addr mac;
 
 	if (bnxt_hwrm_func_qcfg_vf_default_mac(bp, vf, &mac))
 		return;
@@ -3112,7 +3112,7 @@ int bnxt_hwrm_reject_fwd_resp(struct bnxt *bp, uint16_t target_id,
 }
 
 int bnxt_hwrm_func_qcfg_vf_default_mac(struct bnxt *bp, uint16_t vf,
-				       struct ether_addr *mac)
+				       struct rte_ether_addr *mac)
 {
 	struct hwrm_func_qcfg_input req = {0};
 	struct hwrm_func_qcfg_output *resp = bp->hwrm_cmd_resp_addr;
drivers/net/bnxt/bnxt_hwrm.h +1 -1
index ec9b3e007..53d79f046 100644
@@ -130,7 +130,7 @@ int bnxt_hwrm_func_bw_cfg(struct bnxt *bp, uint16_t vf,
 			uint16_t max_bw, uint16_t enables);
 int bnxt_hwrm_set_vf_vlan(struct bnxt *bp, int vf);
 int bnxt_hwrm_func_qcfg_vf_default_mac(struct bnxt *bp, uint16_t vf,
-				       struct ether_addr *mac);
+				       struct rte_ether_addr *mac);
 int bnxt_hwrm_func_qcfg_current_vf_vlan(struct bnxt *bp, int vf);
 int bnxt_hwrm_tunnel_dst_port_alloc(struct bnxt *bp, uint16_t port,
 				uint8_t tunnel_type);
drivers/net/bnxt/rte_pmd_bnxt.c +3 -3
index c298de83c..5e3d1bfb1 100644
@@ -132,7 +132,7 @@ int rte_pmd_bnxt_set_all_queues_drop_en(uint16_t port, uint8_t on)
 }
 
 int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
-				struct ether_addr *mac_addr)
+				struct rte_ether_addr *mac_addr)
 {
 	struct rte_eth_dev *dev;
 	struct rte_eth_dev_info dev_info;
@@ -647,7 +647,7 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
 					     count);
 }
 
-int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *addr,
+int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct rte_ether_addr *addr,
 				uint32_t vf_id)
 {
 	struct rte_eth_dev *dev;
@@ -655,7 +655,7 @@ int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *addr,
 	struct bnxt *bp;
 	struct bnxt_filter_info *filter;
 	struct bnxt_vnic_info vnic;
-	struct ether_addr dflt_mac;
+	struct rte_ether_addr dflt_mac;
 	int rc;
 
 	dev = &rte_eth_devices[port];
drivers/net/bnxt/rte_pmd_bnxt.h +2 -2
index 68fbe34d6..2e893cc7b 100644
@@ -67,7 +67,7 @@ int rte_pmd_bnxt_set_vf_mac_anti_spoof(uint16_t port, uint16_t vf, uint8_t on);
  *   - (-EINVAL) if *vf* or *mac_addr* is invalid.
  */
 int rte_pmd_bnxt_set_vf_mac_addr(uint16_t port, uint16_t vf,
-		struct ether_addr *mac_addr);
+		struct rte_ether_addr *mac_addr);
 
 /**
  * Enable/Disable vf vlan strip for all queues in a pool
@@ -303,7 +303,7 @@ int rte_pmd_bnxt_get_vf_tx_drop_count(uint16_t port, uint16_t vf_id,
  *   - (-ENOTSUP) Ethernet device is not a PF
  *   - (-ENOMEM) on an allocation failure
  */
-int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct ether_addr *mac_addr,
+int rte_pmd_bnxt_mac_addr_add(uint16_t port, struct rte_ether_addr *mac_addr,
 				uint32_t vf_id);
 
 /**
drivers/net/bonding/rte_eth_bond.h +1 -1
index b668ff9ad..874aa91a5 100644
@@ -225,7 +225,7 @@ rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
  */
 int
 rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
-		struct ether_addr *mac_addr);
+		struct rte_ether_addr *mac_addr);
 
 /**
  * Reset bonded device to use MAC from primary slave on bonded device and it's
drivers/net/bonding/rte_eth_bond_8023ad.c +3 -3
index 1e6a3fc7c..51bf3f52e 100644
@@ -126,7 +126,7 @@ bond_print_lacp(struct lacpdu *l)
 #define MODE4_DEBUG(fmt, ...) do { } while (0)
 #endif
 
-static const struct ether_addr lacp_mac_addr = {
+static const struct rte_ether_addr lacp_mac_addr = {
 	.addr_bytes = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x02 }
 };
 
@@ -810,7 +810,7 @@ bond_mode_8023ad_periodic_cb(void *arg)
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
 	struct port *port;
 	struct rte_eth_link link_info;
-	struct ether_addr slave_addr;
+	struct rte_ether_addr slave_addr;
 	struct rte_mbuf *lacp_pkt = NULL;
 	uint16_t slave_id;
 	uint16_t i;
@@ -1044,7 +1044,7 @@ void
 bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev)
 {
 	struct bond_dev_private *internals = bond_dev->data->dev_private;
-	struct ether_addr slave_addr;
+	struct rte_ether_addr slave_addr;
 	struct port *slave, *agg_slave;
 	uint16_t slave_id, i, j;
 
drivers/net/bonding/rte_eth_bond_8023ad.h +5 -5
index d8b5dbc21..cbad59aa7 100644
@@ -58,14 +58,14 @@ struct slow_protocol {
 
 /** Generic slow protocol frame type structure */
 struct slow_protocol_frame {
-	struct ether_hdr eth_hdr;
+	struct rte_ether_hdr eth_hdr;
 	struct slow_protocol slow_protocol;
 } __attribute__((__packed__));
 
 struct port_params {
 	uint16_t system_priority;
 	/**< System priority (unused in current implementation) */
-	struct ether_addr system;
+	struct rte_ether_addr system;
 	/**< System ID - Slave MAC address, same as bonding MAC address */
 	uint16_t key;
 	/**< Speed information (implementation dependednt) and duplex. */
@@ -103,7 +103,7 @@ struct lacpdu {
 
 /** LACPDU frame: Contains ethernet header and LACPDU. */
 struct lacpdu_header {
-	struct ether_hdr eth_hdr;
+	struct rte_ether_hdr eth_hdr;
 	struct lacpdu lacpdu;
 } __attribute__((__packed__));
 
@@ -114,7 +114,7 @@ struct marker {
 	uint8_t tlv_type_marker;
 	uint8_t info_length;
 	uint16_t requester_port;
-	struct ether_addr requester_system;
+	struct rte_ether_addr requester_system;
 	uint32_t requester_transaction_id;
 	uint8_t reserved_2[2];
 
@@ -124,7 +124,7 @@ struct marker {
 } __attribute__((__packed__));
 
 struct marker_header {
-	struct ether_hdr eth_hdr;
+	struct rte_ether_hdr eth_hdr;
 	struct marker marker;
 } __attribute__((__packed__));
 
drivers/net/bonding/rte_eth_bond_8023ad_private.h +1 -1
index f91902ebd..d905de425 100644
@@ -150,7 +150,7 @@ struct mode8023ad_private {
 	uint64_t update_timeout_us;
 	rte_eth_bond_8023ad_ext_slowrx_fn slowrx_cb;
 	uint8_t external_sm;
-	struct ether_addr mac_addr;
+	struct rte_ether_addr mac_addr;
 
 	struct rte_eth_link slave_link;
 	/***< slave link properties */
drivers/net/bonding/rte_eth_bond_alb.c +15 -13
index f16ae8f21..da0b062a0 100644
@@ -72,8 +72,9 @@ bond_mode_alb_enable(struct rte_eth_dev *bond_dev)
 	return -ENOMEM;
 }
 
-void bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
-		struct bond_dev_private *internals) {
+void bond_mode_alb_arp_recv(struct rte_ether_hdr *eth_h, uint16_t offset,
+		struct bond_dev_private *internals)
+{
 	struct rte_arp_hdr *arp;
 
 	struct client_data *hash_table = internals->mode6.client_table;
@@ -102,7 +103,7 @@ void bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
 			client_info->app_ip != arp->arp_data.arp_tip ||
 			client_info->cli_ip != arp->arp_data.arp_sip ||
 			!is_same_ether_addr(&client_info->cli_mac, &arp->arp_data.arp_sha) ||
-			client_info->vlan_count != offset / sizeof(struct vlan_hdr) ||
+			client_info->vlan_count != offset / sizeof(struct rte_vlan_hdr) ||
 			memcmp(client_info->vlan, eth_h + 1, offset) != 0
 	) {
 		client_info->in_use = 1;
@@ -113,14 +114,14 @@ void bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
 		rte_eth_macaddr_get(client_info->slave_idx, &client_info->app_mac);
 		ether_addr_copy(&client_info->app_mac, &arp->arp_data.arp_tha);
 		memcpy(client_info->vlan, eth_h + 1, offset);
-		client_info->vlan_count = offset / sizeof(struct vlan_hdr);
+		client_info->vlan_count = offset / sizeof(struct rte_vlan_hdr);
 	}
 	internals->mode6.ntt = 1;
 	rte_spinlock_unlock(&internals->mode6.lock);
 }
 
 uint16_t
-bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
+bond_mode_alb_arp_xmit(struct rte_ether_hdr *eth_h, uint16_t offset,
 		struct bond_dev_private *internals)
 {
 	struct rte_arp_hdr *arp;
@@ -130,7 +131,7 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 
 	uint8_t hash_index;
 
-	struct ether_addr bonding_mac;
+	struct rte_ether_addr bonding_mac;
 
 	arp = (struct rte_arp_hdr *)((char *)(eth_h + 1) + offset);
 
@@ -163,7 +164,7 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 						&client_info->app_mac);
 				ether_addr_copy(&client_info->app_mac, &arp->arp_data.arp_sha);
 				memcpy(client_info->vlan, eth_h + 1, offset);
-				client_info->vlan_count = offset / sizeof(struct vlan_hdr);
+				client_info->vlan_count = offset / sizeof(struct rte_vlan_hdr);
 				rte_spinlock_unlock(&internals->mode6.lock);
 				return client_info->slave_idx;
 			}
@@ -179,7 +180,7 @@ bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
 		rte_eth_macaddr_get(client_info->slave_idx, &client_info->app_mac);
 		ether_addr_copy(&client_info->app_mac, &arp->arp_data.arp_sha);
 		memcpy(client_info->vlan, eth_h + 1, offset);
-		client_info->vlan_count = offset / sizeof(struct vlan_hdr);
+		client_info->vlan_count = offset / sizeof(struct rte_vlan_hdr);
 		rte_spinlock_unlock(&internals->mode6.lock);
 		return client_info->slave_idx;
 	}
@@ -195,12 +196,12 @@ uint16_t
 bond_mode_alb_arp_upd(struct client_data *client_info,
 		struct rte_mbuf *pkt, struct bond_dev_private *internals)
 {
-	struct ether_hdr *eth_h;
+	struct rte_ether_hdr *eth_h;
 	struct rte_arp_hdr *arp_h;
 	uint16_t slave_idx;
 
 	rte_spinlock_lock(&internals->mode6.lock);
-	eth_h = rte_pktmbuf_mtod(pkt, struct ether_hdr *);
+	eth_h = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
 
 	ether_addr_copy(&client_info->app_mac, &eth_h->s_addr);
 	ether_addr_copy(&client_info->cli_mac, &eth_h->d_addr);
@@ -209,11 +210,12 @@ bond_mode_alb_arp_upd(struct client_data *client_info,
 	else
 		eth_h->ether_type = rte_cpu_to_be_16(ETHER_TYPE_ARP);
 
-	arp_h = (struct rte_arp_hdr *)((char *)eth_h + sizeof(struct ether_hdr)
-			+ client_info->vlan_count * sizeof(struct vlan_hdr));
+	arp_h = (struct rte_arp_hdr *)(
+		(char *)eth_h + sizeof(struct rte_ether_hdr)
+		+ client_info->vlan_count * sizeof(struct rte_vlan_hdr));
 
 	memcpy(eth_h + 1, client_info->vlan,
-			client_info->vlan_count * sizeof(struct vlan_hdr));
+			client_info->vlan_count * sizeof(struct rte_vlan_hdr));
 
 	ether_addr_copy(&client_info->app_mac, &arp_h->arp_data.arp_sha);
 	arp_h->arp_data.arp_sip = client_info->app_ip;
drivers/net/bonding/rte_eth_bond_alb.h +5 -5
index 4640fd24e..386e70c59 100644
@@ -13,11 +13,11 @@
 
 struct client_data {
 	/** ARP data of single client */
-	struct ether_addr app_mac;
+	struct rte_ether_addr app_mac;
 	/**< MAC address of application running DPDK */
 	uint32_t app_ip;
 	/**< IP address of application running DPDK */
-	struct ether_addr cli_mac;
+	struct rte_ether_addr cli_mac;
 	/**< Client MAC address */
 	uint32_t cli_ip;
 	/**< Client IP address */
@@ -29,7 +29,7 @@ struct client_data {
 	uint8_t ntt;
 	/**< Flag indicating if we need to send update to this client on next tx */
 
-	struct vlan_hdr vlan[2];
+	struct rte_vlan_hdr vlan[2];
 	/**< Content of vlan headers */
 	uint8_t vlan_count;
 	/**< Number of nested vlan headers */
@@ -68,7 +68,7 @@ bond_mode_alb_enable(struct rte_eth_dev *bond_dev);
  * @param internals		Bonding data.
  */
 void
-bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
+bond_mode_alb_arp_recv(struct rte_ether_hdr *eth_h, uint16_t offset,
 		struct bond_dev_private *internals);
 
 /**
@@ -85,7 +85,7 @@ bond_mode_alb_arp_recv(struct ether_hdr *eth_h, uint16_t offset,
  * Index of slave on which packet should be sent.
  */
 uint16_t
-bond_mode_alb_arp_xmit(struct ether_hdr *eth_h, uint16_t offset,
+bond_mode_alb_arp_xmit(struct rte_ether_hdr *eth_h, uint16_t offset,
 		struct bond_dev_private *internals);
 
 /**
drivers/net/bonding/rte_eth_bond_api.c +1 -1
index a23988dc7..0fc4c5eda 100644
@@ -840,7 +840,7 @@ rte_eth_bond_active_slaves_get(uint16_t bonded_port_id, uint16_t slaves[],
 
 int
 rte_eth_bond_mac_address_set(uint16_t bonded_port_id,
-		struct ether_addr *mac_addr)
+		struct rte_ether_addr *mac_addr)
 {
 	struct rte_eth_dev *bonded_eth_dev;
 	struct bond_dev_private *internals;
drivers/net/bonding/rte_eth_bond_args.c +1 -1
index b60fde6a8..01bbb06c1 100644
@@ -282,7 +282,7 @@ bond_ethdev_parse_bond_mac_addr_kvarg(const char *key __rte_unused,
 
 	/* Parse MAC */
 	return cmdline_parse_etheraddr(NULL, value, extra_args,
-		sizeof(struct ether_addr));
+		sizeof(struct rte_ether_addr));
 }
 
 int
drivers/net/bonding/rte_eth_bond_pmd.c +51 -42

291 lines not on this page · raw message

drivers/net/bonding/rte_eth_bond_private.h +5 -3
index 8afef39ba..55c0b227b 100644
@@ -85,7 +85,7 @@ struct bond_slave_details {
 	uint8_t link_status_wait_to_complete;
 	uint8_t last_link_status;
 	/**< Port Id of slave eth_dev */
-	struct ether_addr persisted_mac_addr;
+	struct rte_ether_addr persisted_mac_addr;
 
 	uint16_t reta_size;
 };
@@ -223,10 +223,12 @@ void
 activate_slave(struct rte_eth_dev *eth_dev, uint16_t port_id);
 
 int
-mac_address_set(struct rte_eth_dev *eth_dev, struct ether_addr *new_mac_addr);
+mac_address_set(struct rte_eth_dev *eth_dev,
+		struct rte_ether_addr *new_mac_addr);
 
 int
-mac_address_get(struct rte_eth_dev *eth_dev, struct ether_addr *dst_mac_addr);
+mac_address_get(struct rte_eth_dev *eth_dev,
+		struct rte_ether_addr *dst_mac_addr);
 
 int
 mac_address_slaves_update(struct rte_eth_dev *bonded_eth_dev);
drivers/net/cxgbe/base/adapter.h +1 -1
index fb8af5250..b54f75ebc 100644
@@ -671,7 +671,7 @@ static inline void t4_os_set_hw_addr(struct adapter *adapter, int port_idx,
 {
 	struct port_info *pi = adap2pinfo(adapter, port_idx);
 
-	ether_addr_copy((struct ether_addr *)hw_addr,
+	ether_addr_copy((struct rte_ether_addr *)hw_addr,
 			&pi->eth_dev->data->mac_addrs[0]);
 }
 
drivers/net/cxgbe/cxgbe_ethdev.c +1 -1
index 01d256da0..e36936959 100644
@@ -1056,7 +1056,7 @@ static int cxgbe_get_regs(struct rte_eth_dev *eth_dev,
 	return 0;
 }
 
-int cxgbe_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *addr)
+int cxgbe_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *addr)
 {
 	struct port_info *pi = (struct port_info *)(dev->data->dev_private);
 	int ret;
drivers/net/cxgbe/cxgbe_pfvf.h +1 -1
index 8d0a105aa..03145cea6 100644
@@ -16,7 +16,7 @@ void cxgbe_dev_promiscuous_enable(struct rte_eth_dev *eth_dev);
 void cxgbe_dev_promiscuous_disable(struct rte_eth_dev *eth_dev);
 void cxgbe_dev_allmulticast_enable(struct rte_eth_dev *eth_dev);
 void cxgbe_dev_allmulticast_disable(struct rte_eth_dev *eth_dev);
-int cxgbe_mac_addr_set(struct rte_eth_dev *dev, struct ether_addr *addr);
+int cxgbe_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *addr);
 int cxgbe_dev_configure(struct rte_eth_dev *eth_dev);
 int cxgbe_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, uint16_t queue_idx,
 			     uint16_t nb_desc, unsigned int socket_id,
drivers/net/dpaa/dpaa_ethdev.c +2 -2
index 2e043feb2..0e1dc1ae8 100644

Lines of this file are not shown. View the raw message.

drivers/net/dpaa/dpaa_rxtx.c +2 -1
index a4085f47e..7f174f7fb 100644

Lines of this file are not shown. View the raw message.

drivers/net/dpaa2/dpaa2_ethdev.c +10 -9
index 900182f66..ae4d7e1cc 100644

Lines of this file are not shown. View the raw message.

drivers/net/dpaa2/dpaa2_flow.c +9 -9
index 9ef46d47e..572eb8462 100644

Lines of this file are not shown. View the raw message.

drivers/net/e1000/em_ethdev.c +9 -8
index 8230824e7..b2fdb5e10 100644

Lines of this file are not shown. View the raw message.

drivers/net/e1000/igb_ethdev.c +14 -12
index d3a8f5bf4..e21a772fb 100644

Lines of this file are not shown. View the raw message.

drivers/net/e1000/igb_pf.c +2 -2
index b9f2e5391..9f1521350 100644

Lines of this file are not shown. View the raw message.

drivers/net/ena/ena_ethdev.c +4 -4
index 3eb38165c..1d832f91f 100644

Lines of this file are not shown. View the raw message.

drivers/net/enetc/enetc_ethdev.c +1 -1
index 362e0740c..2f473358d 100644

Lines of this file are not shown. View the raw message.

drivers/net/enic/enic.h +1 -1
index 9193fb038..20080af6f 100644

Lines of this file are not shown. View the raw message.

drivers/net/enic/enic_ethdev.c +6 -6
index 8d14d8ac7..71e1b9c7d 100644

Lines of this file are not shown. View the raw message.

drivers/net/enic/enic_flow.c +17 -17
index 511c177f4..9bddfb941 100644

Lines of this file are not shown. View the raw message.

drivers/net/enic/enic_main.c +2 -2
index ea9eb2edf..6b7683914 100644

Lines of this file are not shown. View the raw message.

drivers/net/failsafe/failsafe.c +1 -1
index 42dfaca30..8f7d91169 100644

Lines of this file are not shown. View the raw message.

drivers/net/failsafe/failsafe_args.c +1 -1
index 3351c5bca..5fc6be403 100644

Lines of this file are not shown. View the raw message.

drivers/net/failsafe/failsafe_ether.c +1 -1
index 7ac23d49a..549ee6bb8 100644

Lines of this file are not shown. View the raw message.

drivers/net/failsafe/failsafe_ops.c +3 -3
index 43d6a828f..c900eccb2 100644

Lines of this file are not shown. View the raw message.

drivers/net/failsafe/failsafe_private.h +2 -2
index 4f58a5c91..231b89edd 100644

Lines of this file are not shown. View the raw message.

drivers/net/fm10k/fm10k_ethdev.c +4 -4
index caf4d1bc0..ac00828dd 100644

Lines of this file are not shown. View the raw message.

drivers/net/i40e/i40e_ethdev.c +29 -29

58 lines not on this page · raw message

drivers/net/i40e/i40e_ethdev.h +11 -10
index 98550380e..ffaa7b949 100644

Lines of this file are not shown. View the raw message.

drivers/net/i40e/i40e_ethdev_vf.c +17 -15
index a34897293..0b05ddb34 100644

Lines of this file are not shown. View the raw message.

drivers/net/i40e/i40e_fdir.c +4 -4
index 4b32fee1e..dd940cecb 100644

Lines of this file are not shown. View the raw message.

drivers/net/i40e/i40e_flow.c +4 -4
index 5447e4ea5..0640137a8 100644

Lines of this file are not shown. View the raw message.

drivers/net/i40e/i40e_pf.c +5 -5
index 91be45027..4d7001df5 100644

Lines of this file are not shown. View the raw message.

drivers/net/i40e/i40e_vf_representor.c +1 -1
index 45a15d3ab..633dca6c3 100644

Lines of this file are not shown. View the raw message.

drivers/net/i40e/rte_pmd_i40e.c +8 -7
index 7ae78e426..8e562553a 100644

Lines of this file are not shown. View the raw message.

drivers/net/i40e/rte_pmd_i40e.h +4 -4
index a1313146b..faac9e2e2 100644

Lines of this file are not shown. View the raw message.

drivers/net/iavf/iavf.h +1 -1
index 3470e0305..1227259f5 100644

Lines of this file are not shown. View the raw message.

drivers/net/iavf/iavf_ethdev.c +12 -11
index 4072a7b79..c98355025 100644

Lines of this file are not shown. View the raw message.

drivers/net/iavf/iavf_vchnl.c +2 -2
index da6401d35..a705dbdfc 100644

Lines of this file are not shown. View the raw message.

drivers/net/ice/ice_ethdev.c +16 -15
index bbaa7cf39..098570794 100644

Lines of this file are not shown. View the raw message.

drivers/net/ice/ice_ethdev.h +2 -2
index f3ed02e73..4baaf9498 100644

Lines of this file are not shown. View the raw message.

drivers/net/ipn3ke/ipn3ke_ethdev.h +2 -2
index bfda9d508..566bc7607 100644

Lines of this file are not shown. View the raw message.

drivers/net/ipn3ke/ipn3ke_representor.c +2 -2
index cf3b214a2..aee2aac6c 100644

Lines of this file are not shown. View the raw message.

drivers/net/ixgbe/ixgbe_ethdev.c +29 -23

52 lines not on this page · raw message

drivers/net/ixgbe/ixgbe_pf.c +1 -1
index fafff6b03..6180c9473 100644

Lines of this file are not shown. View the raw message.

drivers/net/ixgbe/ixgbe_vf_representor.c +2 -2
index 5d2e3e023..2c01f6e33 100644

Lines of this file are not shown. View the raw message.

drivers/net/ixgbe/rte_pmd_ixgbe.c +2 -2
index 3a874f9a9..3defba175 100644

Lines of this file are not shown. View the raw message.

drivers/net/ixgbe/rte_pmd_ixgbe.h +1 -1
index 72a941f9d..84c688472 100644

Lines of this file are not shown. View the raw message.

drivers/net/kni/rte_eth_kni.c +1 -1
index 1f232e4da..180cfd6c9 100644

Lines of this file are not shown. View the raw message.

drivers/net/liquidio/lio_ethdev.c +2 -1
index c9cabd65a..de234e903 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx4/mlx4.c +1 -1
index fe559c040..460c10f89 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx4/mlx4.h +4 -4
index e2d184f84..4e9bb9c1a 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx4/mlx4_ethdev.c +3 -3
index 765affc34..6995c14a5 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx4/mlx4_flow.c +2 -2
index 1dcdb31a0..78bd452bd 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5.c +1 -1
index 9f5ec97ec..2798e0e95 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5.h +7 -6
index 3eaaafd5e..80df971e5 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_flow_dv.c +8 -8
index cf255ca95..e8560fd42 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_flow_tcf.c +5 -5
index fc04c9d88..789748d08 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_mac.c +5 -5
index bce026f98..9f6b89a82 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_nl.c +7 -7
index 0ff96671f..ce4c93748 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_rxtx.h +1 -1
index 4339aaf33..267663495 100644

Lines of this file are not shown. View the raw message.

drivers/net/mlx5/mlx5_trigger.c +2 -2
index b7fde3575..69681e296 100644

Lines of this file are not shown. View the raw message.

drivers/net/mvneta/mvneta_ethdev.c +2 -2
index 8923a1634..d539ba6a1 100644

Lines of this file are not shown. View the raw message.

drivers/net/mvpp2/mrvl_ethdev.c +2 -2
index ce52f0901..8647c9b0d 100644

Lines of this file are not shown. View the raw message.

drivers/net/mvpp2/mrvl_flow.c +1 -1
index ffd1dab9b..738986575 100644

Lines of this file are not shown. View the raw message.

drivers/net/netvsc/hn_ethdev.c +1 -1
index 553cb06f6..35503df32 100644

Lines of this file are not shown. View the raw message.

drivers/net/netvsc/hn_rxtx.c +2 -2
index 7d7b55778..a5850c249 100644

Lines of this file are not shown. View the raw message.

drivers/net/netvsc/hn_var.h +2 -2
index de885d898..bf94d90a7 100644

Lines of this file are not shown. View the raw message.

drivers/net/netvsc/hn_vf.c +3 -3
index b980bb8a4..f1be7e22f 100644

Lines of this file are not shown. View the raw message.

drivers/net/nfb/nfb_ethdev.c +4 -4
index be7cced01..679af6eb2 100644

Lines of this file are not shown. View the raw message.

drivers/net/nfp/nfp_net.c +5 -4
index 9394309ac..95c2be127 100644

Lines of this file are not shown. View the raw message.

drivers/net/null/rte_eth_null.c +2 -2
index 159c1c1fd..7683511cf 100644

Lines of this file are not shown. View the raw message.

drivers/net/octeontx/octeontx_ethdev.c +1 -1
index 046e12986..643479254 100644

Lines of this file are not shown. View the raw message.

drivers/net/pcap/rte_eth_pcap.c +2 -2
index 353538f16..7655b3a7a 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/qede_ethdev.c +19 -15
index b2fd2fd90..a72d46657 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/qede_ethdev.h +3 -3
index c06274d94..d0e7c70be 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/qede_filter.c +2 -2
index 7aeef700d..792b9efb4 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/qede_if.h +1 -1
index ee5e54c19..b840c743c 100644

Lines of this file are not shown. View the raw message.

drivers/net/qede/qede_rxtx.c +7 -7
index 27bac0995..0e8a3675b 100644

Lines of this file are not shown. View the raw message.

drivers/net/ring/rte_eth_ring.c +2 -2
index ab963a03c..cae63a7f1 100644

Lines of this file are not shown. View the raw message.

drivers/net/sfc/sfc.h +1 -1
index ecd20e546..dde25c553 100644

Lines of this file are not shown. View the raw message.

drivers/net/sfc/sfc_ethdev.c +6 -6
index a007d4564..fadcdb56a 100644

Lines of this file are not shown. View the raw message.

drivers/net/sfc/sfc_port.c +3 -3
index 1709dba4e..8de5f0c60 100644

Lines of this file are not shown. View the raw message.

drivers/net/softnic/parser.c +6 -6
index a8688a21e..7ea6eb4fa 100644

Lines of this file are not shown. View the raw message.

drivers/net/softnic/parser.h +1 -1
index 1ee3f82a7..6f408b248 100644

Lines of this file are not shown. View the raw message.

drivers/net/softnic/rte_eth_softnic.c +1 -1
index 32b001fd3..4bda2f2b0 100644

Lines of this file are not shown. View the raw message.

drivers/net/szedata2/rte_eth_szedata2.c +3 -3
index 88448eff6..43a66432a 100644

Lines of this file are not shown. View the raw message.

drivers/net/tap/rte_eth_tap.c +11 -10
index 47a2b68f1..71be763d6 100644

Lines of this file are not shown. View the raw message.

drivers/net/tap/rte_eth_tap.h +2 -2
index dc3579ac0..8d6d53dc0 100644

Lines of this file are not shown. View the raw message.

drivers/net/tap/tap_bpf_program.c +4 -4
index 532e8838f..2b1dba15b 100644

Lines of this file are not shown. View the raw message.

drivers/net/thunderx/base/nicvf_plat.h +3 -0
index 6de07c708..3f0519593 100644

Lines of this file are not shown. View the raw message.

drivers/net/thunderx/nicvf_ethdev.c +2 -2
index 879d88998..ec2087924 100644

Lines of this file are not shown. View the raw message.

drivers/net/vdev_netvsc/vdev_netvsc.c +6 -6
index 801f54c96..ef02fdcdd 100644

Lines of this file are not shown. View the raw message.

drivers/net/vhost/rte_eth_vhost.c +4 -4
index b2cda0483..6705e90db 100644

Lines of this file are not shown. View the raw message.

drivers/net/virtio/virtio_ethdev.c +9 -9
index d25c08f0a..9b99bf3eb 100644

Lines of this file are not shown. View the raw message.

drivers/net/virtio/virtio_rxtx.c +2 -2
index 8c56f238f..fa9c855e8 100644

Lines of this file are not shown. View the raw message.

drivers/net/vmxnet3/vmxnet3_ethdev.c +4 -4
index f54536b49..3ad1e9e09 100644

Lines of this file are not shown. View the raw message.

drivers/net/vmxnet3/vmxnet3_rxtx.c +3 -3
index 4867a64f3..b691141b5 100644

Lines of this file are not shown. View the raw message.

examples/bbdev_app/main.c +20 -19
index d68c06aef..2675a16f0 100644

Lines of this file are not shown. View the raw message.

examples/bond/main.c +16 -14
index 21a67e531..38d1b40c2 100644

Lines of this file are not shown. View the raw message.

examples/distributor/main.c +1 -1
index b5499bb12..e4c8c3c18 100644

Lines of this file are not shown. View the raw message.

examples/ethtool/ethtool-app/ethapp.c +2 -2
index a4e64b354..ce7f715f8 100644

Lines of this file are not shown. View the raw message.

examples/ethtool/ethtool-app/main.c +3 -3
index e23d3afd2..27c22cf90 100644

Lines of this file are not shown. View the raw message.

examples/ethtool/lib/rte_ethtool.c +3 -3
index bf10139e7..299488c1c 100644

Lines of this file are not shown. View the raw message.

examples/ethtool/lib/rte_ethtool.h +4 -3
index 31cd5ae4e..f17709663 100644

Lines of this file are not shown. View the raw message.

examples/eventdev_pipeline/main.c +1 -1
index 58f8904e0..63227f0d5 100644

Lines of this file are not shown. View the raw message.

examples/eventdev_pipeline/pipeline_common.h +3 -3
index a6cc912fb..ef23d963a 100644

Lines of this file are not shown. View the raw message.

examples/flow_classify/flow_classify.c +6 -6
index 199612926..5ae81fab1 100644

Lines of this file are not shown. View the raw message.

examples/flow_filtering/main.c +3 -3
index a582ac075..7b8e7c4fa 100644

Lines of this file are not shown. View the raw message.

examples/ip_fragmentation/main.c +10 -9
index e90a61e35..a9efb4baa 100644

Lines of this file are not shown. View the raw message.

examples/ip_pipeline/cli.c +2 -2
index bcf62fbf5..309b2936e 100644

Lines of this file are not shown. View the raw message.

examples/ip_pipeline/parser.c +6 -6
index ffcdeb3a6..4777f9ffd 100644

Lines of this file are not shown. View the raw message.

examples/ip_pipeline/parser.h +1 -1
index 261a8c858..4538f675d 100644

Lines of this file are not shown. View the raw message.

examples/ip_reassembly/main.c +7 -6
index 17b55d4c7..d9ecac006 100644

Lines of this file are not shown. View the raw message.

examples/ipsec-secgw/ipsec-secgw.c +10 -9
index 478dd80c2..66e92165d 100644

Lines of this file are not shown. View the raw message.

examples/ipsec-secgw/ipsec.h +1 -1
index 589398f6f..e9272d74b 100644

Lines of this file are not shown. View the raw message.

examples/ipsec-secgw/parser.c +2 -2
index b0a8ee23b..fc8c238fe 100644

Lines of this file are not shown. View the raw message.

examples/ipv4_multicast/main.c +9 -7
index 1eef29159..a047197c7 100644

Lines of this file are not shown. View the raw message.

examples/kni/main.c +4 -4
index a58774a33..8bea07182 100644

Lines of this file are not shown. View the raw message.

examples/l2fwd-cat/l2fwd-cat.c +1 -1
index 0e6078aad..1a8af28e2 100644

Lines of this file are not shown. View the raw message.

examples/l2fwd-crypto/main.c +6 -6
index 06517b471..dd09855e7 100644

Lines of this file are not shown. View the raw message.

examples/l2fwd-jobstats/main.c +3 -3
index a4d28e178..033104d63 100644

Lines of this file are not shown. View the raw message.

examples/l2fwd-keepalive/main.c +3 -3
index 0bf2b5336..21d19932d 100644

Lines of this file are not shown. View the raw message.

examples/l2fwd/main.c +3 -3
index 6c23215a5..c1d6797b0 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd-acl/main.c +10 -10
index a322ce4f2..3a0f5820e 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd-power/main.c +8 -8
index 3b448acc4..bcd584d3e 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd-vf/main.c +5 -5
index 41137f978..2c0c89e21 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd.h +1 -1
index c962deac3..1893f8c3a 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_altivec.h +6 -6
index 5ec99f961..0c68aa01c 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_em.c +3 -3
index fa8f82be6..64e79b946 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_em.h +4 -4
index 228164e26..de1278b04 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_em_hlm.h +6 -5
index 22c26dce3..ec52a011f 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_em_hlm_neon.h +4 -4
index 16c8b04ac..3ee2304b5 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_em_hlm_sse.h +4 -4
index 41e2be958..8156bbb90 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_em_sequential.h +6 -5
index 35cf5eac0..770660e99 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_lpm.c +7 -7
index 60a00639e..b373047f6 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_lpm.h +4 -4
index b68868f44..0c98d3fc4 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_lpm_altivec.h +5 -5
index 4c9e2438b..b36e991ac 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_lpm_neon.h +10 -10
index 02ec0d802..a3e42cfa7 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_lpm_sse.h +5 -5
index 1d1615906..4603e0749 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_neon.h +6 -6
index 76ccdfa73..af2dc47ac 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/l3fwd_sse.h +6 -6
index ed5267c11..3349f2747 100644

Lines of this file are not shown. View the raw message.

examples/l3fwd/main.c +4 -4
index 7b9683187..b0a700ab1 100644

Lines of this file are not shown. View the raw message.

examples/link_status_interrupt/main.c +3 -3
index f3346d23b..9997c58f4 100644

Lines of this file are not shown. View the raw message.

examples/load_balancer/runtime.c +3 -3
index 39a846a56..f39681d72 100644

Lines of this file are not shown. View the raw message.

examples/multi_process/client_server_mp/mp_server/main.c +1 -1
index 0ddc63e92..9a8e422d4 100644

Lines of this file are not shown. View the raw message.

examples/packet_ordering/main.c +1 -1
index 149bfdd02..ca312029e 100644

Lines of this file are not shown. View the raw message.

examples/performance-thread/l3fwd-thread/main.c +68 -68

136 lines not on this page · raw message

examples/ptpclient/ptpclient.c +14 -14
index 82ae71c19..7d28f59ce 100644

Lines of this file are not shown. View the raw message.

examples/qos_meter/main.c +2 -1
index 9b0112449..431e84f4e 100644

Lines of this file are not shown. View the raw message.

examples/quota_watermark/qw/main.c +3 -3
index c55d38744..61e92a820 100644

Lines of this file are not shown. View the raw message.

examples/rxtx_callbacks/main.c +1 -1
index 2058be627..a277519f5 100644

Lines of this file are not shown. View the raw message.

examples/server_node_efd/node/node.c +1 -1
index 3b97fbd45..8bec351ec 100644

Lines of this file are not shown. View the raw message.

examples/server_node_efd/server/main.c +2 -2
index 404f1f165..a086c5a77 100644

Lines of this file are not shown. View the raw message.

examples/skeleton/basicfwd.c +1 -1
index 4aba1dc38..7e3cd8715 100644

Lines of this file are not shown. View the raw message.

examples/tep_termination/main.c +1 -1
index e0fe7bd2f..9d8ab17dd 100644

Lines of this file are not shown. View the raw message.

examples/tep_termination/main.h +1 -1
index 966c63a51..7a70f7396 100644

Lines of this file are not shown. View the raw message.

examples/tep_termination/vxlan.c +25 -19

44 lines not on this page · raw message

examples/tep_termination/vxlan.h +3 -3
index bff786a2a..780ae73cc 100644

Lines of this file are not shown. View the raw message.

examples/tep_termination/vxlan_setup.c +3 -3
index ad7fbe9c6..e4af7bc4d 100644

Lines of this file are not shown. View the raw message.

examples/tep_termination/vxlan_setup.h +1 -1
index 2c20e2e39..4dc37d673 100644

Lines of this file are not shown. View the raw message.

examples/vhost/main.c +14 -12
index 8f7b758c3..cd1a51bfa 100644

Lines of this file are not shown. View the raw message.

examples/vhost/main.h +1 -1
index 764c33afe..7cba0edbf 100644

Lines of this file are not shown. View the raw message.

examples/vm_power_manager/channel_monitor.c +3 -3
index 4a287109b..1194f62f8 100644

Lines of this file are not shown. View the raw message.

examples/vm_power_manager/guest_cli/vm_power_cli_guest.c +1 -1
index 2d9e7689a..78c3aa0a1 100644

Lines of this file are not shown. View the raw message.

examples/vm_power_manager/main.c +2 -2
index 5fa13fe62..f8cab1162 100644

Lines of this file are not shown. View the raw message.

examples/vmdq/main.c +5 -5
index 627a5da48..5195a515a 100644

Lines of this file are not shown. View the raw message.

examples/vmdq_dcb/main.c +5 -5
index 646368395..75cf31a10 100644

Lines of this file are not shown. View the raw message.

lib/librte_ethdev/rte_class_eth.c +1 -1
index cb99c92ec..e554668da 100644

Lines of this file are not shown. View the raw message.

lib/librte_ethdev/rte_eth_ctrl.h +6 -6
index 1ef4ed92b..85c1e372a 100644

Lines of this file are not shown. View the raw message.

lib/librte_ethdev/rte_ethdev.c +10 -10
index d7cfa3d53..b868535c2 100644

Lines of this file are not shown. View the raw message.

lib/librte_ethdev/rte_ethdev.h +7 -6
index 1f35e1dda..bcc1bb71d 100644

Lines of this file are not shown. View the raw message.

lib/librte_ethdev/rte_ethdev_core.h +6 -6
index 16300b147..b406e297e 100644

Lines of this file are not shown. View the raw message.

lib/librte_ethdev/rte_flow.h +6 -6
index 63f84fca6..050af52f8 100644

Lines of this file are not shown. View the raw message.

lib/librte_eventdev/rte_event_eth_rx_adapter.c +4 -3
index b60674b61..b6ff57b42 100644

Lines of this file are not shown. View the raw message.

lib/librte_gro/gro_tcp4.c +2 -2
index 7d128a431..284219517 100644

Lines of this file are not shown. View the raw message.

lib/librte_gro/gro_tcp4.h +2 -2
index d97924883..988cca8c6 100644

Lines of this file are not shown. View the raw message.

lib/librte_gro/gro_vxlan_tcp4.c +6 -6
index acb9bc919..d713e3dd6 100644

Lines of this file are not shown. View the raw message.

lib/librte_gro/gro_vxlan_tcp4.h +3 -3
index 0cafb9211..7832942a6 100644

Lines of this file are not shown. View the raw message.

lib/librte_gso/rte_gso.h +2 -2
index a626a11e3..433f2c8bb 100644

Lines of this file are not shown. View the raw message.

lib/librte_kni/rte_kni.c +1 -1
index 946459c79..7a41788e2 100644

Lines of this file are not shown. View the raw message.

lib/librte_net/rte_arp.c +4 -3
index 877874a5e..adda9f700 100644

Lines of this file are not shown. View the raw message.

lib/librte_net/rte_arp.h +3 -3
index a94fa6a00..f17c52972 100644

Lines of this file are not shown. View the raw message.

lib/librte_net/rte_ether.h +32 -32

64 lines not on this page · raw message

lib/librte_net/rte_net.c +10 -10
index 378a4126c..315c37c55 100644

Lines of this file are not shown. View the raw message.

lib/librte_pipeline/rte_table_action.c +30 -30

60 lines not on this page · raw message

lib/librte_pipeline/rte_table_action.h +2 -2
index cf6eeaa30..ef45a3023 100644

Lines of this file are not shown. View the raw message.

lib/librte_vhost/vhost.h +1 -1
index e9138dfab..d49c3b8a9 100644

Lines of this file are not shown. View the raw message.

lib/librte_vhost/virtio_net.c +6 -5
index a6a33a101..f97ec76f9 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.11.0

Part of the diff is not shown here. View the raw message.

#64 lore raw

Re: [dpdk-dev] [PATCH 03/15] net: add rte prefix to ether structures

Quoted 22 lines · Olivier Matz
drivers/net/tap/tap_bpf_program.c +2 -2
index 532e8838f..2b1dba15b 100644
@@ -37,7 +37,7 @@
 #define KEY_IDX                        0
 #define BPF_MAP_ID_KEY 1
 
-struct vlan_hdr {
+struct rte_vlan_hdr {
        __be16 proto;
        __be16 tci;
 };
@@ -141,12 +141,12 @@ rss_l3_l4(struct __sk_buff *skb)
 
        /* Get correct proto for 802.1ad */
        if (skb->vlan_present && skb->vlan_proto == htons(ETH_P_8021AD)) {
-               if (data + ETH_ALEN * 2 + sizeof(struct vlan_hdr) +
+               if (data + ETH_ALEN * 2 + sizeof(struct rte_vlan_hdr) +

drivers/net/tap/tap_bpf_program.c rss_l3_l4(struct __sk_buff *skb) · line 152

Quoted 10 lines
drivers/net/tap/tap_bpf_program.c +2 -2
                    sizeof(proto) > data_end)
                        return TC_ACT_OK;
                proto = *(__u16 *)(data + ETH_ALEN * 2 +
-                                  sizeof(struct vlan_hdr));
-               off += sizeof(struct vlan_hdr);
+                                  sizeof(struct rte_vlan_hdr));
+               off += sizeof(struct rte_vlan_hdr);
        }
 
        if (proto == htons(ETH_P_IP)) {

I think this part should have been skipped.
But I am not able to compile the bpf program before this patch anyway.

Signature · 1 line
David Marchand
#65 lore raw

PATCH 4/15 net: add rte prefix to ether functions

In reply to Olivier Matz

Add 'rte_' prefix to functions:
- rename is_same_ether_addr() as rte_is_same_ether_addr().
- rename is_zero_ether_addr() as rte_is_zero_ether_addr().
- rename is_unicast_ether_addr() as rte_is_unicast_ether_addr().
- rename is_multicast_ether_addr() as rte_is_multicast_ether_addr().
- rename is_broadcast_ether_addr() as rte_is_broadcast_ether_addr().
- rename is_universal_ether_addr() as rte_is_universal_ether_addr().
- rename is_local_admin_ether_addr() as rte_is_local_admin_ether_addr().
- rename is_valid_assigned_ether_addr() as rte_is_valid_assigned_ether_addr().
- rename eth_random_addr() as rte_eth_random_addr().
- rename ether_addr_copy() as rte_ether_addr_copy().
- rename ether_format_addr() as rte_ether_format_addr().

---
 app/test-pmd/cmdline.c                             |  6 +--
 app/test-pmd/config.c                              |  8 ++--
 app/test-pmd/csumonly.c                            |  4 +-
 app/test-pmd/flowgen.c                             |  4 +-
 app/test-pmd/icmpecho.c                            | 27 +++++++-----
 app/test-pmd/ieee1588fwd.c                         |  6 +--
 app/test-pmd/macfwd.c                              |  4 +-
 app/test-pmd/macswap.h                             |  6 +--
 app/test-pmd/txonly.c                              |  4 +-
 app/test-pmd/util.c                                |  2 +-
 app/test/packet_burst_generator.c                  |  8 ++--
 app/test/test_link_bonding.c                       | 18 ++++----
 app/test/test_link_bonding_mode4.c                 | 29 +++++++------
 app/test/test_pmd_perf.c                           |  2 +-
 doc/guides/sample_app_ug/ipv4_multicast.rst        |  4 +-
 doc/guides/sample_app_ug/l2_forward_job_stats.rst  |  2 +-
 .../sample_app_ug/l2_forward_real_virtual.rst      |  2 +-
 doc/guides/sample_app_ug/link_status_intr.rst      |  2 +-
 drivers/net/atlantic/atl_ethdev.c                  |  2 +-
 drivers/net/atlantic/hw_atl/hw_atl_utils.c         |  4 +-
 drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c    |  2 +-
 drivers/net/avp/avp_ethdev.c                       |  6 +--
 drivers/net/axgbe/axgbe_ethdev.c                   |  6 +--
 drivers/net/bnx2x/bnx2x.c                          |  4 +-
 drivers/net/bnx2x/bnx2x_vfpf.c                     |  6 +--
 drivers/net/bnxt/bnxt_flow.c                       | 12 +++---
 drivers/net/bnxt/bnxt_hwrm.c                       |  2 +-
 drivers/net/bonding/rte_eth_bond_8023ad.c          | 22 +++++-----
 drivers/net/bonding/rte_eth_bond_alb.c             | 42 +++++++++++--------
 drivers/net/bonding/rte_eth_bond_pmd.c             | 18 ++++----
 drivers/net/cxgbe/base/adapter.h                   |  2 +-
 drivers/net/cxgbe/cxgbe_flow.c                     |  4 +-
 drivers/net/dpaa/dpaa_ethdev.c                     |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c                   |  8 ++--
 drivers/net/e1000/em_ethdev.c                      |  2 +-
 drivers/net/e1000/igb_ethdev.c                     |  8 ++--
 drivers/net/e1000/igb_flow.c                       |  8 ++--
 drivers/net/e1000/igb_pf.c                         |  6 +--
 drivers/net/ena/ena_ethdev.c                       |  3 +-
 drivers/net/enetc/enetc_ethdev.c                   |  2 +-
 drivers/net/enic/enic_ethdev.c                     | 13 +++---
 drivers/net/enic/enic_main.c                       |  2 +-
 drivers/net/failsafe/failsafe.c                    |  6 +--
 drivers/net/failsafe/failsafe_ether.c              |  2 +-
 drivers/net/fm10k/fm10k_ethdev.c                   | 12 +++---
 drivers/net/i40e/i40e_ethdev.c                     | 43 ++++++++++---------
 drivers/net/i40e/i40e_ethdev_vf.c                  | 17 ++++----
 drivers/net/i40e/i40e_flow.c                       | 24 +++++------
 drivers/net/i40e/i40e_pf.c                         |  6 +--
 drivers/net/i40e/rte_pmd_i40e.c                    | 10 ++---
 drivers/net/iavf/iavf_ethdev.c                     | 14 +++----
 drivers/net/iavf/iavf_vchnl.c                      |  4 +-
 drivers/net/ice/ice_ethdev.c                       | 16 ++++----
 drivers/net/ipn3ke/ipn3ke_representor.c            |  9 ++--
 drivers/net/ixgbe/ixgbe_ethdev.c                   |  8 ++--
 drivers/net/ixgbe/ixgbe_flow.c                     |  8 ++--
 drivers/net/ixgbe/ixgbe_pf.c                       |  5 ++-
 drivers/net/ixgbe/rte_pmd_ixgbe.c                  |  3 +-
 drivers/net/kni/rte_eth_kni.c                      |  2 +-
 drivers/net/liquidio/lio_ethdev.c                  |  2 +-
 drivers/net/mlx4/mlx4_ethdev.c                     |  2 +-
 drivers/net/mlx4/mlx4_flow.c                       |  2 +-
 drivers/net/mlx5/mlx5_flow_tcf.c                   |  4 +-
 drivers/net/mlx5/mlx5_mac.c                        |  4 +-
 drivers/net/mlx5/mlx5_nl.c                         |  6 +--
 drivers/net/mvneta/mvneta_ethdev.c                 |  6 +--
 drivers/net/mvpp2/mrvl_ethdev.c                    |  6 +--
 drivers/net/netvsc/hn_rxtx.c                       |  4 +-
 drivers/net/netvsc/hn_vf.c                         |  2 +-
 drivers/net/nfb/nfb_ethdev.c                       |  6 +--
 drivers/net/nfp/nfp_net.c                          |  6 +--
 drivers/net/null/rte_eth_null.c                    |  2 +-
 drivers/net/qede/qede_ethdev.c                     | 29 ++++++-------
 drivers/net/sfc/sfc_ethdev.c                       |  6 +--
 drivers/net/sfc/sfc_flow.c                         | 10 ++---
 drivers/net/sfc/sfc_port.c                         |  2 +-
 drivers/net/softnic/rte_eth_softnic_flow.c         |  4 +-
 drivers/net/szedata2/rte_eth_szedata2.c            |  2 +-
 drivers/net/tap/rte_eth_tap.c                      | 13 +++---
 drivers/net/tap/tap_flow.c                         |  4 +-
 drivers/net/thunderx/nicvf_ethdev.c                |  6 +--
 drivers/net/vdev_netvsc/vdev_netvsc.c              |  4 +-
 drivers/net/vhost/rte_eth_vhost.c                  |  4 +-
 drivers/net/virtio/virtio_ethdev.c                 | 10 ++---
 drivers/net/virtio/virtio_rxtx.c                   |  4 +-
 drivers/net/vmxnet3/vmxnet3_ethdev.c               |  4 +-
 examples/bond/main.c                               |  9 ++--
 examples/ethtool/ethtool-app/main.c                |  4 +-
 examples/ethtool/lib/rte_ethtool.c                 |  2 +-
 examples/eventdev_pipeline/pipeline_common.h       |  4 +-
 examples/flow_filtering/main.c                     |  2 +-
 examples/ip_fragmentation/main.c                   |  5 ++-
 examples/ip_reassembly/main.c                      |  4 +-
 examples/ipsec-secgw/ipsec-secgw.c                 |  2 +-
 examples/ipv4_multicast/main.c                     |  6 +--
 examples/kni/main.c                                |  2 +-
 examples/l2fwd-crypto/main.c                       |  2 +-
 examples/l2fwd-jobstats/main.c                     |  2 +-
 examples/l2fwd-keepalive/main.c                    |  2 +-
 examples/l2fwd/main.c                              |  2 +-
 examples/l3fwd-acl/main.c                          |  2 +-
 examples/l3fwd-power/main.c                        |  8 ++--
 examples/l3fwd-vf/main.c                           |  4 +-
 examples/l3fwd/l3fwd_em.h                          |  6 ++-
 examples/l3fwd/l3fwd_lpm.h                         |  6 ++-
 examples/l3fwd/main.c                              |  4 +-
 examples/link_status_interrupt/main.c              |  2 +-
 examples/performance-thread/l3fwd-thread/main.c    | 42 ++++++++++---------
 examples/ptpclient/ptpclient.c                     |  2 +-
 examples/quota_watermark/qw/main.c                 |  2 +-
 examples/tep_termination/vxlan_setup.c             | 16 ++++----
 examples/vhost/main.c                              |  4 +-
 examples/vmdq/main.c                               |  2 +-
 examples/vmdq_dcb/main.c                           |  2 +-
 lib/librte_ethdev/rte_class_eth.c                  |  2 +-
 lib/librte_ethdev/rte_ethdev.c                     | 20 ++++-----
 lib/librte_gro/gro_tcp4.c                          |  8 ++--
 lib/librte_gro/gro_tcp4.h                          |  4 +-
 lib/librte_gro/gro_vxlan_tcp4.c                    | 21 +++++-----
 lib/librte_net/rte_arp.c                           |  6 +--
 lib/librte_net/rte_ether.h                         | 24 +++++------
 lib/librte_pipeline/rte_table_action.c             | 48 +++++++++++++---------
 122 files changed, 506 insertions(+), 444 deletions(-)
app/test-pmd/cmdline.c +3 -3
index 90e35022e..1fb609940 100644
@@ -8813,8 +8813,8 @@ cmd_tunnel_filter_parsed(void *parsed_result,
 
 	memset(&tunnel_filter_conf, 0, sizeof(tunnel_filter_conf));
 
-	ether_addr_copy(&res->outer_mac, &tunnel_filter_conf.outer_mac);
-	ether_addr_copy(&res->inner_mac, &tunnel_filter_conf.inner_mac);
+	rte_ether_addr_copy(&res->outer_mac, &tunnel_filter_conf.outer_mac);
+	rte_ether_addr_copy(&res->inner_mac, &tunnel_filter_conf.inner_mac);
 	tunnel_filter_conf.inner_vlan = res->inner_vlan;
 
 	if (res->ip_value.family == AF_INET) {
@@ -12472,7 +12472,7 @@ static void cmd_mcast_addr_parsed(void *parsed_result,
 {
 	struct cmd_mcast_addr_result *res = parsed_result;
 
-	if (!is_multicast_ether_addr(&res->mc_addr)) {
+	if (!rte_is_multicast_ether_addr(&res->mc_addr)) {
 		printf("Invalid multicast addr %02X:%02X:%02X:%02X:%02X:%02X\n",
 		       res->mc_addr.addr_bytes[0], res->mc_addr.addr_bytes[1],
 		       res->mc_addr.addr_bytes[2], res->mc_addr.addr_bytes[3],
app/test-pmd/config.c +4 -4
index 03ce502ba..7a67690f2 100644
@@ -111,7 +111,7 @@ static void
 print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
 	printf("%s%s", name, buf);
 }
 
@@ -3536,7 +3536,7 @@ mcast_addr_add(portid_t port_id, struct rte_ether_addr *mc_addr)
 	 * in the pool of multicast addresses.
 	 */
 	for (i = 0; i < port->mc_addr_nb; i++) {
-		if (is_same_ether_addr(mc_addr, &port->mc_addr_pool[i])) {
+		if (rte_is_same_ether_addr(mc_addr, &port->mc_addr_pool[i])) {
 			printf("multicast address already filtered by port\n");
 			return;
 		}
@@ -3544,7 +3544,7 @@ mcast_addr_add(portid_t port_id, struct rte_ether_addr *mc_addr)
 
 	if (mcast_addr_pool_extend(port) != 0)
 		return;
-	ether_addr_copy(mc_addr, &port->mc_addr_pool[i]);
+	rte_ether_addr_copy(mc_addr, &port->mc_addr_pool[i]);
 	eth_port_multicast_addr_list_set(port_id);
 }
 
@@ -3563,7 +3563,7 @@ mcast_addr_remove(portid_t port_id, struct rte_ether_addr *mc_addr)
 	 * Search the pool of multicast MAC addresses for the removed address.
 	 */
 	for (i = 0; i < port->mc_addr_nb; i++) {
-		if (is_same_ether_addr(mc_addr, &port->mc_addr_pool[i]))
+		if (rte_is_same_ether_addr(mc_addr, &port->mc_addr_pool[i]))
 			break;
 	}
 	if (i == port->mc_addr_nb) {
app/test-pmd/csumonly.c +2 -2
index 481b91a26..8de37c87e 100644
@@ -767,9 +767,9 @@ pkt_burst_checksum_forward(struct fwd_stream *fs)
 		 * and inner headers */
 
 		eth_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
-		ether_addr_copy(&peer_eth_addrs[fs->peer_addr],
+		rte_ether_addr_copy(&peer_eth_addrs[fs->peer_addr],
 				&eth_hdr->d_addr);
-		ether_addr_copy(&ports[fs->tx_port].eth_addr,
+		rte_ether_addr_copy(&ports[fs->tx_port].eth_addr,
 				&eth_hdr->s_addr);
 		parse_ethernet(eth_hdr, &info);
 		l3_hdr = (char *)eth_hdr + info.l2_len;
app/test-pmd/flowgen.c +2 -2
index ac56ca1d8..3f29e9408 100644
@@ -171,8 +171,8 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
 
 		/* Initialize Ethernet header. */
 		eth_hdr = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
-		ether_addr_copy(&cfg_ether_dst, &eth_hdr->d_addr);
-		ether_addr_copy(&cfg_ether_src, &eth_hdr->s_addr);
+		rte_ether_addr_copy(&cfg_ether_dst, &eth_hdr->d_addr);
+		rte_ether_addr_copy(&cfg_ether_src, &eth_hdr->s_addr);
 		eth_hdr->ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
 
 		/* Initialize IP header. */
app/test-pmd/icmpecho.c +16 -11
index 3cc4d25a4..f41179208 100644
@@ -225,7 +225,7 @@ ether_addr_dump(const char *what, const struct rte_ether_addr *ea)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
 
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, ea);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, ea);
 	if (what)
 		printf("%s", what);
 	printf("%s", buf);
@@ -370,12 +370,14 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 				continue;
 			}
 			if (verbose_level > 0) {
-				ether_addr_copy(&arp_h->arp_data.arp_sha, &eth_addr);
+				rte_ether_addr_copy(&arp_h->arp_data.arp_sha,
+						&eth_addr);
 				ether_addr_dump("        sha=", &eth_addr);
 				ip_addr = arp_h->arp_data.arp_sip;
 				ipv4_addr_dump(" sip=", ip_addr);
 				printf("\n");
-				ether_addr_copy(&arp_h->arp_data.arp_tha, &eth_addr);
+				rte_ether_addr_copy(&arp_h->arp_data.arp_tha,
+						&eth_addr);
 				ether_addr_dump("        tha=", &eth_addr);
 				ip_addr = arp_h->arp_data.arp_tip;
 				ipv4_addr_dump(" tip=", ip_addr);
@@ -391,15 +393,18 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 			 */
 
 			/* Use source MAC address as destination MAC address. */
-			ether_addr_copy(&eth_h->s_addr, &eth_h->d_addr);
+			rte_ether_addr_copy(&eth_h->s_addr, &eth_h->d_addr);
 			/* Set source MAC address with MAC address of TX port */
-			ether_addr_copy(&ports[fs->tx_port].eth_addr,
+			rte_ether_addr_copy(&ports[fs->tx_port].eth_addr,
 					&eth_h->s_addr);
 
 			arp_h->arp_opcode = rte_cpu_to_be_16(RTE_ARP_OP_REPLY);
-			ether_addr_copy(&arp_h->arp_data.arp_tha, &eth_addr);
-			ether_addr_copy(&arp_h->arp_data.arp_sha, &arp_h->arp_data.arp_tha);
-			ether_addr_copy(&eth_h->s_addr, &arp_h->arp_data.arp_sha);
+			rte_ether_addr_copy(&arp_h->arp_data.arp_tha,
+					&eth_addr);
+			rte_ether_addr_copy(&arp_h->arp_data.arp_sha,
+					&arp_h->arp_data.arp_tha);
+			rte_ether_addr_copy(&eth_h->s_addr,
+					&arp_h->arp_data.arp_sha);
 
 			/* Swap IP addresses in ARP payload */
 			ip_addr = arp_h->arp_data.arp_sip;
@@ -456,9 +461,9 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
 		 * ICMP checksum is computed by assuming it is valid in the
 		 * echo request and not verified.
 		 */
-		ether_addr_copy(&eth_h->s_addr, &eth_addr);
-		ether_addr_copy(&eth_h->d_addr, &eth_h->s_addr);
-		ether_addr_copy(&eth_addr, &eth_h->d_addr);
+		rte_ether_addr_copy(&eth_h->s_addr, &eth_addr);
+		rte_ether_addr_copy(&eth_h->d_addr, &eth_h->s_addr);
+		rte_ether_addr_copy(&eth_addr, &eth_h->d_addr);
 		ip_addr = ip_h->src_addr;
 		if (is_multicast_ipv4_addr(ip_h->dst_addr)) {
 			uint32_t ip_src;
app/test-pmd/ieee1588fwd.c +3 -3
index c6aa3c618..2b7003be4 100644
@@ -178,9 +178,9 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
 	port_ieee1588_rx_timestamp_check(fs->rx_port, timesync_index);
 
 	/* Swap dest and src mac addresses. */
-	ether_addr_copy(&eth_hdr->d_addr, &addr);
-	ether_addr_copy(&eth_hdr->s_addr, &eth_hdr->d_addr);
-	ether_addr_copy(&addr, &eth_hdr->s_addr);
+	rte_ether_addr_copy(&eth_hdr->d_addr, &addr);
+	rte_ether_addr_copy(&eth_hdr->s_addr, &eth_hdr->d_addr);
+	rte_ether_addr_copy(&addr, &eth_hdr->s_addr);
 
 	/* Forward PTP packet with hardware TX timestamp */
 	mb->ol_flags |= PKT_TX_IEEE1588_TMST;
app/test-pmd/macfwd.c +2 -2
index 631f86f3e..f15149252 100644
@@ -92,9 +92,9 @@ pkt_burst_mac_forward(struct fwd_stream *fs)
 						       void *));
 		mb = pkts_burst[i];
 		eth_hdr = rte_pktmbuf_mtod(mb, struct rte_ether_hdr *);
-		ether_addr_copy(&peer_eth_addrs[fs->peer_addr],
+		rte_ether_addr_copy(&peer_eth_addrs[fs->peer_addr],
 				&eth_hdr->d_addr);
-		ether_addr_copy(&ports[fs->tx_port].eth_addr,
+		rte_ether_addr_copy(&ports[fs->tx_port].eth_addr,
 				&eth_hdr->s_addr);
 		mb->ol_flags &= IND_ATTACHED_MBUF | EXT_ATTACHED_MBUF;
 		mb->ol_flags |= ol_flags;
app/test-pmd/macswap.h +3 -3
index d53e5d482..013844156 100644
@@ -29,9 +29,9 @@ do_macswap(struct rte_mbuf *pkts[], uint16_t nb,
 		eth_hdr = rte_pktmbuf_mtod(mb, struct rte_ether_hdr *);
 
 		/* Swap dest and src mac addresses. */
-		ether_addr_copy(&eth_hdr->d_addr, &addr);
-		ether_addr_copy(&eth_hdr->s_addr, &eth_hdr->d_addr);
-		ether_addr_copy(&addr, &eth_hdr->s_addr);
+		rte_ether_addr_copy(&eth_hdr->d_addr, &addr);
+		rte_ether_addr_copy(&eth_hdr->s_addr, &eth_hdr->d_addr);
+		rte_ether_addr_copy(&addr, &eth_hdr->s_addr);
 
 		mbuf_field_set(mb, ol_flags);
 	}
app/test-pmd/txonly.c +2 -2
index e558b4018..eb3a245d2 100644
@@ -266,8 +266,8 @@ pkt_burst_transmit(struct fwd_stream *fs)
 	/*
 	 * Initialize Ethernet header.
 	 */
-	ether_addr_copy(&peer_eth_addrs[fs->peer_addr], &eth_hdr.d_addr);
-	ether_addr_copy(&ports[fs->tx_port].eth_addr, &eth_hdr.s_addr);
+	rte_ether_addr_copy(&peer_eth_addrs[fs->peer_addr], &eth_hdr.d_addr);
+	rte_ether_addr_copy(&ports[fs->tx_port].eth_addr, &eth_hdr.s_addr);
 	eth_hdr.ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
 
 	if (rte_mempool_get_bulk(mbp, (void **)pkts_burst,
app/test-pmd/util.c +1 -1
index 0544b8e53..55f3844dd 100644
@@ -17,7 +17,7 @@ static inline void
 print_ether_addr(const char *what, struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
 	printf("%s%s", what, buf);
 }
 
app/test/packet_burst_generator.c +4 -4
index a05e3c86c..ba94e6193 100644
@@ -58,8 +58,8 @@ initialize_eth_header(struct rte_ether_hdr *eth_hdr,
 		struct rte_ether_addr *dst_mac, uint16_t ether_type,
 		uint8_t vlan_enabled, uint16_t van_id)
 {
-	ether_addr_copy(dst_mac, &eth_hdr->d_addr);
-	ether_addr_copy(src_mac, &eth_hdr->s_addr);
+	rte_ether_addr_copy(dst_mac, &eth_hdr->d_addr);
+	rte_ether_addr_copy(src_mac, &eth_hdr->s_addr);
 
 	if (vlan_enabled) {
 		struct rte_vlan_hdr *vhdr = (struct rte_vlan_hdr *)(
@@ -86,9 +86,9 @@ initialize_arp_header(struct rte_arp_hdr *arp_hdr,
 	arp_hdr->arp_hlen = ETHER_ADDR_LEN;
 	arp_hdr->arp_plen = sizeof(uint32_t);
 	arp_hdr->arp_opcode = rte_cpu_to_be_16(opcode);
-	ether_addr_copy(src_mac, &arp_hdr->arp_data.arp_sha);
+	rte_ether_addr_copy(src_mac, &arp_hdr->arp_data.arp_sha);
 	arp_hdr->arp_data.arp_sip = src_ip;
-	ether_addr_copy(dst_mac, &arp_hdr->arp_data.arp_tha);
+	rte_ether_addr_copy(dst_mac, &arp_hdr->arp_data.arp_tha);
 	arp_hdr->arp_data.arp_tip = dst_ip;
 }
 
app/test/test_link_bonding.c +11 -7
index e4946dcca..5a7f45f94 100644
@@ -4510,7 +4510,7 @@ test_alb_change_mac_in_reply_sent(void)
 				MAX_PKT_BURST);
 	}
 
-	ether_addr_copy(
+	rte_ether_addr_copy(
 			rte_eth_devices[test_params->bonded_port_id].data->mac_addrs,
 			&bond_mac);
 
@@ -4583,12 +4583,14 @@ test_alb_change_mac_in_reply_sent(void)
 						sizeof(struct rte_ether_hdr));
 
 			if (slave_idx%2 == 0) {
-				if (!is_same_ether_addr(slave_mac1, &arp_pkt->arp_data.arp_sha)) {
+				if (!rte_is_same_ether_addr(slave_mac1,
+						&arp_pkt->arp_data.arp_sha)) {
 					retval = -1;
 					goto test_end;
 				}
 			} else {
-				if (!is_same_ether_addr(slave_mac2, &arp_pkt->arp_data.arp_sha)) {
+				if (!rte_is_same_ether_addr(slave_mac2,
+						&arp_pkt->arp_data.arp_sha)) {
 					retval = -1;
 					goto test_end;
 				}
@@ -4629,7 +4631,7 @@ test_alb_reply_from_client(void)
 				MAX_PKT_BURST);
 	}
 
-	ether_addr_copy(
+	rte_ether_addr_copy(
 			rte_eth_devices[test_params->bonded_port_id].data->mac_addrs,
 			&bond_mac);
 
@@ -4710,12 +4712,14 @@ test_alb_reply_from_client(void)
 						sizeof(struct rte_ether_hdr));
 
 			if (slave_idx%2 == 0) {
-				if (!is_same_ether_addr(slave_mac1, &arp_pkt->arp_data.arp_sha)) {
+				if (!rte_is_same_ether_addr(slave_mac1,
+						&arp_pkt->arp_data.arp_sha)) {
 					retval = -1;
 					goto test_end;
 				}
 			} else {
-				if (!is_same_ether_addr(slave_mac2, &arp_pkt->arp_data.arp_sha)) {
+				if (!rte_is_same_ether_addr(slave_mac2,
+						&arp_pkt->arp_data.arp_sha)) {
 					retval = -1;
 					goto test_end;
 				}
@@ -4762,7 +4766,7 @@ test_alb_receive_vlan_reply(void)
 				MAX_PKT_BURST);
 	}
 
-	ether_addr_copy(
+	rte_ether_addr_copy(
 			rte_eth_devices[test_params->bonded_port_id].data->mac_addrs,
 			&bond_mac);
 
app/test/test_link_bonding_mode4.c +16 -13
index de23dd959..0bb81fd2e 100644
@@ -232,7 +232,7 @@ add_slave(struct slave_conf *slave, uint8_t start)
 	RTE_VERIFY(slave->bonded == 0);
 	RTE_VERIFY(slave->port_id != INVALID_PORT_ID);
 
-	ether_addr_copy(&slave_mac_default, &addr);
+	rte_ether_addr_copy(&slave_mac_default, &addr);
 	addr.addr_bytes[ETHER_ADDR_LEN - 1] = slave->port_id;
 
 	rte_eth_dev_mac_addr_remove(slave->port_id, &addr);
@@ -253,7 +253,7 @@ add_slave(struct slave_conf *slave, uint8_t start)
 	}
 
 	rte_eth_macaddr_get(slave->port_id, &addr_check);
-	TEST_ASSERT_EQUAL(is_same_ether_addr(&addr, &addr_check), 1,
+	TEST_ASSERT_EQUAL(rte_is_same_ether_addr(&addr, &addr_check), 1,
 			"Slave MAC address is not as expected");
 
 	RTE_VERIFY(slave->lacp_parnter_state == 0);
@@ -491,7 +491,7 @@ make_lacp_reply(struct slave_conf *slave, struct rte_mbuf *pkt)
 	slow_hdr = rte_pktmbuf_mtod(pkt, struct slow_protocol_frame *);
 
 	/* Change source address to partner address */
-	ether_addr_copy(&parnter_mac_default, &slow_hdr->eth_hdr.s_addr);
+	rte_ether_addr_copy(&parnter_mac_default, &slow_hdr->eth_hdr.s_addr);
 	slow_hdr->eth_hdr.s_addr.addr_bytes[ETHER_ADDR_LEN - 1] = slave->port_id;
 
 	lacp = (struct lacpdu *) &slow_hdr->slow_protocol;
@@ -503,7 +503,7 @@ make_lacp_reply(struct slave_conf *slave, struct rte_mbuf *pkt)
 
 	lacp->partner.state = lacp->actor.state;
 
-	ether_addr_copy(&parnter_system, &lacp->actor.port_params.system);
+	rte_ether_addr_copy(&parnter_system, &lacp->actor.port_params.system);
 	lacp->actor.state = STATE_LACP_ACTIVE |
 						STATE_SYNCHRONIZATION |
 						STATE_AGGREGATION |
@@ -812,7 +812,7 @@ test_mode4_rx(void)
 	TEST_ASSERT_SUCCESS(retval, "Initial handshake failed");
 
 	rte_eth_macaddr_get(test_params.bonded_port_id, &bonded_mac);
-	ether_addr_copy(&bonded_mac, &dst_mac);
+	rte_ether_addr_copy(&bonded_mac, &dst_mac);
 
 	/* Assert that dst address is not bonding address.  Do not set the
 	 * least significant bit of the zero byte as this would create a
@@ -847,7 +847,8 @@ test_mode4_rx(void)
 
 		for (i = 0; i < expected_pkts_cnt; i++) {
 			hdr = rte_pktmbuf_mtod(pkts[i], struct rte_ether_hdr *);
-			cnt[is_same_ether_addr(&hdr->d_addr, &bonded_mac)]++;
+			cnt[rte_is_same_ether_addr(&hdr->d_addr,
+							&bonded_mac)]++;
 		}
 
 		free_pkts(pkts, expected_pkts_cnt);
@@ -891,7 +892,8 @@ test_mode4_rx(void)
 
 		for (i = 0; i < expected_pkts_cnt; i++) {
 			hdr = rte_pktmbuf_mtod(pkts[i], struct rte_ether_hdr *);
-			eq_cnt += is_same_ether_addr(&hdr->d_addr, &bonded_mac);
+			eq_cnt += rte_is_same_ether_addr(&hdr->d_addr,
+							&bonded_mac);
 		}
 
 		free_pkts(pkts, expected_pkts_cnt);
@@ -1133,10 +1135,11 @@ init_marker(struct rte_mbuf *pkt, struct slave_conf *slave)
 			struct marker_header *);
 
 	/* Copy multicast destination address */
-	ether_addr_copy(&slow_protocol_mac_addr, &marker_hdr->eth_hdr.d_addr);
+	rte_ether_addr_copy(&slow_protocol_mac_addr,
+			&marker_hdr->eth_hdr.d_addr);
 
 	/* Init source address */
-	ether_addr_copy(&parnter_mac_default, &marker_hdr->eth_hdr.s_addr);
+	rte_ether_addr_copy(&parnter_mac_default, &marker_hdr->eth_hdr.s_addr);
 	marker_hdr->eth_hdr.s_addr.addr_bytes[ETHER_ADDR_LEN-1] = slave->port_id;
 
 	marker_hdr->eth_hdr.ether_type = rte_cpu_to_be_16(ETHER_TYPE_SLOW);
@@ -1361,8 +1364,8 @@ test_mode4_ext_ctrl(void)
 		},
 	};
 
-	ether_addr_copy(&parnter_system, &src_mac);
-	ether_addr_copy(&slow_protocol_mac_addr, &dst_mac);
+	rte_ether_addr_copy(&parnter_system, &src_mac);
+	rte_ether_addr_copy(&slow_protocol_mac_addr, &dst_mac);
 
 	initialize_eth_header(&lacpdu.eth_hdr, &src_mac, &dst_mac,
 			      ETHER_TYPE_SLOW, 0, 0);
@@ -1415,8 +1418,8 @@ test_mode4_ext_lacp(void)
 		},
 	};
 
-	ether_addr_copy(&parnter_system, &src_mac);
-	ether_addr_copy(&slow_protocol_mac_addr, &dst_mac);
+	rte_ether_addr_copy(&parnter_system, &src_mac);
+	rte_ether_addr_copy(&slow_protocol_mac_addr, &dst_mac);
 
 	initialize_eth_header(&lacpdu.eth_hdr, &src_mac, &dst_mac,
 			      ETHER_TYPE_SLOW, 0, 0);
app/test/test_pmd_perf.c +1 -1
index b85da914c..a0c3eb956 100644
@@ -174,7 +174,7 @@ static void
 print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
 	printf("%s%s", name, buf);
 }
 
doc/guides/sample_app_ug/ipv4_multicast.rst +2 -2
index 1fe6bf113..0b44ab90b 100644
@@ -227,8 +227,8 @@ The actual packet transmission is done in the mcast_send_pkt() function:
 
         RTE_ASSERT(ethdr != NULL);
 
-        ether_addr_copy(dest_addr, &ethdr->d_addr);
-        ether_addr_copy(&ports_eth_addr[port], &ethdr->s_addr);
+        rte_ether_addr_copy(dest_addr, &ethdr->d_addr);
+        rte_ether_addr_copy(&ports_eth_addr[port], &ethdr->s_addr);
         ethdr->ether_type = rte_be_to_cpu_16(ETHER_TYPE_IPv4);
 
         /* Put new packet into the output queue */
doc/guides/sample_app_ug/l2_forward_job_stats.rst +1 -1
index 02c1367f5..8d0c38721 100644
@@ -467,7 +467,7 @@ Naturally, the number of ports in the portmask must be even, otherwise, the appl
 
         /* src addr */
 
-        ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], &eth->s_addr);
+        rte_ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], &eth->s_addr);
 
         l2fwd_send_packet(m, (uint8_t) dst_port);
     }
doc/guides/sample_app_ug/l2_forward_real_virtual.rst +1 -1
index 54e5b8022..bede06ed1 100644
@@ -383,7 +383,7 @@ Naturally, the number of ports in the portmask must be even, otherwise, the appl
 
         /* src addr */
 
-        ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], &eth->s_addr);
+        rte_ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], &eth->s_addr);
 
         l2fwd_send_packet(m, (uint8_t) dst_port);
     }
doc/guides/sample_app_ug/link_status_intr.rst +1 -1
index 3fd043e82..cfb1bcd58 100644
@@ -324,7 +324,7 @@ The processing is very simple: processes the TX port from the RX port and then r
         *((uint64_t *)tmp) = 0x000000000002 + (dst_port << 40);
 
         /* src addr */
-        ether_addr_copy(&lsi_ports_eth_addr[dst_port], &eth->s_addr);
+        rte_ether_addr_copy(&lsi_ports_eth_addr[dst_port], &eth->s_addr);
 
         lsi_send_packet(m, dst_port);
     }
drivers/net/atlantic/atl_ethdev.c +1 -1
index 9460318ae..6b395806c 100644
@@ -1578,7 +1578,7 @@ static int
 atl_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
 			uint32_t index __rte_unused, uint32_t pool __rte_unused)
 {
-	if (is_zero_ether_addr(mac_addr)) {
+	if (rte_is_zero_ether_addr(mac_addr)) {
 		PMD_DRV_LOG(ERR, "Invalid Ethernet Address");
 		return -EINVAL;
 	}
drivers/net/atlantic/hw_atl/hw_atl_utils.c +2 -2
index 26a53a203..84d11ab3a 100644
@@ -657,7 +657,7 @@ static int hw_atl_utils_get_mac_permanent(struct aq_hw_s *self,
 		mac_addr[1] = rte_constant_bswap32(mac_addr[1]);
 	}
 
-	ether_addr_copy((struct rte_ether_addr *)mac_addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)mac_addr,
 			(struct rte_ether_addr *)mac);
 
 	if ((mac[0] & 0x01U) || ((mac[0] | mac[1] | mac[2]) == 0x00U)) {
@@ -868,7 +868,7 @@ static int aq_fw1x_set_wol(struct aq_hw_s *self, bool wol_enabled, u8 *mac)
 		prpc->msg_wol.pattern_id = 1U;
 		prpc->msg_wol.wol_packet_type = 2U; /* Magic Packet */
 
-		ether_addr_copy((struct rte_ether_addr *)mac,
+		rte_ether_addr_copy((struct rte_ether_addr *)mac,
 			(struct rte_ether_addr *)&prpc->msg_wol.wol_pattern);
 	} else {
 		rpc_size = sizeof(prpc->msg_id) + sizeof(prpc->msg_del_id);
drivers/net/atlantic/hw_atl/hw_atl_utils_fw2x.c +1 -1
index 55b5ce3e3..70d6e14bb 100644
@@ -228,7 +228,7 @@ int aq_fw2x_get_mac_permanent(struct aq_hw_s *self, u8 *mac)
 		mac_addr[1] = rte_constant_bswap32(mac_addr[1]);
 	}
 
-	ether_addr_copy((struct rte_ether_addr *)mac_addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)mac_addr,
 			(struct rte_ether_addr *)mac);
 
 	if ((mac[0] & 0x01U) || ((mac[0] | mac[1] | mac[2]) == 0x00U)) {
drivers/net/avp/avp_ethdev.c +3 -3
index 69a70d2cc..38e5eae05 100644
@@ -1014,7 +1014,7 @@ eth_avp_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	/* Get a mac from device config */
-	ether_addr_copy(&avp->ethaddr, &eth_dev->data->mac_addrs[0]);
+	rte_ether_addr_copy(&avp->ethaddr, &eth_dev->data->mac_addrs[0]);
 
 	return 0;
 }
@@ -1216,12 +1216,12 @@ _avp_mac_filter(struct avp_dev *avp, struct rte_mbuf *m)
 		return 0;
 	}
 
-	if (likely(is_broadcast_ether_addr(&eth->d_addr))) {
+	if (likely(rte_is_broadcast_ether_addr(&eth->d_addr))) {
 		/* allow all broadcast packets */
 		return 0;
 	}
 
-	if (likely(is_multicast_ether_addr(&eth->d_addr))) {
+	if (likely(rte_is_multicast_ether_addr(&eth->d_addr))) {
 		/* allow all multicast packets */
 		return 0;
 	}
drivers/net/axgbe/axgbe_ethdev.c +3 -3
index e89c0ec2c..237b75c5d 100644
@@ -634,11 +634,11 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
 		return -ENOMEM;
 	}
 
-	if (!is_valid_assigned_ether_addr(&pdata->mac_addr))
-		eth_random_addr(pdata->mac_addr.addr_bytes);
+	if (!rte_is_valid_assigned_ether_addr(&pdata->mac_addr))
+		rte_eth_random_addr(pdata->mac_addr.addr_bytes);
 
 	/* Copy the permanent MAC address */
-	ether_addr_copy(&pdata->mac_addr, &eth_dev->data->mac_addrs[0]);
+	rte_ether_addr_copy(&pdata->mac_addr, &eth_dev->data->mac_addrs[0]);
 
 	/* Clock settings */
 	pdata->sysclk_rate = AXGBE_V2_DMA_CLOCK_FREQ;
drivers/net/bnx2x/bnx2x.c +2 -2
index 17b6817b6..39d30913b 100644
@@ -2214,8 +2214,8 @@ int bnx2x_tx_encap(struct bnx2x_tx_queue *txq, struct rte_mbuf *m0)
 
 		tx_parse_bd =
 		    &txq->tx_ring[TX_BD(bd_prod, txq)].parse_bd_e2;
-		if (is_multicast_ether_addr(&eh->d_addr)) {
-			if (is_broadcast_ether_addr(&eh->d_addr))
+		if (rte_is_multicast_ether_addr(&eh->d_addr)) {
+			if (rte_is_broadcast_ether_addr(&eh->d_addr))
 				mac_type = BROADCAST_ADDRESS;
 			else
 				mac_type = MULTICAST_ADDRESS;
drivers/net/bnx2x/bnx2x_vfpf.c +3 -3
index cd5522d03..7cf738a82 100644
@@ -300,11 +300,11 @@ int bnx2x_vf_get_resources(struct bnx2x_softc *sc, uint8_t tx_count, uint8_t rx_
 		sc->igu_sb_cnt, sc->igu_base_sb);
 	strncpy(sc->fw_ver, sc_resp.fw_ver, sizeof(sc->fw_ver));
 
-	if (is_valid_assigned_ether_addr(&sc_resp.resc.current_mac_addr))
-		ether_addr_copy(&sc_resp.resc.current_mac_addr,
+	if (rte_is_valid_assigned_ether_addr(&sc_resp.resc.current_mac_addr))
+		rte_ether_addr_copy(&sc_resp.resc.current_mac_addr,
 			(struct rte_ether_addr *)sc->link_params.mac_addr);
 	else
-		eth_random_addr(sc->link_params.mac_addr);
+		rte_eth_random_addr(sc->link_params.mac_addr);
 
 out:
 	bnx2x_vf_finalize(sc, &acq->first_tlv);
drivers/net/bnxt/bnxt_flow.c +6 -6
index 1afe67407..a1f527d4f 100644
@@ -187,10 +187,10 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
 			 * Destination MAC address mask must not be partially
 			 * set. Should be all 1's or all 0's.
 			 */
-			if ((!is_zero_ether_addr(&eth_mask->src) &&
-			     !is_broadcast_ether_addr(&eth_mask->src)) ||
-			    (!is_zero_ether_addr(&eth_mask->dst) &&
-			     !is_broadcast_ether_addr(&eth_mask->dst))) {
+			if ((!rte_is_zero_ether_addr(&eth_mask->src) &&
+			     !rte_is_broadcast_ether_addr(&eth_mask->src)) ||
+			    (!rte_is_zero_ether_addr(&eth_mask->dst) &&
+			     !rte_is_broadcast_ether_addr(&eth_mask->dst))) {
 				rte_flow_error_set(error,
 						   EINVAL,
 						   RTE_FLOW_ERROR_TYPE_ITEM,
@@ -209,7 +209,7 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
 				return -rte_errno;
 			}
 
-			if (is_broadcast_ether_addr(&eth_mask->dst)) {
+			if (rte_is_broadcast_ether_addr(&eth_mask->dst)) {
 				rte_memcpy(filter->dst_macaddr,
 					   &eth_spec->dst, 6);
 				en |= use_ntuple ?
@@ -217,7 +217,7 @@ bnxt_validate_and_parse_flow_type(struct bnxt *bp,
 					EM_FLOW_ALLOC_INPUT_EN_DST_MACADDR;
 			}
 
-			if (is_broadcast_ether_addr(&eth_mask->src)) {
+			if (rte_is_broadcast_ether_addr(&eth_mask->src)) {
 				rte_memcpy(filter->src_macaddr,
 					   &eth_spec->src, 6);
 				en |= use_ntuple ?
drivers/net/bnxt/bnxt_hwrm.c +1 -1
index 59e75b0be..e2fe4f7a0 100644
@@ -2586,7 +2586,7 @@ static void add_random_mac_if_needed(struct bnxt *bp,
 	if (memcmp(mac.addr_bytes, "\x00\x00\x00\x00\x00", 6) == 0) {
 		cfg_req->enables |=
 		rte_cpu_to_le_32(HWRM_FUNC_CFG_INPUT_ENABLES_DFLT_MAC_ADDR);
-		eth_random_addr(cfg_req->dflt_mac_addr);
+		rte_eth_random_addr(cfg_req->dflt_mac_addr);
 		bp->pf.vf_info[vf].random_mac = true;
 	} else {
 		memcpy(cfg_req->dflt_mac_addr, mac.addr_bytes, ETHER_ADDR_LEN);
drivers/net/bonding/rte_eth_bond_8023ad.c +12 -10
index 51bf3f52e..6077c3dc8 100644
@@ -322,7 +322,7 @@ rx_machine(struct bond_dev_private *internals, uint16_t slave_id,
 		agg = &bond_mode_8023ad_ports[port->aggregator_port_id];
 		bool match = port->actor.system_priority ==
 			lacp->partner.port_params.system_priority &&
-			is_same_ether_addr(&agg->actor.system,
+			rte_is_same_ether_addr(&agg->actor.system,
 			&lacp->partner.port_params.system) &&
 			port->actor.port_priority ==
 			lacp->partner.port_params.port_priority &&
@@ -575,7 +575,7 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id)
 	hdr = rte_pktmbuf_mtod(lacp_pkt, struct lacpdu_header *);
 
 	/* Source and destination MAC */
-	ether_addr_copy(&lacp_mac_addr, &hdr->eth_hdr.d_addr);
+	rte_ether_addr_copy(&lacp_mac_addr, &hdr->eth_hdr.d_addr);
 	rte_eth_macaddr_get(slave_id, &hdr->eth_hdr.s_addr);
 	hdr->eth_hdr.ether_type = rte_cpu_to_be_16(ETHER_TYPE_SLOW);
 
@@ -592,7 +592,8 @@ tx_machine(struct bond_dev_private *internals, uint16_t slave_id)
 	memcpy(&hdr->lacpdu.actor.port_params, &port->actor,
 			sizeof(port->actor));
 	agg = &bond_mode_8023ad_ports[port->aggregator_port_id];
-	ether_addr_copy(&agg->actor.system, &hdr->lacpdu.actor.port_params.system);
+	rte_ether_addr_copy(&agg->actor.system,
+			&hdr->lacpdu.actor.port_params.system);
 	lacpdu->actor.state = port->actor_state;
 
 	/* PARTNER */
@@ -694,9 +695,10 @@ selection_logic(struct bond_dev_private *internals, uint16_t slave_id)
 		 * ID (MAC address). */
 		if ((agg->actor.key == port->actor.key &&
 			agg->partner.system_priority == port->partner.system_priority &&
-			is_same_ether_addr(&agg->partner.system, &port->partner.system) == 1
+			rte_is_same_ether_addr(&agg->partner.system,
+					&port->partner.system) == 1
 			&& (agg->partner.key == port->partner.key)) &&
-			is_zero_ether_addr(&port->partner.system) != 1 &&
+			rte_is_zero_ether_addr(&port->partner.system) != 1 &&
 			(agg->actor.key &
 				rte_cpu_to_be_16(BOND_LINK_FULL_DUPLEX_KEY)) != 0) {
 
@@ -791,7 +793,7 @@ rx_machine_update(struct bond_dev_private *internals, uint16_t slave_id,
 		RTE_ASSERT(lacp->lacpdu.subtype == SLOW_SUBTYPE_LACP);
 
 		partner = &lacp->lacpdu.partner;
-		if (is_same_ether_addr(&partner->port_params.system,
+		if (rte_is_same_ether_addr(&partner->port_params.system,
 			&internals->mode4.mac_addr)) {
 			/* This LACP frame is sending to the bonding port
 			 * so pass it to rx_machine.
@@ -842,8 +844,8 @@ bond_mode_8023ad_periodic_cb(void *arg)
 			SM_FLAG_SET(port, NTT);
 		}
 
-		if (!is_same_ether_addr(&port->actor.system, &slave_addr)) {
-			ether_addr_copy(&slave_addr, &port->actor.system);
+		if (!rte_is_same_ether_addr(&port->actor.system, &slave_addr)) {
+			rte_ether_addr_copy(&slave_addr, &port->actor.system);
 			if (port->aggregator_port_id == slave_id)
 				SM_FLAG_SET(port, NTT);
 		}
@@ -1055,10 +1057,10 @@ bond_mode_8023ad_mac_address_update(struct rte_eth_dev *bond_dev)
 		slave = &bond_mode_8023ad_ports[slave_id];
 		rte_eth_macaddr_get(slave_id, &slave_addr);
 
-		if (is_same_ether_addr(&slave_addr, &slave->actor.system))
+		if (rte_is_same_ether_addr(&slave_addr, &slave->actor.system))
 			continue;
 
-		ether_addr_copy(&slave_addr, &slave->actor.system);
+		rte_ether_addr_copy(&slave_addr, &slave->actor.system);
 		/* Do nothing if this port is not an aggregator. In other case
 		 * Set NTT flag on every port that use this aggregator. */
 		if (slave->aggregator_port_id != slave_id)
drivers/net/bonding/rte_eth_bond_alb.c +26 -16

91 lines not on this page · raw message

drivers/net/bonding/rte_eth_bond_pmd.c +10 -8
index d960e7ff6..e83e668ad 100644
@@ -454,8 +454,8 @@ bond_ethdev_rx_burst_8023ad(void *queue, struct rte_mbuf **bufs,
 			if (unlikely(is_lacp_packets(hdr->ether_type, subtype, bufs[j]) ||
 				!collecting ||
 				(!promisc &&
-				 !is_multicast_ether_addr(&hdr->d_addr) &&
-				 !is_same_ether_addr(bond_mac,
+				 !rte_is_multicast_ether_addr(&hdr->d_addr) &&
+				 !rte_is_same_ether_addr(bond_mac,
 						     &hdr->d_addr)))) {
 
 				if (hdr->ether_type == ether_type_slow_be) {
@@ -1021,7 +1021,7 @@ bond_ethdev_tx_burst_tlb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 				sizeof(internals->tlb_slaves_order[0]) * num_of_slaves);
 
 
-	ether_addr_copy(primary_port->data->mac_addrs, &primary_slave_addr);
+	rte_ether_addr_copy(primary_port->data->mac_addrs, &primary_slave_addr);
 
 	if (nb_pkts > 3) {
 		for (i = 0; i < 3; i++)
@@ -1036,8 +1036,10 @@ bond_ethdev_tx_burst_tlb(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
 
 			ether_hdr = rte_pktmbuf_mtod(bufs[j],
 						struct rte_ether_hdr *);
-			if (is_same_ether_addr(&ether_hdr->s_addr, &primary_slave_addr))
-				ether_addr_copy(&active_slave_addr, &ether_hdr->s_addr);
+			if (rte_is_same_ether_addr(&ether_hdr->s_addr,
+							&primary_slave_addr))
+				rte_ether_addr_copy(&active_slave_addr,
+						&ether_hdr->s_addr);
 #if defined(RTE_LIBRTE_BOND_DEBUG_ALB) || defined(RTE_LIBRTE_BOND_DEBUG_ALB_L1)
 					mode6_debug("TX IPv4:", ether_hdr, slaves[i], &burstnumberTX);
 #endif
@@ -1523,7 +1525,7 @@ mac_address_get(struct rte_eth_dev *eth_dev,
 
 	mac_addr = eth_dev->data->mac_addrs;
 
-	ether_addr_copy(mac_addr, dst_mac_addr);
+	rte_ether_addr_copy(mac_addr, dst_mac_addr);
 	return 0;
 }
 
@@ -1566,7 +1568,7 @@ slave_add_mac_addresses(struct rte_eth_dev *bonded_eth_dev,
 
 	for (i = 1; i < BOND_MAX_MAC_ADDRS; i++) {
 		mac_addr = &bonded_eth_dev->data->mac_addrs[i];
-		if (is_same_ether_addr(mac_addr, &null_mac_addr))
+		if (rte_is_same_ether_addr(mac_addr, &null_mac_addr))
 			break;
 
 		ret = rte_eth_dev_mac_addr_add(slave_port_id, mac_addr, 0);
@@ -1595,7 +1597,7 @@ slave_remove_mac_addresses(struct rte_eth_dev *bonded_eth_dev,
 	rc = 0;
 	for (i = 1; i < BOND_MAX_MAC_ADDRS; i++) {
 		mac_addr = &bonded_eth_dev->data->mac_addrs[i];
-		if (is_same_ether_addr(mac_addr, &null_mac_addr))
+		if (rte_is_same_ether_addr(mac_addr, &null_mac_addr))
 			break;
 
 		ret = rte_eth_dev_mac_addr_remove(slave_port_id, mac_addr);
drivers/net/cxgbe/base/adapter.h +1 -1
index b54f75ebc..122166410 100644
@@ -671,7 +671,7 @@ static inline void t4_os_set_hw_addr(struct adapter *adapter, int port_idx,
 {
 	struct port_info *pi = adap2pinfo(adapter, port_idx);
 
-	ether_addr_copy((struct rte_ether_addr *)hw_addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)hw_addr,
 			&pi->eth_dev->data->mac_addrs[0]);
 }
 
drivers/net/cxgbe/cxgbe_flow.c +2 -2
index ee9920ad6..a7b053b4a 100644
@@ -115,12 +115,12 @@ ch_rte_parsetype_eth(const void *dmask, const struct rte_flow_item *item,
 	mask = umask ? umask : (const struct rte_flow_item_eth *)dmask;
 
 	/* we don't support SRC_MAC filtering*/
-	if (!is_zero_ether_addr(&mask->src))
+	if (!rte_is_zero_ether_addr(&mask->src))
 		return rte_flow_error_set(e, ENOTSUP, RTE_FLOW_ERROR_TYPE_ITEM,
 					  item,
 					  "src mac filtering not supported");
 
-	if (!is_zero_ether_addr(&mask->dst)) {
+	if (!rte_is_zero_ether_addr(&mask->dst)) {
 		const u8 *addr = (const u8 *)&spec->dst.addr_bytes[0];
 		const u8 *m = (const u8 *)&mask->dst.addr_bytes[0];
 		struct rte_flow *flow = (struct rte_flow *)fs->private;
drivers/net/dpaa/dpaa_ethdev.c +1 -1
index 0e1dc1ae8..6716dd0cf 100644
@@ -1374,7 +1374,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	/* copy the primary mac address */
-	ether_addr_copy(&fman_intf->mac_addr, &eth_dev->data->mac_addrs[0]);
+	rte_ether_addr_copy(&fman_intf->mac_addr, &eth_dev->data->mac_addrs[0]);
 
 	RTE_LOG(INFO, PMD, "net: dpaa: %s: %02x:%02x:%02x:%02x:%02x:%02x\n",
 		dpaa_device->name,
drivers/net/dpaa2/dpaa2_ethdev.c +4 -4
index ae4d7e1cc..1afeaa919 100644
@@ -2021,9 +2021,9 @@ populate_mac_addr(struct fsl_mc_io *dpni_dev, struct dpaa2_dev_priv *priv,
 	 *  If empty_mac(phy), return prime.
 	 *  if both are empty, create random MAC, set as prime and return
 	 */
-	if (!is_zero_ether_addr(&phy_mac)) {
+	if (!rte_is_zero_ether_addr(&phy_mac)) {
 		/* If the addresses are not same, overwrite prime */
-		if (!is_same_ether_addr(&phy_mac, &prime_mac)) {
+		if (!rte_is_same_ether_addr(&phy_mac, &prime_mac)) {
 			ret = dpni_set_primary_mac_addr(dpni_dev, CMD_PRI_LOW,
 							priv->token,
 							phy_mac.addr_bytes);
@@ -2035,9 +2035,9 @@ populate_mac_addr(struct fsl_mc_io *dpni_dev, struct dpaa2_dev_priv *priv,
 			memcpy(&prime_mac, &phy_mac,
 				sizeof(struct rte_ether_addr));
 		}
-	} else if (is_zero_ether_addr(&prime_mac)) {
+	} else if (rte_is_zero_ether_addr(&prime_mac)) {
 		/* In case phys and prime, both are zero, create random MAC */
-		eth_random_addr(prime_mac.addr_bytes);
+		rte_eth_random_addr(prime_mac.addr_bytes);
 		ret = dpni_set_primary_mac_addr(dpni_dev, CMD_PRI_LOW,
 						priv->token,
 						prime_mac.addr_bytes);
drivers/net/e1000/em_ethdev.c +1 -1
index b2fdb5e10..cd70f2802 100644
@@ -294,7 +294,7 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	/* Copy the permanent MAC address */
-	ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
 		eth_dev->data->mac_addrs);
 
 	/* initialize the vfta */
drivers/net/e1000/igb_ethdev.c +4 -4
index e21a772fb..03047afa7 100644
@@ -840,7 +840,7 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	/* Copy the permanent MAC address */
-	ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
 			&eth_dev->data->mac_addrs[0]);
 
 	/* initialize the vfta */
@@ -1039,8 +1039,8 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	/* Generate a random MAC address, if none was assigned by PF. */
-	if (is_zero_ether_addr(perm_addr)) {
-		eth_random_addr(perm_addr->addr_bytes);
+	if (rte_is_zero_ether_addr(perm_addr)) {
+		rte_eth_random_addr(perm_addr->addr_bytes);
 		PMD_INIT_LOG(INFO, "\tVF MAC address not assigned by Host PF");
 		PMD_INIT_LOG(INFO, "\tAssign randomly generated MAC address "
 			     "%02x:%02x:%02x:%02x:%02x:%02x",
@@ -1059,7 +1059,7 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
 		return diag;
 	}
 	/* Copy the permanent MAC address */
-	ether_addr_copy((struct rte_ether_addr *)hw->mac.perm_addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.perm_addr,
 			&eth_dev->data->mac_addrs[0]);
 
 	PMD_INIT_LOG(DEBUG, "port %d vendorID=0x%x deviceID=0x%x "
drivers/net/e1000/igb_flow.c +4 -4
index 33683498a..8dcfc71c5 100644
@@ -548,9 +548,9 @@ cons_parse_ethertype_filter(const struct rte_flow_attr *attr,
 	 * Mask bits of destination MAC address must be full
 	 * of 1 or full of 0.
 	 */
-	if (!is_zero_ether_addr(&eth_mask->src) ||
-	    (!is_zero_ether_addr(&eth_mask->dst) &&
-	     !is_broadcast_ether_addr(&eth_mask->dst))) {
+	if (!rte_is_zero_ether_addr(&eth_mask->src) ||
+	    (!rte_is_zero_ether_addr(&eth_mask->dst) &&
+	     !rte_is_broadcast_ether_addr(&eth_mask->dst))) {
 		rte_flow_error_set(error, EINVAL,
 				RTE_FLOW_ERROR_TYPE_ITEM,
 				item, "Invalid ether address mask");
@@ -567,7 +567,7 @@ cons_parse_ethertype_filter(const struct rte_flow_attr *attr,
 	/* If mask bits of destination MAC address
 	 * are full of 1, set RTE_ETHTYPE_FLAGS_MAC.
 	 */
-	if (is_broadcast_ether_addr(&eth_mask->dst)) {
+	if (rte_is_broadcast_ether_addr(&eth_mask->dst)) {
 		filter->mac_addr = eth_spec->dst;
 		filter->flags |= RTE_ETHTYPE_FLAGS_MAC;
 	} else {
drivers/net/e1000/igb_pf.c +3 -3
index 9f1521350..ab48a269f 100644
@@ -43,7 +43,7 @@ int igb_vf_perm_addr_gen(struct rte_eth_dev *dev, uint16_t vf_num)
 	uint16_t vfn;
 
 	for (vfn = 0; vfn < vf_num; vfn++) {
-		eth_random_addr(vf_mac_addr);
+		rte_eth_random_addr(vf_mac_addr);
 		/* keep the random address as default */
 		memcpy(vfinfo[vfn].vf_mac_addresses, vf_mac_addr,
 				ETHER_ADDR_LEN);
@@ -306,8 +306,8 @@ igb_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 	uint8_t *new_mac = (uint8_t *)(&msgbuf[1]);
 	int rah;
 
-	if (is_unicast_ether_addr((struct rte_ether_addr *)new_mac)) {
-		if (!is_zero_ether_addr((struct rte_ether_addr *)new_mac))
+	if (rte_is_unicast_ether_addr((struct rte_ether_addr *)new_mac)) {
+		if (!rte_is_zero_ether_addr((struct rte_ether_addr *)new_mac))
 			rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac,
 				sizeof(vfinfo[vf].vf_mac_addresses));
 		hw->mac.ops.rar_set(hw, new_mac, rar_entry);
drivers/net/ena/ena_ethdev.c +2 -1
index 1d832f91f..5ed86f0b1 100644
@@ -1814,7 +1814,8 @@ static int eth_ena_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* Copy MAC address and point DPDK to it */
 	eth_dev->data->mac_addrs = (struct rte_ether_addr *)adapter->mac_addr;
-	ether_addr_copy((struct rte_ether_addr *)get_feat_ctx.dev_attr.mac_addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)
+			get_feat_ctx.dev_attr.mac_addr,
 			(struct rte_ether_addr *)adapter->mac_addr);
 
 	/*
drivers/net/enetc/enetc_ethdev.c +1 -1
index 2f473358d..e637c8628 100644
@@ -840,7 +840,7 @@ enetc_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	/* Copy the permanent MAC address */
-	ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
 			&eth_dev->data->mac_addrs[0]);
 
 	/* Set MTU */
drivers/net/enic/enic_ethdev.c +7 -6
index 71e1b9c7d..3b55ebad4 100644
@@ -648,7 +648,7 @@ static void debug_log_add_del_addr(struct rte_ether_addr *addr, bool add)
 {
 	char mac_str[ETHER_ADDR_FMT_SIZE];
 
-	ether_format_addr(mac_str, ETHER_ADDR_FMT_SIZE, addr);
+	rte_ether_format_addr(mac_str, ETHER_ADDR_FMT_SIZE, addr);
 	PMD_INIT_LOG(DEBUG, " %s address %s\n",
 		     add ? "add" : "remove", mac_str);
 }
@@ -668,9 +668,10 @@ static int enicpmd_set_mc_addr_list(struct rte_eth_dev *eth_dev,
 	/* Validate the given addresses first */
 	for (i = 0; i < nb_mc_addr && mc_addr_set != NULL; i++) {
 		addr = &mc_addr_set[i];
-		if (!is_multicast_ether_addr(addr) ||
-		    is_broadcast_ether_addr(addr)) {
-			ether_format_addr(mac_str, ETHER_ADDR_FMT_SIZE, addr);
+		if (!rte_is_multicast_ether_addr(addr) ||
+		    rte_is_broadcast_ether_addr(addr)) {
+			rte_ether_format_addr(mac_str,
+					ETHER_ADDR_FMT_SIZE, addr);
 			PMD_INIT_LOG(ERR, " invalid multicast address %s\n",
 				     mac_str);
 			return -EINVAL;
@@ -704,7 +705,7 @@ static int enicpmd_set_mc_addr_list(struct rte_eth_dev *eth_dev,
 	for (i = 0; i < enic->mc_count; i++) {
 		addr = &enic->mc_addrs[i];
 		for (j = 0; j < nb_mc_addr; j++) {
-			if (is_same_ether_addr(addr, &mc_addr_set[j]))
+			if (rte_is_same_ether_addr(addr, &mc_addr_set[j]))
 				break;
 		}
 		if (j < nb_mc_addr)
@@ -718,7 +719,7 @@ static int enicpmd_set_mc_addr_list(struct rte_eth_dev *eth_dev,
 	for (i = 0; i < nb_mc_addr; i++) {
 		addr = &mc_addr_set[i];
 		for (j = 0; j < enic->mc_count; j++) {
-			if (is_same_ether_addr(addr, &enic->mc_addrs[j]))
+			if (rte_is_same_ether_addr(addr, &enic->mc_addrs[j]))
 				break;
 		}
 		if (j < enic->mc_count)
drivers/net/enic/enic_main.c +1 -1
index 6b7683914..cbd283946 100644
@@ -1673,7 +1673,7 @@ static int enic_dev_init(struct enic *enic)
 		dev_err(enic, "mac addr storage alloc failed, aborting.\n");
 		return -1;
 	}
-	ether_addr_copy((struct rte_ether_addr *)enic->mac_addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)enic->mac_addr,
 			eth_dev->data->mac_addrs);
 
 	vnic_dev_set_reset_flag(enic->vdev, 0);
drivers/net/failsafe/failsafe.c +3 -3
index 8f7d91169..e91c274d8 100644
@@ -253,8 +253,8 @@ fs_eth_dev_create(struct rte_vdev_device *vdev)
 		 */
 		FOREACH_SUBDEV(sdev, i, dev)
 			if (sdev->state >= DEV_PROBED) {
-				ether_addr_copy(&ETH(sdev)->data->mac_addrs[0],
-						mac);
+				rte_ether_addr_copy(
+					&ETH(sdev)->data->mac_addrs[0], mac);
 				break;
 			}
 		/*
@@ -265,7 +265,7 @@ fs_eth_dev_create(struct rte_vdev_device *vdev)
 		 * probed slaves.
 		 */
 		if (i == priv->subs_tail)
-			eth_random_addr(&mac->addr_bytes[0]);
+			rte_eth_random_addr(&mac->addr_bytes[0]);
 	}
 	INFO("MAC address is %02x:%02x:%02x:%02x:%02x:%02x",
 		mac->addr_bytes[0], mac->addr_bytes[1],
drivers/net/failsafe/failsafe_ether.c +1 -1
index 549ee6bb8..325c67ca9 100644
@@ -174,7 +174,7 @@ fs_eth_dev_conf_apply(struct rte_eth_dev *dev,
 		if (ret) {
 			char ea_fmt[ETHER_ADDR_FMT_SIZE];
 
-			ether_format_addr(ea_fmt, ETHER_ADDR_FMT_SIZE, ea);
+			rte_ether_format_addr(ea_fmt, ETHER_ADDR_FMT_SIZE, ea);
 			ERROR("Adding MAC address %s failed", ea_fmt);
 			return ret;
 		}
drivers/net/fm10k/fm10k_ethdev.c +6 -6
index ac00828dd..e6956cbdb 100644
@@ -614,7 +614,7 @@ fm10k_dev_mq_rx_configure(struct rte_eth_dev *dev)
 	/* reset MAC/VLAN as it's based on VMDQ or PF main VSI */
 	memset(dev->data->mac_addrs, 0,
 		ETHER_ADDR_LEN * FM10K_MAX_MACADDR_NUM);
-	ether_addr_copy((const struct rte_ether_addr *)hw->mac.addr,
+	rte_ether_addr_copy((const struct rte_ether_addr *)hw->mac.addr,
 		&dev->data->mac_addrs[0]);
 	memset(macvlan, 0, sizeof(*macvlan));
 	macvlan->nb_queue_pools = nb_queue_pools;
@@ -1525,7 +1525,7 @@ fm10k_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)
 
 	for (mac_index = 0; (mac_index < FM10K_MAX_MACADDR_NUM) &&
 			(result == FM10K_SUCCESS); mac_index++) {
-		if (is_zero_ether_addr(&data->mac_addrs[mac_index]))
+		if (rte_is_zero_ether_addr(&data->mac_addrs[mac_index]))
 			continue;
 		if (mac_num > macvlan->mac_num - 1) {
 			PMD_INIT_LOG(ERR, "MAC address number "
@@ -3080,16 +3080,16 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 
 	diag = fm10k_read_mac_addr(hw);
 
-	ether_addr_copy((const struct rte_ether_addr *)hw->mac.addr,
+	rte_ether_addr_copy((const struct rte_ether_addr *)hw->mac.addr,
 			&dev->data->mac_addrs[0]);
 
 	if (diag != FM10K_SUCCESS ||
-		!is_valid_assigned_ether_addr(dev->data->mac_addrs)) {
+		!rte_is_valid_assigned_ether_addr(dev->data->mac_addrs)) {
 
 		/* Generate a random addr */
-		eth_random_addr(hw->mac.addr);
+		rte_eth_random_addr(hw->mac.addr);
 		memcpy(hw->mac.perm_addr, hw->mac.addr, ETH_ALEN);
-		ether_addr_copy((const struct rte_ether_addr *)hw->mac.addr,
+		rte_ether_addr_copy((const struct rte_ether_addr *)hw->mac.addr,
 		&dev->data->mac_addrs[0]);
 	}
 
drivers/net/i40e/i40e_ethdev.c +24 -19

135 lines not on this page · raw message

drivers/net/i40e/i40e_ethdev_vf.c +9 -8
index 0b05ddb34..f7f193c1f 100644
@@ -788,7 +788,7 @@ i40evf_add_mac_addr(struct rte_eth_dev *dev,
 	int err;
 	struct vf_cmd_info args;
 
-	if (is_zero_ether_addr(addr)) {
+	if (rte_is_zero_ether_addr(addr)) {
 		PMD_DRV_LOG(ERR, "Invalid mac:%x:%x:%x:%x:%x:%x",
 			    addr->addr_bytes[0], addr->addr_bytes[1],
 			    addr->addr_bytes[2], addr->addr_bytes[3],
@@ -1274,10 +1274,11 @@ i40evf_init_vf(struct rte_eth_dev *dev)
 	vf->vsi.adapter = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 
 	/* Store the MAC address configured by host, or generate random one */
-	if (is_valid_assigned_ether_addr((struct rte_ether_addr *)hw->mac.addr))
+	if (rte_is_valid_assigned_ether_addr(
+			(struct rte_ether_addr *)hw->mac.addr))
 		vf->flags |= I40E_FLAG_VF_MAC_BY_PF;
 	else
-		eth_random_addr(hw->mac.addr); /* Generate a random one */
+		rte_eth_random_addr(hw->mac.addr); /* Generate a random one */
 
 	I40E_WRITE_REG(hw, I40E_VFINT_DYN_CTL01,
 		       (I40E_ITR_INDEX_DEFAULT <<
@@ -1512,7 +1513,7 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
 				ETHER_ADDR_LEN * I40E_NUM_MACADDR_MAX);
 		return -ENOMEM;
 	}
-	ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
 			&eth_dev->data->mac_addrs[0]);
 
 	return 0;
@@ -1937,7 +1938,7 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)
 		j = 0;
 		len = sizeof(struct virtchnl_ether_addr_list);
 		for (i = begin; i < I40E_NUM_MACADDR_MAX; i++, next_begin++) {
-			if (is_zero_ether_addr(&dev->data->mac_addrs[i]))
+			if (rte_is_zero_ether_addr(&dev->data->mac_addrs[i]))
 				continue;
 			len += sizeof(struct virtchnl_ether_addr);
 			if (len >= I40E_AQ_BUF_SZ) {
@@ -1954,7 +1955,7 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add)
 
 		for (i = begin; i < next_begin; i++) {
 			addr = &dev->data->mac_addrs[i];
-			if (is_zero_ether_addr(addr))
+			if (rte_is_zero_ether_addr(addr))
 				continue;
 			rte_memcpy(list->list[j].addr, addr->addr_bytes,
 					 sizeof(addr->addr_bytes));
@@ -2707,7 +2708,7 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
 	struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 	struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
-	if (!is_valid_assigned_ether_addr(mac_addr)) {
+	if (!rte_is_valid_assigned_ether_addr(mac_addr)) {
 		PMD_DRV_LOG(ERR, "Tried to set invalid MAC address.");
 		return -EINVAL;
 	}
@@ -2720,7 +2721,7 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev,
 	if (i40evf_add_mac_addr(dev, mac_addr, 0, 0) != 0)
 		return -EIO;
 
-	ether_addr_copy(mac_addr, (struct rte_ether_addr *)hw->mac.addr);
+	rte_ether_addr_copy(mac_addr, (struct rte_ether_addr *)hw->mac.addr);
 	return 0;
 }
 
drivers/net/i40e/i40e_flow.c +12 -12
index 0640137a8..6feaaa818 100644
@@ -2006,9 +2006,9 @@ i40e_flow_parse_ethertype_pattern(struct rte_eth_dev *dev,
 			 * Mask bits of destination MAC address must be full
 			 * of 1 or full of 0.
 			 */
-			if (!is_zero_ether_addr(&eth_mask->src) ||
-			    (!is_zero_ether_addr(&eth_mask->dst) &&
-			     !is_broadcast_ether_addr(&eth_mask->dst))) {
+			if (!rte_is_zero_ether_addr(&eth_mask->src) ||
+			    (!rte_is_zero_ether_addr(&eth_mask->dst) &&
+			     !rte_is_broadcast_ether_addr(&eth_mask->dst))) {
 				rte_flow_error_set(error, EINVAL,
 						   RTE_FLOW_ERROR_TYPE_ITEM,
 						   item,
@@ -2027,7 +2027,7 @@ i40e_flow_parse_ethertype_pattern(struct rte_eth_dev *dev,
 			/* If mask bits of destination MAC address
 			 * are full of 1, set RTE_ETHTYPE_FLAGS_MAC.
 			 */
-			if (is_broadcast_ether_addr(&eth_mask->dst)) {
+			if (rte_is_broadcast_ether_addr(&eth_mask->dst)) {
 				filter->mac_addr = eth_spec->dst;
 				filter->flags |= RTE_ETHTYPE_FLAGS_MAC;
 			} else {
@@ -2484,8 +2484,8 @@ i40e_flow_parse_fdir_pattern(struct rte_eth_dev *dev,
 			eth_mask = item->mask;
 
 			if (eth_spec && eth_mask) {
-				if (!is_zero_ether_addr(&eth_mask->src) ||
-				    !is_zero_ether_addr(&eth_mask->dst)) {
+				if (!rte_is_zero_ether_addr(&eth_mask->src) ||
+				    !rte_is_zero_ether_addr(&eth_mask->dst)) {
 					rte_flow_error_set(error, EINVAL,
 						      RTE_FLOW_ERROR_TYPE_ITEM,
 						      item,
@@ -3325,8 +3325,8 @@ i40e_flow_parse_vxlan_pattern(__rte_unused struct rte_eth_dev *dev,
 				/* DST address of inner MAC shouldn't be masked.
 				 * SRC address of Inner MAC should be masked.
 				 */
-				if (!is_broadcast_ether_addr(&eth_mask->dst) ||
-				    !is_zero_ether_addr(&eth_mask->src) ||
+				if (!rte_is_broadcast_ether_addr(&eth_mask->dst) ||
+				    !rte_is_zero_ether_addr(&eth_mask->src) ||
 				    eth_mask->type) {
 					rte_flow_error_set(error, EINVAL,
 						   RTE_FLOW_ERROR_TYPE_ITEM,
@@ -3555,8 +3555,8 @@ i40e_flow_parse_nvgre_pattern(__rte_unused struct rte_eth_dev *dev,
 				/* DST address of inner MAC shouldn't be masked.
 				 * SRC address of Inner MAC should be masked.
 				 */
-				if (!is_broadcast_ether_addr(&eth_mask->dst) ||
-				    !is_zero_ether_addr(&eth_mask->src) ||
+				if (!rte_is_broadcast_ether_addr(&eth_mask->dst) ||
+				    !rte_is_zero_ether_addr(&eth_mask->src) ||
 				    eth_mask->type) {
 					rte_flow_error_set(error, EINVAL,
 						   RTE_FLOW_ERROR_TYPE_ITEM,
@@ -4802,9 +4802,9 @@ i40e_flow_destroy_tunnel_filter(struct i40e_pf *pf,
 	int ret = 0;
 
 	memset(&cld_filter, 0, sizeof(cld_filter));
-	ether_addr_copy((struct rte_ether_addr *)&filter->input.outer_mac,
+	rte_ether_addr_copy((struct rte_ether_addr *)&filter->input.outer_mac,
 			(struct rte_ether_addr *)&cld_filter.element.outer_mac);
-	ether_addr_copy((struct rte_ether_addr *)&filter->input.inner_mac,
+	rte_ether_addr_copy((struct rte_ether_addr *)&filter->input.inner_mac,
 			(struct rte_ether_addr *)&cld_filter.element.inner_mac);
 	cld_filter.element.inner_vlan = filter->input.inner_vlan;
 	cld_filter.element.flags = filter->input.flags;
drivers/net/i40e/i40e_pf.c +3 -3
index 4d7001df5..b7636c7fa 100644
@@ -348,7 +348,7 @@ i40e_pf_host_process_cmd_get_vf_resource(struct i40e_pf_vf *vf, uint8_t *msg,
 	vf_res->vsi_res[0].vsi_type = VIRTCHNL_VSI_SRIOV;
 	vf_res->vsi_res[0].vsi_id = vf->vsi->vsi_id;
 	vf_res->vsi_res[0].num_queue_pairs = vf->vsi->nb_qps;
-	ether_addr_copy(&vf->mac_addr,
+	rte_ether_addr_copy(&vf->mac_addr,
 		(struct rte_ether_addr *)vf_res->vsi_res[0].default_mac_addr);
 
 send_msg:
@@ -845,7 +845,7 @@ i40e_pf_host_process_cmd_add_ether_address(struct i40e_pf_vf *vf,
 		mac = (struct rte_ether_addr *)(addr_list->list[i].addr);
 		rte_memcpy(&filter.mac_addr, mac, ETHER_ADDR_LEN);
 		filter.filter_type = RTE_MACVLAN_PERFECT_MATCH;
-		if (is_zero_ether_addr(mac) ||
+		if (rte_is_zero_ether_addr(mac) ||
 		    i40e_vsi_add_mac(vf->vsi, &filter)) {
 			ret = I40E_ERR_INVALID_MAC_ADDR;
 			goto send_msg;
@@ -887,7 +887,7 @@ i40e_pf_host_process_cmd_del_ether_address(struct i40e_pf_vf *vf,
 
 	for (i = 0; i < addr_list->num_elements; i++) {
 		mac = (struct rte_ether_addr *)(addr_list->list[i].addr);
-		if(is_zero_ether_addr(mac) ||
+		if (rte_is_zero_ether_addr(mac) ||
 			i40e_vsi_delete_mac(vf->vsi, mac)) {
 			ret = I40E_ERR_INVALID_MAC_ADDR;
 			goto send_msg;
drivers/net/i40e/rte_pmd_i40e.c +5 -5
index 8e562553a..3d66b635c 100644
@@ -560,7 +560,7 @@ rte_pmd_i40e_set_vf_mac_addr(uint16_t port, uint16_t vf_id,
 		return -EINVAL;
 	}
 
-	ether_addr_copy(mac_addr, &vf->mac_addr);
+	rte_ether_addr_copy(mac_addr, &vf->mac_addr);
 
 	/* Remove all existing mac */
 	TAILQ_FOREACH_SAFE(f, &vsi->mac_list, next, temp)
@@ -604,9 +604,9 @@ rte_pmd_i40e_remove_vf_mac_addr(uint16_t port, uint16_t vf_id,
 		return -EINVAL;
 	}
 
-	if (is_same_ether_addr(mac_addr, &vf->mac_addr))
+	if (rte_is_same_ether_addr(mac_addr, &vf->mac_addr))
 		/* Reset the mac with NULL address */
-		ether_addr_copy(&null_mac_addr, &vf->mac_addr);
+		rte_ether_addr_copy(&null_mac_addr, &vf->mac_addr);
 
 	/* Remove the mac */
 	i40e_vsi_delete_mac(vsi, mac_addr);
@@ -2387,7 +2387,7 @@ rte_pmd_i40e_add_vf_mac_addr(uint16_t port, uint16_t vf_id,
 	}
 
 	mac_filter.filter_type = RTE_MACVLAN_PERFECT_MATCH;
-	ether_addr_copy(mac_addr, &mac_filter.mac_addr);
+	rte_ether_addr_copy(mac_addr, &mac_filter.mac_addr);
 	ret = i40e_vsi_add_mac(vsi, &mac_filter);
 	if (ret != I40E_SUCCESS) {
 		PMD_DRV_LOG(ERR, "Failed to add MAC filter.");
@@ -2515,7 +2515,7 @@ rte_pmd_i40e_query_vfid_by_mac(uint16_t port,
 		vf = &pf->vfs[vf_id];
 		mac = &vf->mac_addr;
 
-		if (is_same_ether_addr(mac, vf_mac))
+		if (rte_is_same_ether_addr(mac, vf_mac))
 			return vf_id;
 	}
 
drivers/net/iavf/iavf_ethdev.c +7 -7
index c98355025..f545bd907 100644
@@ -706,7 +706,7 @@ iavf_dev_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *addr,
 	struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(adapter);
 	int err;
 
-	if (is_zero_ether_addr(addr)) {
+	if (rte_is_zero_ether_addr(addr)) {
 		PMD_DRV_LOG(ERR, "Invalid Ethernet Address");
 		return -EINVAL;
 	}
@@ -951,11 +951,11 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
 	old_addr = (struct rte_ether_addr *)hw->mac.addr;
 	perm_addr = (struct rte_ether_addr *)hw->mac.perm_addr;
 
-	if (is_same_ether_addr(mac_addr, old_addr))
+	if (rte_is_same_ether_addr(mac_addr, old_addr))
 		return 0;
 
 	/* If the MAC address is configured by host, skip the setting */
-	if (is_valid_assigned_ether_addr(perm_addr))
+	if (rte_is_valid_assigned_ether_addr(perm_addr))
 		return -EPERM;
 
 	ret = iavf_add_del_eth_addr(adapter, old_addr, FALSE);
@@ -983,7 +983,7 @@ iavf_dev_set_default_mac_addr(struct rte_eth_dev *dev,
 	if (ret)
 		return -EIO;
 
-	ether_addr_copy(mac_addr, (struct rte_ether_addr *)hw->mac.addr);
+	rte_ether_addr_copy(mac_addr, (struct rte_ether_addr *)hw->mac.addr);
 	return 0;
 }
 
@@ -1317,10 +1317,10 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 	/* If the MAC address is not configured by host,
 	 * generate a random one.
 	 */
-	if (!is_valid_assigned_ether_addr(
+	if (!rte_is_valid_assigned_ether_addr(
 			(struct rte_ether_addr *)hw->mac.addr))
-		eth_random_addr(hw->mac.addr);
-	ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
+		rte_eth_random_addr(hw->mac.addr);
+	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.addr,
 			&eth_dev->data->mac_addrs[0]);
 
 	/* register callback func to eal lib */
drivers/net/iavf/iavf_vchnl.c +2 -2
index a705dbdfc..14395fed3 100644
@@ -647,7 +647,7 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
 		len = sizeof(struct virtchnl_ether_addr_list);
 		for (i = begin; i < IAVF_NUM_MACADDR_MAX; i++, next_begin++) {
 			addr = &adapter->eth_dev->data->mac_addrs[i];
-			if (is_zero_ether_addr(addr))
+			if (rte_is_zero_ether_addr(addr))
 				continue;
 			len += sizeof(struct virtchnl_ether_addr);
 			if (len >= IAVF_AQ_BUF_SZ) {
@@ -664,7 +664,7 @@ iavf_add_del_all_mac_addr(struct iavf_adapter *adapter, bool add)
 
 		for (i = begin; i < next_begin; i++) {
 			addr = &adapter->eth_dev->data->mac_addrs[i];
-			if (is_zero_ether_addr(addr))
+			if (rte_is_zero_ether_addr(addr))
 				continue;
 			rte_memcpy(list->list[j].addr, addr->addr_bytes,
 				   sizeof(addr->addr_bytes));
drivers/net/ice/ice_ethdev.c +9 -7
index 098570794..61624d76f 100644
@@ -480,13 +480,14 @@ ice_init_mac_address(struct rte_eth_dev *dev)
 {
 	struct ice_hw *hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
-	if (!is_unicast_ether_addr
+	if (!rte_is_unicast_ether_addr
 		((struct rte_ether_addr *)hw->port_info[0].mac.lan_addr)) {
 		PMD_INIT_LOG(ERR, "Invalid MAC address");
 		return -EINVAL;
 	}
 
-	ether_addr_copy((struct rte_ether_addr *)hw->port_info[0].mac.lan_addr,
+	rte_ether_addr_copy(
+		(struct rte_ether_addr *)hw->port_info[0].mac.lan_addr,
 		(struct rte_ether_addr *)hw->port_info[0].mac.perm_addr);
 
 	dev->data->mac_addrs =
@@ -497,8 +498,9 @@ ice_init_mac_address(struct rte_eth_dev *dev)
 		return -ENOMEM;
 	}
 	/* store it to dev data */
-	ether_addr_copy((struct rte_ether_addr *)hw->port_info[0].mac.perm_addr,
-			&dev->data->mac_addrs[0]);
+	rte_ether_addr_copy(
+		(struct rte_ether_addr *)hw->port_info[0].mac.perm_addr,
+		&dev->data->mac_addrs[0]);
 	return 0;
 }
 
@@ -509,7 +511,7 @@ ice_find_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *macaddr)
 	struct ice_mac_filter *f;
 
 	TAILQ_FOREACH(f, &vsi->mac_list, next) {
-		if (is_same_ether_addr(macaddr, &f->mac_info.mac_addr))
+		if (rte_is_same_ether_addr(macaddr, &f->mac_info.mac_addr))
 			return f;
 	}
 
@@ -2264,13 +2266,13 @@ static int ice_macaddr_set(struct rte_eth_dev *dev,
 	uint8_t flags = 0;
 	int ret;
 
-	if (!is_valid_assigned_ether_addr(mac_addr)) {
+	if (!rte_is_valid_assigned_ether_addr(mac_addr)) {
 		PMD_DRV_LOG(ERR, "Tried to set invalid MAC address.");
 		return -EINVAL;
 	}
 
 	TAILQ_FOREACH(f, &vsi->mac_list, next) {
-		if (is_same_ether_addr(&pf->dev_addr, &f->mac_info.mac_addr))
+		if (rte_is_same_ether_addr(&pf->dev_addr, &f->mac_info.mac_addr))
 			break;
 	}
 
drivers/net/ipn3ke/ipn3ke_representor.c +5 -4
index aee2aac6c..b18d183f0 100644
@@ -124,9 +124,10 @@ ipn3ke_rpst_dev_start(struct rte_eth_dev *dev)
 	snprintf(attr_name, IPN3KE_RAWDEV_ATTR_LEN_MAX, "%s",
 			"LineSideBaseMAC");
 	rawdev->dev_ops->attr_get(rawdev, attr_name, &base_mac);
-	ether_addr_copy((struct rte_ether_addr *)&base_mac, &rpst->mac_addr);
+	rte_ether_addr_copy((struct rte_ether_addr *)&base_mac,
+			&rpst->mac_addr);
 
-	ether_addr_copy(&rpst->mac_addr, &dev->data->mac_addrs[0]);
+	rte_ether_addr_copy(&rpst->mac_addr, &dev->data->mac_addrs[0]);
 	dev->data->mac_addrs->addr_bytes[ETHER_ADDR_LEN - 1] =
 		(uint8_t)rpst->port_id + 1;
 
@@ -656,13 +657,13 @@ ipn3ke_rpst_mac_addr_set(struct rte_eth_dev *ethdev,
 	struct ipn3ke_rpst *rpst = IPN3KE_DEV_PRIVATE_TO_RPST(ethdev);
 	uint32_t val;
 
-	if (!is_valid_assigned_ether_addr(mac_addr)) {
+	if (!rte_is_valid_assigned_ether_addr(mac_addr)) {
 		IPN3KE_AFU_PMD_ERR("Tried to set invalid MAC address.");
 		return -EINVAL;
 	}
 
 	if (hw->retimer.mac_type == IFPGA_RAWDEV_RETIMER_MAC_TYPE_10GE_XFI) {
-		ether_addr_copy(&mac_addr[0], &rpst->mac_addr);
+		rte_ether_addr_copy(&mac_addr[0], &rpst->mac_addr);
 
 		/* Set mac address */
 		rte_memcpy(((char *)(&val)), &mac_addr[0], sizeof(uint32_t));
drivers/net/ixgbe/ixgbe_ethdev.c +4 -4
index 4d5fa87af..2f97f0f8d 100644
@@ -1223,7 +1223,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 		return -ENOMEM;
 	}
 	/* Copy the permanent MAC address */
-	ether_addr_copy((struct rte_ether_addr *)hw->mac.perm_addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac.perm_addr,
 			&eth_dev->data->mac_addrs[0]);
 
 	/* Allocate memory for storing hash filter MAC addresses */
@@ -1658,7 +1658,7 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	/* Generate a random MAC address, if none was assigned by PF. */
-	if (is_zero_ether_addr(perm_addr)) {
+	if (rte_is_zero_ether_addr(perm_addr)) {
 		generate_random_mac_addr(perm_addr);
 		diag = ixgbe_set_rar_vf(hw, 1, perm_addr->addr_bytes, 0, 1);
 		if (diag) {
@@ -1678,7 +1678,7 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	/* Copy the permanent MAC address */
-	ether_addr_copy(perm_addr, &eth_dev->data->mac_addrs[0]);
+	rte_ether_addr_copy(perm_addr, &eth_dev->data->mac_addrs[0]);
 
 	/* reset the hardware with the new settings */
 	diag = hw->mac.ops.start_hw(hw);
@@ -6089,7 +6089,7 @@ ixgbevf_remove_mac_addr(struct rte_eth_dev *dev, uint32_t index)
 		if (i == index)
 			continue;
 		/* Skip NULL MAC addresses */
-		if (is_zero_ether_addr(mac_addr))
+		if (rte_is_zero_ether_addr(mac_addr))
 			continue;
 		/* Skip the permanent MAC address */
 		if (memcmp(perm_addr, mac_addr,
drivers/net/ixgbe/ixgbe_flow.c +4 -4
index f0fafebc8..7024354cd 100644
@@ -744,9 +744,9 @@ cons_parse_ethertype_filter(const struct rte_flow_attr *attr,
 	 * Mask bits of destination MAC address must be full
 	 * of 1 or full of 0.
 	 */
-	if (!is_zero_ether_addr(&eth_mask->src) ||
-	    (!is_zero_ether_addr(&eth_mask->dst) &&
-	     !is_broadcast_ether_addr(&eth_mask->dst))) {
+	if (!rte_is_zero_ether_addr(&eth_mask->src) ||
+	    (!rte_is_zero_ether_addr(&eth_mask->dst) &&
+	     !rte_is_broadcast_ether_addr(&eth_mask->dst))) {
 		rte_flow_error_set(error, EINVAL,
 				RTE_FLOW_ERROR_TYPE_ITEM,
 				item, "Invalid ether address mask");
@@ -763,7 +763,7 @@ cons_parse_ethertype_filter(const struct rte_flow_attr *attr,
 	/* If mask bits of destination MAC address
 	 * are full of 1, set RTE_ETHTYPE_FLAGS_MAC.
 	 */
-	if (is_broadcast_ether_addr(&eth_mask->dst)) {
+	if (rte_is_broadcast_ether_addr(&eth_mask->dst)) {
 		filter->mac_addr = eth_spec->dst;
 		filter->flags |= RTE_ETHTYPE_FLAGS_MAC;
 	} else {
drivers/net/ixgbe/ixgbe_pf.c +3 -2
index 6180c9473..a2ae703df 100644
@@ -46,7 +46,7 @@ int ixgbe_vf_perm_addr_gen(struct rte_eth_dev *dev, uint16_t vf_num)
 	uint16_t vfn;
 
 	for (vfn = 0; vfn < vf_num; vfn++) {
-		eth_random_addr(vf_mac_addr);
+		rte_eth_random_addr(vf_mac_addr);
 		/* keep the random address as default */
 		memcpy(vfinfo[vfn].vf_mac_addresses, vf_mac_addr,
 			   ETHER_ADDR_LEN);
@@ -463,7 +463,8 @@ ixgbe_vf_set_mac_addr(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)
 	int rar_entry = hw->mac.num_rar_entries - (vf + 1);
 	uint8_t *new_mac = (uint8_t *)(&msgbuf[1]);
 
-	if (is_valid_assigned_ether_addr((struct rte_ether_addr *)new_mac)) {
+	if (rte_is_valid_assigned_ether_addr(
+			(struct rte_ether_addr *)new_mac)) {
 		rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac, 6);
 		return hw->mac.ops.set_rar(hw, rar_entry, new_mac, vf, IXGBE_RAH_AV);
 	}
drivers/net/ixgbe/rte_pmd_ixgbe.c +2 -1
index 3defba175..db2191862 100644
@@ -35,7 +35,8 @@ rte_pmd_ixgbe_set_vf_mac_addr(uint16_t port, uint16_t vf,
 	vfinfo = *(IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private));
 	rar_entry = hw->mac.num_rar_entries - (vf + 1);
 
-	if (is_valid_assigned_ether_addr((struct rte_ether_addr *)new_mac)) {
+	if (rte_is_valid_assigned_ether_addr(
+			(struct rte_ether_addr *)new_mac)) {
 		rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac,
 			   ETHER_ADDR_LEN);
 		return hw->mac.ops.set_rar(hw, rar_entry, new_mac, vf,
drivers/net/kni/rte_eth_kni.c +1 -1
index 180cfd6c9..1cb1f067f 100644
@@ -363,7 +363,7 @@ eth_kni_create(struct rte_vdev_device *vdev,
 	data->dev_link = pmd_link;
 	data->mac_addrs = &internals->eth_addr;
 
-	eth_random_addr(internals->eth_addr.addr_bytes);
+	rte_eth_random_addr(internals->eth_addr.addr_bytes);
 
 	eth_dev->dev_ops = &eth_kni_ops;
 
drivers/net/liquidio/lio_ethdev.c +1 -1
index de234e903..21ded9ef3 100644
@@ -1835,7 +1835,7 @@ lio_dev_configure(struct rte_eth_dev *eth_dev)
 				       2 + i));
 
 	/* Copy the permanent MAC address */
-	ether_addr_copy((struct rte_ether_addr *)mac,
+	rte_ether_addr_copy((struct rte_ether_addr *)mac,
 			&eth_dev->data->mac_addrs[0]);
 
 	/* enable firmware checksum support for tunnel packets */
drivers/net/mlx4/mlx4_ethdev.c +1 -1
index 6995c14a5..6639037f0 100644
@@ -522,7 +522,7 @@ mlx4_set_mc_addr_list(struct rte_eth_dev *dev, struct rte_ether_addr *list,
 		for (i = RTE_DIM(priv->mac) - num;
 		     i != RTE_DIM(priv->mac) - priv->mac_mc;
 		     ++i)
-			if (!is_zero_ether_addr(&priv->mac[i])) {
+			if (!rte_is_zero_ether_addr(&priv->mac[i])) {
 				rte_errno = EBUSY;
 				return -rte_errno;
 			}
drivers/net/mlx4/mlx4_flow.c +1 -1
index 78bd452bd..244f19311 100644
@@ -1398,7 +1398,7 @@ mlx4_flow_internal(struct mlx4_priv *priv, struct rte_flow_error *error)
 			mac = &priv->mac[i];
 		else
 			mac = &eth_mask.dst;
-		if (is_zero_ether_addr(mac))
+		if (rte_is_zero_ether_addr(mac))
 			continue;
 		/* Check if MAC flow rule is already present. */
 		for (flow = LIST_FIRST(&priv->flows);
drivers/net/mlx5/mlx5_flow_tcf.c +2 -2
index 789748d08..48d54e8de 100644
@@ -3334,7 +3334,7 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
 					" parameter is ignored");
 				break;
 			}
-			if (!is_zero_ether_addr(&mask.eth->dst)) {
+			if (!rte_is_zero_ether_addr(&mask.eth->dst)) {
 				mnl_attr_put(nlh, TCA_FLOWER_KEY_ETH_DST,
 					     ETHER_ADDR_LEN,
 					     spec.eth->dst.addr_bytes);
@@ -3342,7 +3342,7 @@ flow_tcf_translate(struct rte_eth_dev *dev, struct mlx5_flow *dev_flow,
 					     ETHER_ADDR_LEN,
 					     mask.eth->dst.addr_bytes);
 			}
-			if (!is_zero_ether_addr(&mask.eth->src)) {
+			if (!rte_is_zero_ether_addr(&mask.eth->src)) {
 				mnl_attr_put(nlh, TCA_FLOWER_KEY_ETH_SRC,
 					     ETHER_ADDR_LEN,
 					     spec.eth->src.addr_bytes);
drivers/net/mlx5/mlx5_mac.c +2 -2
index 9f6b89a82..9204c5f52 100644
@@ -71,7 +71,7 @@ mlx5_internal_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
 	const int vf = priv->config.vf;
 
 	assert(index < MLX5_MAX_MAC_ADDRESSES);
-	if (is_zero_ether_addr(&dev->data->mac_addrs[index]))
+	if (rte_is_zero_ether_addr(&dev->data->mac_addrs[index]))
 		return;
 	if (vf)
 		mlx5_nl_mac_addr_remove(dev, &dev->data->mac_addrs[index],
@@ -101,7 +101,7 @@ mlx5_internal_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac,
 	unsigned int i;
 
 	assert(index < MLX5_MAX_MAC_ADDRESSES);
-	if (is_zero_ether_addr(mac)) {
+	if (rte_is_zero_ether_addr(mac)) {
 		rte_errno = EINVAL;
 		return -rte_errno;
 	}
drivers/net/mlx5/mlx5_nl.c +3 -3
index ce4c93748..50cd32a09 100644
@@ -340,7 +340,7 @@ mlx5_nl_mac_addr_cb(struct nlmsghdr *nh, void *arg)
 #ifndef NDEBUG
 			char m[18];
 
-			ether_format_addr(m, 18, RTA_DATA(attribute));
+			rte_ether_format_addr(m, 18, RTA_DATA(attribute));
 			DRV_LOG(DEBUG, "bridge MAC address %s", m);
 #endif
 			memcpy(&(*data->mac)[data->mac_n++],
@@ -555,14 +555,14 @@ mlx5_nl_mac_addr_sync(struct rte_eth_dev *dev)
 
 		/* Verify the address is not in the array yet. */
 		for (j = 0; j != MLX5_MAX_MAC_ADDRESSES; ++j)
-			if (is_same_ether_addr(&macs[i],
+			if (rte_is_same_ether_addr(&macs[i],
 					       &dev->data->mac_addrs[j]))
 				break;
 		if (j != MLX5_MAX_MAC_ADDRESSES)
 			continue;
 		/* Find the first entry available. */
 		for (j = 0; j != MLX5_MAX_MAC_ADDRESSES; ++j) {
-			if (is_zero_ether_addr(&dev->data->mac_addrs[j])) {
+			if (rte_is_zero_ether_addr(&dev->data->mac_addrs[j])) {
 				dev->data->mac_addrs[j] = macs[i];
 				break;
 			}
drivers/net/mvneta/mvneta_ethdev.c +3 -3
index d539ba6a1..9ec71c3c1 100644
@@ -595,7 +595,7 @@ mvneta_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
 	ret = neta_ppio_remove_mac_addr(priv->ppio,
 				       dev->data->mac_addrs[index].addr_bytes);
 	if (ret) {
-		ether_format_addr(buf, sizeof(buf),
+		rte_ether_format_addr(buf, sizeof(buf),
 				  &dev->data->mac_addrs[index]);
 		MVNETA_LOG(ERR, "Failed to remove mac %s", buf);
 	}
@@ -633,7 +633,7 @@ mvneta_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
 
 	ret = neta_ppio_add_mac_addr(priv->ppio, mac_addr->addr_bytes);
 	if (ret) {
-		ether_format_addr(buf, sizeof(buf), mac_addr);
+		rte_ether_format_addr(buf, sizeof(buf), mac_addr);
 		MVNETA_LOG(ERR, "Failed to add mac %s", buf);
 		return -1;
 	}
@@ -661,7 +661,7 @@ mvneta_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
 	ret = neta_ppio_set_mac_addr(priv->ppio, mac_addr->addr_bytes);
 	if (ret) {
 		char buf[ETHER_ADDR_FMT_SIZE];
-		ether_format_addr(buf, sizeof(buf), mac_addr);
+		rte_ether_format_addr(buf, sizeof(buf), mac_addr);
 		MVNETA_LOG(ERR, "Failed to set mac to %s", buf);
 	}
 	return 0;
drivers/net/mvpp2/mrvl_ethdev.c +3 -3
index 8647c9b0d..4c6edb41d 100644
@@ -1080,7 +1080,7 @@ mrvl_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
 	ret = pp2_ppio_remove_mac_addr(priv->ppio,
 				       dev->data->mac_addrs[index].addr_bytes);
 	if (ret) {
-		ether_format_addr(buf, sizeof(buf),
+		rte_ether_format_addr(buf, sizeof(buf),
 				  &dev->data->mac_addrs[index]);
 		MRVL_LOG(ERR, "Failed to remove mac %s", buf);
 	}
@@ -1134,7 +1134,7 @@ mrvl_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
 	 */
 	ret = pp2_ppio_add_mac_addr(priv->ppio, mac_addr->addr_bytes);
 	if (ret) {
-		ether_format_addr(buf, sizeof(buf), mac_addr);
+		rte_ether_format_addr(buf, sizeof(buf), mac_addr);
 		MRVL_LOG(ERR, "Failed to add mac %s", buf);
 		return -1;
 	}
@@ -1168,7 +1168,7 @@ mrvl_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
 	ret = pp2_ppio_set_mac_addr(priv->ppio, mac_addr->addr_bytes);
 	if (ret) {
 		char buf[ETHER_ADDR_FMT_SIZE];
-		ether_format_addr(buf, sizeof(buf), mac_addr);
+		rte_ether_format_addr(buf, sizeof(buf), mac_addr);
 		MRVL_LOG(ERR, "Failed to set mac to %s", buf);
 	}
 
drivers/net/netvsc/hn_rxtx.c +2 -2
index a5850c249..61924209c 100644
@@ -128,8 +128,8 @@ hn_update_packet_stats(struct hn_stats *stats, const struct rte_mbuf *m)
 	}
 
 	ea = rte_pktmbuf_mtod(m, const struct rte_ether_addr *);
-	if (is_multicast_ether_addr(ea)) {
-		if (is_broadcast_ether_addr(ea))
+	if (rte_is_multicast_ether_addr(ea)) {
+		if (rte_is_broadcast_ether_addr(ea))
 			stats->broadcast++;
 		else
 			stats->multicast++;
drivers/net/netvsc/hn_vf.c +1 -1
index f1be7e22f..27ac87e7e 100644
@@ -42,7 +42,7 @@ static int hn_vf_match(const struct rte_eth_dev *dev)
 		if (vf_dev == dev)
 			continue;
 
-		if (is_same_ether_addr(mac, vf_mac))
+		if (rte_is_same_ether_addr(mac, vf_mac))
 			return i;
 	}
 	return -ENOENT;
drivers/net/nfb/nfb_ethdev.c +3 -3
index 679af6eb2..ffdc2bf46 100644
@@ -360,7 +360,7 @@ nfb_eth_mac_addr_set(struct rte_eth_dev *dev,
 	struct pmd_internals *internals = (struct pmd_internals *)
 		data->dev_private;
 
-	if (!is_valid_assigned_ether_addr(mac_addr))
+	if (!rte_is_valid_assigned_ether_addr(mac_addr))
 		return -EINVAL;
 
 	for (i = 0; i < ETHER_ADDR_LEN; i++) {
@@ -371,7 +371,7 @@ nfb_eth_mac_addr_set(struct rte_eth_dev *dev,
 	for (i = 0; i < internals->max_rxmac; ++i)
 		nc_rxmac_set_mac(internals->rxmac[i], 0, mac, 1);
 
-	ether_addr_copy(mac_addr, data->mac_addrs);
+	rte_ether_addr_copy(mac_addr, data->mac_addrs);
 	return 0;
 }
 
@@ -472,7 +472,7 @@ nfb_eth_dev_init(struct rte_eth_dev *dev)
 		return -EINVAL;
 	}
 
-	eth_random_addr(eth_addr_init.addr_bytes);
+	rte_eth_random_addr(eth_addr_init.addr_bytes);
 	eth_addr_init.addr_bytes[0] = eth_addr.addr_bytes[0];
 	eth_addr_init.addr_bytes[1] = eth_addr.addr_bytes[1];
 	eth_addr_init.addr_bytes[2] = eth_addr.addr_bytes[2];
drivers/net/nfp/nfp_net.c +3 -3
index 95c2be127..853b7800b 100644
@@ -2962,17 +2962,17 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 		nfp_net_vf_read_mac(hw);
 	}
 
-	if (!is_valid_assigned_ether_addr(
+	if (!rte_is_valid_assigned_ether_addr(
 		    (struct rte_ether_addr *)&hw->mac_addr)) {
 		PMD_INIT_LOG(INFO, "Using random mac address for port %d",
 				   port);
 		/* Using random mac addresses for VFs */
-		eth_random_addr(&hw->mac_addr[0]);
+		rte_eth_random_addr(&hw->mac_addr[0]);
 		nfp_net_write_mac(hw, (uint8_t *)&hw->mac_addr);
 	}
 
 	/* Copying mac address to DPDK eth_dev struct */
-	ether_addr_copy((struct rte_ether_addr *)hw->mac_addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac_addr,
 			&eth_dev->data->mac_addrs[0]);
 
 	if (!(hw->cap & NFP_NET_CFG_CTRL_LIVE_ADDR))
drivers/net/null/rte_eth_null.c +1 -1
index 7683511cf..d1d49b53b 100644
@@ -535,7 +535,7 @@ eth_dev_null_create(struct rte_vdev_device *dev,
 	internals->packet_size = packet_size;
 	internals->packet_copy = packet_copy;
 	internals->port_id = eth_dev->data->port_id;
-	eth_random_addr(internals->eth_addr.addr_bytes);
+	rte_eth_random_addr(internals->eth_addr.addr_bytes);
 
 	internals->flow_type_rss_offloads =  ETH_RSS_PROTO_MASK;
 	internals->reta_size = RTE_DIM(internals->reta_conf) * RTE_RETA_GROUP_SIZE;
drivers/net/qede/qede_ethdev.c +15 -14
index a72d46657..c7fadf27f 100644
@@ -580,7 +580,7 @@ qede_ucast_filter(struct rte_eth_dev *eth_dev, struct ecore_filter_ucast *ucast,
 			DP_ERR(edev, "Did not allocate memory for ucast\n");
 			return -ENOMEM;
 		}
-		ether_addr_copy(mac_addr, &u->mac);
+		rte_ether_addr_copy(mac_addr, &u->mac);
 		u->vlan = ucast->vlan;
 		u->vni = ucast->vni;
 		SLIST_INSERT_HEAD(&qdev->uc_list_head, u, list);
@@ -623,14 +623,14 @@ qede_add_mcast_filters(struct rte_eth_dev *eth_dev,
 			DP_ERR(edev, "Did not allocate memory for mcast\n");
 			return -ENOMEM;
 		}
-		ether_addr_copy(&mc_addrs[i], &m->mac);
+		rte_ether_addr_copy(&mc_addrs[i], &m->mac);
 		SLIST_INSERT_HEAD(&qdev->mc_list_head, m, list);
 	}
 	memset(&mcast, 0, sizeof(mcast));
 	mcast.num_mc_addrs = mc_addrs_num;
 	mcast.opcode = ECORE_FILTER_ADD;
 	for (i = 0; i < mc_addrs_num; i++)
-		ether_addr_copy(&mc_addrs[i], (struct rte_ether_addr *)
+		rte_ether_addr_copy(&mc_addrs[i], (struct rte_ether_addr *)
 							&mcast.mac[i]);
 	rc = ecore_filter_mcast_cmd(edev, &mcast, ECORE_SPQ_MODE_CB, NULL);
 	if (rc != ECORE_SUCCESS) {
@@ -655,7 +655,7 @@ static int qede_del_mcast_filters(struct rte_eth_dev *eth_dev)
 	mcast.opcode = ECORE_FILTER_REMOVE;
 	j = 0;
 	SLIST_FOREACH(tmp, &qdev->mc_list_head, list) {
-		ether_addr_copy(&tmp->mac,
+		rte_ether_addr_copy(&tmp->mac,
 				(struct rte_ether_addr *)&mcast.mac[j]);
 		j++;
 	}
@@ -709,13 +709,13 @@ qede_mac_addr_add(struct rte_eth_dev *eth_dev, struct rte_ether_addr *mac_addr,
 	struct ecore_filter_ucast ucast;
 	int re;
 
-	if (!is_valid_assigned_ether_addr(mac_addr))
+	if (!rte_is_valid_assigned_ether_addr(mac_addr))
 		return -EINVAL;
 
 	qede_set_ucast_cmn_params(&ucast);
 	ucast.opcode = ECORE_FILTER_ADD;
 	ucast.type = ECORE_FILTER_MAC;
-	ether_addr_copy(mac_addr, (struct rte_ether_addr *)&ucast.mac);
+	rte_ether_addr_copy(mac_addr, (struct rte_ether_addr *)&ucast.mac);
 	re = (int)qede_mac_int_ops(eth_dev, &ucast, 1);
 	return re;
 }
@@ -735,7 +735,7 @@ qede_mac_addr_remove(struct rte_eth_dev *eth_dev, uint32_t index)
 		return;
 	}
 
-	if (!is_valid_assigned_ether_addr(&eth_dev->data->mac_addrs[index]))
+	if (!rte_is_valid_assigned_ether_addr(&eth_dev->data->mac_addrs[index]))
 		return;
 
 	qede_set_ucast_cmn_params(&ucast);
@@ -743,7 +743,7 @@ qede_mac_addr_remove(struct rte_eth_dev *eth_dev, uint32_t index)
 	ucast.type = ECORE_FILTER_MAC;
 
 	/* Use the index maintained by rte */
-	ether_addr_copy(&eth_dev->data->mac_addrs[index],
+	rte_ether_addr_copy(&eth_dev->data->mac_addrs[index],
 			(struct rte_ether_addr *)&ucast.mac);
 
 	qede_mac_int_ops(eth_dev, &ucast, false);
@@ -1774,7 +1774,7 @@ qede_set_mc_addr_list(struct rte_eth_dev *eth_dev,
 	}
 
 	for (i = 0; i < mc_addrs_num; i++) {
-		if (!is_multicast_ether_addr(&mc_addrs[i])) {
+		if (!rte_is_multicast_ether_addr(&mc_addrs[i])) {
 			DP_ERR(edev, "Not a valid multicast MAC\n");
 			return -EINVAL;
 		}
@@ -2552,10 +2552,10 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 	}
 
 	if (!is_vf) {
-		ether_addr_copy((struct rte_ether_addr *)edev->hwfns[0].
+		rte_ether_addr_copy((struct rte_ether_addr *)edev->hwfns[0].
 				hw_info.hw_mac_addr,
 				&eth_dev->data->mac_addrs[0]);
-		ether_addr_copy(&eth_dev->data->mac_addrs[0],
+		rte_ether_addr_copy(&eth_dev->data->mac_addrs[0],
 				&adapter->primary_mac);
 	} else {
 		ecore_vf_read_bulletin(ECORE_LEADING_HWFN(edev),
@@ -2568,11 +2568,12 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 						&is_mac_forced);
 			if (is_mac_exist) {
 				DP_INFO(edev, "VF macaddr received from PF\n");
-				ether_addr_copy(
+				rte_ether_addr_copy(
 					(struct rte_ether_addr *)&vf_mac,
 					&eth_dev->data->mac_addrs[0]);
-				ether_addr_copy(&eth_dev->data->mac_addrs[0],
-						&adapter->primary_mac);
+				rte_ether_addr_copy(
+					&eth_dev->data->mac_addrs[0],
+					&adapter->primary_mac);
 			} else {
 				DP_ERR(edev, "No VF macaddr assigned\n");
 			}
drivers/net/sfc/sfc_ethdev.c +3 -3
index fadcdb56a..dd9897d70 100644
@@ -983,7 +983,7 @@ sfc_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
 	 * Copy the address to the device private data so that
 	 * it could be recalled in the case of adapter restart.
 	 */
-	ether_addr_copy(mac_addr, &port->default_mac_addr);
+	rte_ether_addr_copy(mac_addr, &port->default_mac_addr);
 
 	/*
 	 * Neither of the two following checks can return
@@ -1043,7 +1043,7 @@ sfc_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
 
 unlock:
 	if (rc != 0)
-		ether_addr_copy(old_addr, &port->default_mac_addr);
+		rte_ether_addr_copy(old_addr, &port->default_mac_addr);
 
 	sfc_adapter_unlock(sa);
 
@@ -2126,7 +2126,7 @@ sfc_eth_dev_init(struct rte_eth_dev *dev)
 	 * Linux kernel. Copy from NIC config to Ethernet device data.
 	 */
 	from = (const struct rte_ether_addr *)(encp->enc_mac_addr);
-	ether_addr_copy(from, &dev->data->mac_addrs[0]);
+	rte_ether_addr_copy(from, &dev->data->mac_addrs[0]);
 
 	sfc_adapter_unlock(sa);
 
drivers/net/sfc/sfc_flow.c +5 -5
index 944296d7d..e1d981b4e 100644
@@ -277,7 +277,7 @@ sfc_flow_parse_eth(const struct rte_flow_item *item,
 	if (spec == NULL)
 		return 0;
 
-	if (is_same_ether_addr(&mask->dst, &supp_mask.dst)) {
+	if (rte_is_same_ether_addr(&mask->dst, &supp_mask.dst)) {
 		efx_spec->efs_match_flags |= is_ifrm ?
 			EFX_FILTER_MATCH_IFRM_LOC_MAC :
 			EFX_FILTER_MATCH_LOC_MAC;
@@ -285,7 +285,7 @@ sfc_flow_parse_eth(const struct rte_flow_item *item,
 			   EFX_MAC_ADDR_LEN);
 	} else if (memcmp(mask->dst.addr_bytes, ig_mask,
 			  EFX_MAC_ADDR_LEN) == 0) {
-		if (is_unicast_ether_addr(&spec->dst))
+		if (rte_is_unicast_ether_addr(&spec->dst))
 			efx_spec->efs_match_flags |= is_ifrm ?
 				EFX_FILTER_MATCH_IFRM_UNKNOWN_UCAST_DST :
 				EFX_FILTER_MATCH_UNKNOWN_UCAST_DST;
@@ -293,7 +293,7 @@ sfc_flow_parse_eth(const struct rte_flow_item *item,
 			efx_spec->efs_match_flags |= is_ifrm ?
 				EFX_FILTER_MATCH_IFRM_UNKNOWN_MCAST_DST :
 				EFX_FILTER_MATCH_UNKNOWN_MCAST_DST;
-	} else if (!is_zero_ether_addr(&mask->dst)) {
+	} else if (!rte_is_zero_ether_addr(&mask->dst)) {
 		goto fail_bad_mask;
 	}
 
@@ -302,11 +302,11 @@ sfc_flow_parse_eth(const struct rte_flow_item *item,
 	 * ethertype masks are equal to zero in inner frame,
 	 * so these fields are filled in only for the outer frame
 	 */
-	if (is_same_ether_addr(&mask->src, &supp_mask.src)) {
+	if (rte_is_same_ether_addr(&mask->src, &supp_mask.src)) {
 		efx_spec->efs_match_flags |= EFX_FILTER_MATCH_REM_MAC;
 		rte_memcpy(efx_spec->efs_rem_mac, spec->src.addr_bytes,
 			   EFX_MAC_ADDR_LEN);
-	} else if (!is_zero_ether_addr(&mask->src)) {
+	} else if (!rte_is_zero_ether_addr(&mask->src)) {
 		goto fail_bad_mask;
 	}
 
drivers/net/sfc/sfc_port.c +1 -1
index 8de5f0c60..23313e125 100644
@@ -402,7 +402,7 @@ sfc_port_attach(struct sfc_adapter *sa)
 
 	RTE_BUILD_BUG_ON(sizeof(encp->enc_mac_addr) != sizeof(*from));
 	from = (const struct rte_ether_addr *)(encp->enc_mac_addr);
-	ether_addr_copy(from, &port->default_mac_addr);
+	rte_ether_addr_copy(from, &port->default_mac_addr);
 
 	port->max_mcast_addrs = EFX_MAC_MULTICAST_LIST_MAX;
 	port->nb_mcast_addrs = 0;
drivers/net/softnic/rte_eth_softnic_flow.c +2 -2
index ccd58c01c..f05ff092f 100644
@@ -1681,9 +1681,9 @@ flow_rule_action_get(struct pmd_internals *softnic,
 					item,
 					"VXLAN ENCAP: first encap item should be ether");
 			}
-			ether_addr_copy(&spec.eth.dst,
+			rte_ether_addr_copy(&spec.eth.dst,
 					&rule_action->encap.vxlan.ether.da);
-			ether_addr_copy(&spec.eth.src,
+			rte_ether_addr_copy(&spec.eth.src,
 					&rule_action->encap.vxlan.ether.sa);
 
 			item++;
drivers/net/szedata2/rte_eth_szedata2.c +1 -1
index 43a66432a..99de9f4e6 100644
@@ -1522,7 +1522,7 @@ rte_szedata2_eth_dev_init(struct rte_eth_dev *dev, struct port_info *pi)
 		return -ENOMEM;
 	}
 
-	ether_addr_copy(&eth_addr, data->mac_addrs);
+	rte_ether_addr_copy(&eth_addr, data->mac_addrs);
 
 	PMD_INIT_LOG(INFO, "%s device %s successfully initialized",
 			RTE_STR(RTE_SZEDATA2_DRIVER_NAME), data->name);
drivers/net/tap/rte_eth_tap.c +7 -6
index 71be763d6..949b72d0c 100644
@@ -1163,7 +1163,7 @@ tap_mac_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
 		return -ENOTSUP;
 	}
 
-	if (is_zero_ether_addr(mac_addr)) {
+	if (rte_is_zero_ether_addr(mac_addr)) {
 		TAP_LOG(ERR, "%s: can't set an empty MAC address",
 			dev->device->name);
 		return -EINVAL;
@@ -1172,14 +1172,15 @@ tap_mac_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
 	ret = tap_ioctl(pmd, SIOCGIFHWADDR, &ifr, 0, LOCAL_ONLY);
 	if (ret < 0)
 		return ret;
-	if (is_same_ether_addr((struct rte_ether_addr *)&ifr.ifr_hwaddr.sa_data,
-			       mac_addr))
+	if (rte_is_same_ether_addr(
+			(struct rte_ether_addr *)&ifr.ifr_hwaddr.sa_data,
+			mac_addr))
 		return 0;
 	/* Check the current MAC address on the remote */
 	ret = tap_ioctl(pmd, SIOCGIFHWADDR, &ifr, 0, REMOTE_ONLY);
 	if (ret < 0)
 		return ret;
-	if (!is_same_ether_addr(
+	if (!rte_is_same_ether_addr(
 			(struct rte_ether_addr *)&ifr.ifr_hwaddr.sa_data,
 			mac_addr))
 		mode = LOCAL_AND_REMOTE;
@@ -1754,8 +1755,8 @@ eth_dev_tap_create(struct rte_vdev_device *vdev, const char *tap_name,
 	}
 
 	if (pmd->type == ETH_TUNTAP_TYPE_TAP) {
-		if (is_zero_ether_addr(mac_addr))
-			eth_random_addr((uint8_t *)&pmd->eth_addr);
+		if (rte_is_zero_ether_addr(mac_addr))
+			rte_eth_random_addr((uint8_t *)&pmd->eth_addr);
 		else
 			rte_memcpy(&pmd->eth_addr, mac_addr, sizeof(*mac_addr));
 	}
drivers/net/tap/tap_flow.c +2 -2
index d155618fc..20963090c 100644
@@ -537,14 +537,14 @@ tap_flow_create_eth(const struct rte_flow_item *item, void *data)
 	if (!flow)
 		return 0;
 	msg = &flow->msg;
-	if (!is_zero_ether_addr(&mask->dst)) {
+	if (!rte_is_zero_ether_addr(&mask->dst)) {
 		tap_nlattr_add(&msg->nh, TCA_FLOWER_KEY_ETH_DST, ETHER_ADDR_LEN,
 			   &spec->dst.addr_bytes);
 		tap_nlattr_add(&msg->nh,
 			   TCA_FLOWER_KEY_ETH_DST_MASK, ETHER_ADDR_LEN,
 			   &mask->dst.addr_bytes);
 	}
-	if (!is_zero_ether_addr(&mask->src)) {
+	if (!rte_is_zero_ether_addr(&mask->src)) {
 		tap_nlattr_add(&msg->nh, TCA_FLOWER_KEY_ETH_SRC, ETHER_ADDR_LEN,
 			   &spec->src.addr_bytes);
 		tap_nlattr_add(&msg->nh,
drivers/net/thunderx/nicvf_ethdev.c +3 -3
index ec2087924..482968b7a 100644
@@ -2179,10 +2179,10 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
 		ret = -ENOMEM;
 		goto alarm_fail;
 	}
-	if (is_zero_ether_addr((struct rte_ether_addr *)nic->mac_addr))
-		eth_random_addr(&nic->mac_addr[0]);
+	if (rte_is_zero_ether_addr((struct rte_ether_addr *)nic->mac_addr))
+		rte_eth_random_addr(&nic->mac_addr[0]);
 
-	ether_addr_copy((struct rte_ether_addr *)nic->mac_addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)nic->mac_addr,
 			&eth_dev->data->mac_addrs[0]);
 
 	ret = nicvf_mbox_set_mac_addr(nic, nic->mac_addr);
drivers/net/vdev_netvsc/vdev_netvsc.c +2 -2
index ef02fdcdd..ad13eac3b 100644
@@ -387,7 +387,7 @@ vdev_netvsc_device_probe(const struct if_nameindex *iface,
 		strlcpy(ctx->if_name, iface->if_name, sizeof(ctx->if_name));
 		return 0;
 	}
-	if (!is_same_ether_addr(eth_addr, &ctx->if_addr))
+	if (!rte_is_same_ether_addr(eth_addr, &ctx->if_addr))
 		return 0;
 	/* Look for associated PCI device. */
 	ret = vdev_netvsc_sysfs_readlink(buf, sizeof(buf), iface->if_name,
@@ -544,7 +544,7 @@ vdev_netvsc_netvsc_probe(const struct if_nameindex *iface,
 						pair->value);
 					return -EINVAL;
 				}
-				if (is_same_ether_addr(eth_addr, &tmp))
+				if (rte_is_same_ether_addr(eth_addr, &tmp))
 					break;
 			}
 		}
drivers/net/vhost/rte_eth_vhost.c +2 -2
index 6705e90db..774774b94 100644
@@ -329,8 +329,8 @@ vhost_count_multicast_broadcast(struct vhost_queue *vq,
 	struct vhost_stats *pstats = &vq->stats;
 
 	ea = rte_pktmbuf_mtod(mbuf, struct rte_ether_addr *);
-	if (is_multicast_ether_addr(ea)) {
-		if (is_broadcast_ether_addr(ea))
+	if (rte_is_multicast_ether_addr(ea)) {
+		if (rte_is_broadcast_ether_addr(ea))
 			pstats->xstats[VHOST_BROADCAST_PKT]++;
 		else
 			pstats->xstats[VHOST_MULTICAST_PKT]++;
drivers/net/virtio/virtio_ethdev.c +5 -5
index 9b99bf3eb..2762dcf97 100644
@@ -1108,7 +1108,7 @@ virtio_get_hwaddr(struct virtio_hw *hw)
 			offsetof(struct virtio_net_config, mac),
 			&hw->mac_addr, ETHER_ADDR_LEN);
 	} else {
-		eth_random_addr(&hw->mac_addr[0]);
+		rte_eth_random_addr(&hw->mac_addr[0]);
 		virtio_set_hwaddr(hw);
 	}
 }
@@ -1164,7 +1164,7 @@ virtio_mac_addr_add(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr,
 		const struct rte_ether_addr *addr
 			= (i == index) ? mac_addr : addrs + i;
 		struct virtio_net_ctrl_mac *tbl
-			= is_multicast_ether_addr(addr) ? mc : uc;
+			= rte_is_multicast_ether_addr(addr) ? mc : uc;
 
 		memcpy(&tbl->macs[tbl->entries++], addr, ETHER_ADDR_LEN);
 	}
@@ -1193,10 +1193,10 @@ virtio_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index)
 	for (i = 0; i < VIRTIO_MAX_MAC_ADDRS; i++) {
 		struct virtio_net_ctrl_mac *tbl;
 
-		if (i == index || is_zero_ether_addr(addrs + i))
+		if (i == index || rte_is_zero_ether_addr(addrs + i))
 			continue;
 
-		tbl = is_multicast_ether_addr(addrs + i) ? mc : uc;
+		tbl = rte_is_multicast_ether_addr(addrs + i) ? mc : uc;
 		memcpy(&tbl->macs[tbl->entries++], addrs + i, ETHER_ADDR_LEN);
 	}
 
@@ -1662,7 +1662,7 @@ virtio_init_device(struct rte_eth_dev *eth_dev, uint64_t req_features)
 
 	/* Copy the permanent MAC address to: virtio_hw */
 	virtio_get_hwaddr(hw);
-	ether_addr_copy((struct rte_ether_addr *)hw->mac_addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)hw->mac_addr,
 			&eth_dev->data->mac_addrs[0]);
 	PMD_INIT_LOG(DEBUG,
 		     "PORT MAC: %02X:%02X:%02X:%02X:%02X:%02X",
drivers/net/virtio/virtio_rxtx.c +2 -2
index fa9c855e8..3de467768 100644
@@ -1114,8 +1114,8 @@ virtio_update_packet_stats(struct virtnet_stats *stats, struct rte_mbuf *mbuf)
 	}
 
 	ea = rte_pktmbuf_mtod(mbuf, struct rte_ether_addr *);
-	if (is_multicast_ether_addr(ea)) {
-		if (is_broadcast_ether_addr(ea))
+	if (rte_is_multicast_ether_addr(ea)) {
+		if (rte_is_broadcast_ether_addr(ea))
 			stats->broadcast++;
 		else
 			stats->multicast++;
drivers/net/vmxnet3/vmxnet3_ethdev.c +2 -2
index 3ad1e9e09..f718b8b65 100644
@@ -316,7 +316,7 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)
 		return -ENOMEM;
 	}
 	/* Copy the permanent MAC address */
-	ether_addr_copy((struct rte_ether_addr *)hw->perm_addr,
+	rte_ether_addr_copy((struct rte_ether_addr *)hw->perm_addr,
 			&eth_dev->data->mac_addrs[0]);
 
 	PMD_INIT_LOG(DEBUG, "MAC Address : %02x:%02x:%02x:%02x:%02x:%02x",
@@ -1209,7 +1209,7 @@ vmxnet3_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
 {
 	struct vmxnet3_hw *hw = dev->data->dev_private;
 
-	ether_addr_copy(mac_addr, (struct rte_ether_addr *)(hw->perm_addr));
+	rte_ether_addr_copy(mac_addr, (struct rte_ether_addr *)(hw->perm_addr));
 	vmxnet3_write_mac(hw, mac_addr->addr_bytes);
 	return 0;
 }
examples/bond/main.c +5 -4
index 38d1b40c2..f053e5bd8 100644
@@ -390,12 +390,13 @@ static int lcore_main(__attribute__((unused)) void *arg1)
 					if (arp_hdr->arp_opcode == rte_cpu_to_be_16(RTE_ARP_OP_REQUEST)) {
 						arp_hdr->arp_opcode = rte_cpu_to_be_16(RTE_ARP_OP_REPLY);
 						/* Switch src and dst data and set bonding MAC */
-						ether_addr_copy(&eth_hdr->s_addr, &eth_hdr->d_addr);
+						rte_ether_addr_copy(&eth_hdr->s_addr, &eth_hdr->d_addr);
 						rte_eth_macaddr_get(BOND_PORT, &eth_hdr->s_addr);
-						ether_addr_copy(&arp_hdr->arp_data.arp_sha, &arp_hdr->arp_data.arp_tha);
+						rte_ether_addr_copy(&arp_hdr->arp_data.arp_sha,
+								&arp_hdr->arp_data.arp_tha);
 						arp_hdr->arp_data.arp_tip = arp_hdr->arp_data.arp_sip;
 						rte_eth_macaddr_get(BOND_PORT, &d_addr);
-						ether_addr_copy(&d_addr, &arp_hdr->arp_data.arp_sha);
+						rte_ether_addr_copy(&d_addr, &arp_hdr->arp_data.arp_sha);
 						arp_hdr->arp_data.arp_sip = bond_ip;
 						rte_eth_tx_burst(BOND_PORT, 0, &pkts[i], 1);
 						is_free = 1;
@@ -410,7 +411,7 @@ static int lcore_main(__attribute__((unused)) void *arg1)
 				 }
 				ipv4_hdr = (struct ipv4_hdr *)((char *)(eth_hdr + 1) + offset);
 				if (ipv4_hdr->dst_addr == bond_ip) {
-					ether_addr_copy(&eth_hdr->s_addr, &eth_hdr->d_addr);
+					rte_ether_addr_copy(&eth_hdr->s_addr, &eth_hdr->d_addr);
 					rte_eth_macaddr_get(BOND_PORT, &eth_hdr->s_addr);
 					ipv4_hdr->dst_addr = ipv4_hdr->src_addr;
 					ipv4_hdr->src_addr = bond_ip;
examples/ethtool/ethtool-app/main.c +2 -2
index 27c22cf90..3d2a70d52 100644
@@ -161,8 +161,8 @@ static void process_frame(struct app_port *ptr_port,
 	struct rte_ether_hdr *ptr_mac_hdr;
 
 	ptr_mac_hdr = rte_pktmbuf_mtod(ptr_frame, struct rte_ether_hdr *);
-	ether_addr_copy(&ptr_mac_hdr->s_addr, &ptr_mac_hdr->d_addr);
-	ether_addr_copy(&ptr_port->mac_addr, &ptr_mac_hdr->s_addr);
+	rte_ether_addr_copy(&ptr_mac_hdr->s_addr, &ptr_mac_hdr->d_addr);
+	rte_ether_addr_copy(&ptr_port->mac_addr, &ptr_mac_hdr->s_addr);
 }
 
 static int slave_main(__attribute__((unused)) void *ptr_data)
examples/ethtool/lib/rte_ethtool.c +1 -1
index 299488c1c..571c4e5aa 100644
@@ -327,7 +327,7 @@ rte_ethtool_net_validate_addr(uint16_t port_id __rte_unused,
 {
 	if (addr == NULL)
 		return -EINVAL;
-	return is_valid_assigned_ether_addr(addr);
+	return rte_is_valid_assigned_ether_addr(addr);
 }
 
 int
examples/eventdev_pipeline/pipeline_common.h +2 -2
index ef23d963a..8e30393d0 100644
@@ -104,8 +104,8 @@ exchange_mac(struct rte_mbuf *m)
 
 	/* change mac addresses on packet (to use mbuf data) */
 	eth = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
-	ether_addr_copy(&eth->d_addr, &addr);
-	ether_addr_copy(&addr, &eth->d_addr);
+	rte_ether_addr_copy(&eth->d_addr, &addr);
+	rte_ether_addr_copy(&addr, &eth->d_addr);
 }
 
 static __rte_always_inline void
examples/flow_filtering/main.c +1 -1
index 7b8e7c4fa..cf9421874 100644
@@ -48,7 +48,7 @@ static inline void
 print_ether_addr(const char *what, struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
 	printf("%s%s", what, buf);
 }
 
examples/ip_fragmentation/main.c +3 -2
index a9efb4baa..8d82a6411 100644
@@ -354,7 +354,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, struct lcore_queue_conf *qconf,
 		*((uint64_t *)d_addr_bytes) = 0x000000000002 + ((uint64_t)port_out << 40);
 
 		/* src addr */
-		ether_addr_copy(&ports_eth_addr[port_out], &eth_hdr->s_addr);
+		rte_ether_addr_copy(&ports_eth_addr[port_out],
+				&eth_hdr->s_addr);
 		if (ipv6)
 			eth_hdr->ether_type = rte_be_to_cpu_16(ETHER_TYPE_IPv6);
 		else
@@ -572,7 +573,7 @@ static void
 print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
 	printf("%s%s", name, buf);
 }
 
examples/ip_reassembly/main.c +2 -2
index d9ecac006..fe92fcdd2 100644
@@ -410,7 +410,7 @@ reassemble(struct rte_mbuf *m, uint16_t portid, uint32_t queue,
 	*((uint64_t *)d_addr_bytes) = 0x000000000002 + ((uint64_t)dst_port << 40);
 
 	/* src addr */
-	ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
+	rte_ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
 
 	send_single_packet(m, dst_port);
 }
@@ -695,7 +695,7 @@ static void
 print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
 	printf("%s%s", name, buf);
 }
 
examples/ipsec-secgw/ipsec-secgw.c +1 -1
index 66e92165d..9a2c6e3ba 100644
@@ -1428,7 +1428,7 @@ static void
 print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
 	printf("%s%s", name, buf);
 }
 
examples/ipv4_multicast/main.c +3 -3
index a047197c7..938375230 100644
@@ -278,8 +278,8 @@ mcast_send_pkt(struct rte_mbuf *pkt, struct rte_ether_addr *dest_addr,
 		rte_pktmbuf_prepend(pkt, (uint16_t)sizeof(*ethdr));
 	RTE_ASSERT(ethdr != NULL);
 
-	ether_addr_copy(dest_addr, &ethdr->d_addr);
-	ether_addr_copy(&ports_eth_addr[port], &ethdr->s_addr);
+	rte_ether_addr_copy(dest_addr, &ethdr->d_addr);
+	rte_ether_addr_copy(&ports_eth_addr[port], &ethdr->s_addr);
 	ethdr->ether_type = rte_be_to_cpu_16(ETHER_TYPE_IPv4);
 
 	/* Put new packet into the output queue */
@@ -540,7 +540,7 @@ static void
 print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
 	printf("%s%s", name, buf);
 }
 
examples/kni/main.c +1 -1
index 8bea07182..a6d6fc2d2 100644
@@ -835,7 +835,7 @@ static void
 print_ethaddr(const char *name, struct rte_ether_addr *mac_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, mac_addr);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, mac_addr);
 	RTE_LOG(INFO, APP, "\t%s%s\n", name, buf);
 }
 
examples/l2fwd-crypto/main.c +1 -1
index dd09855e7..a77b000a9 100644
@@ -603,7 +603,7 @@ l2fwd_mac_updating(struct rte_mbuf *m, uint16_t dest_portid)
 	*((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dest_portid << 40);
 
 	/* src addr */
-	ether_addr_copy(&l2fwd_ports_eth_addr[dest_portid], &eth->s_addr);
+	rte_ether_addr_copy(&l2fwd_ports_eth_addr[dest_portid], &eth->s_addr);
 }
 
 static void
examples/l2fwd-jobstats/main.c +1 -1
index 033104d63..77e44dc82 100644
@@ -349,7 +349,7 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid)
 	*((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40);
 
 	/* src addr */
-	ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], &eth->s_addr);
+	rte_ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], &eth->s_addr);
 
 	buffer = tx_buffer[dst_port];
 	sent = rte_eth_tx_buffer(dst_port, 0, buffer, m);
examples/l2fwd-keepalive/main.c +1 -1
index 21d19932d..9831a4323 100644
@@ -179,7 +179,7 @@ l2fwd_simple_forward(struct rte_mbuf *m, unsigned portid)
 	*((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40);
 
 	/* src addr */
-	ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], &eth->s_addr);
+	rte_ether_addr_copy(&l2fwd_ports_eth_addr[dst_port], &eth->s_addr);
 
 	buffer = tx_buffer[dst_port];
 	sent = rte_eth_tx_buffer(dst_port, 0, buffer, m);
examples/l2fwd/main.c +1 -1
index c1d6797b0..1e2b14297 100644
@@ -161,7 +161,7 @@ l2fwd_mac_updating(struct rte_mbuf *m, unsigned dest_portid)
 	*((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dest_portid << 40);
 
 	/* src addr */
-	ether_addr_copy(&l2fwd_ports_eth_addr[dest_portid], &eth->s_addr);
+	rte_ether_addr_copy(&l2fwd_ports_eth_addr[dest_portid], &eth->s_addr);
 }
 
 static void
examples/l3fwd-acl/main.c +1 -1
index 3a0f5820e..4b15853e3 100644
@@ -1757,7 +1757,7 @@ static void
 print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
 	printf("%s%s", name, buf);
 }
 
examples/l3fwd-power/main.c +5 -3
index bcd584d3e..7f7be22c6 100644
@@ -700,7 +700,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint16_t portid,
 #endif
 
 		/* src addr */
-		ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
+		rte_ether_addr_copy(&ports_eth_addr[dst_port],
+				&eth_hdr->s_addr);
 
 		send_single_packet(m, dst_port);
 	} else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) {
@@ -725,7 +726,8 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint16_t portid,
 			0x000000000002 + ((uint64_t)dst_port << 40);
 
 		/* src addr */
-		ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
+		rte_ether_addr_copy(&ports_eth_addr[dst_port],
+				&eth_hdr->s_addr);
 
 		send_single_packet(m, dst_port);
 #else
@@ -1580,7 +1582,7 @@ static void
 print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
 	printf("%s%s", name, buf);
 }
 
examples/l3fwd-vf/main.c +2 -2
index 2c0c89e21..56a55ac28 100644
@@ -450,7 +450,7 @@ l3fwd_simple_forward(struct rte_mbuf *m, uint16_t portid,
 #endif
 
 	/* src addr */
-	ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
+	rte_ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
 
 	send_single_packet(m, dst_port);
 
@@ -791,7 +791,7 @@ static void
 print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
 	printf("%s%s", name, buf);
 }
 
examples/l3fwd/l3fwd_em.h +4 -2
index de1278b04..e787691e1 100644
@@ -47,7 +47,8 @@ l3fwd_em_simple_forward(struct rte_mbuf *m, uint16_t portid,
 		*(uint64_t *)&eth_hdr->d_addr = dest_eth_addr[dst_port];
 
 		/* src addr */
-		ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
+		rte_ether_addr_copy(&ports_eth_addr[dst_port],
+				&eth_hdr->s_addr);
 
 		send_single_packet(qconf, m, dst_port);
 	} else if (tcp_or_udp && (l3_ptypes == RTE_PTYPE_L3_IPV6)) {
@@ -68,7 +69,8 @@ l3fwd_em_simple_forward(struct rte_mbuf *m, uint16_t portid,
 		*(uint64_t *)&eth_hdr->d_addr = dest_eth_addr[dst_port];
 
 		/* src addr */
-		ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
+		rte_ether_addr_copy(&ports_eth_addr[dst_port],
+				&eth_hdr->s_addr);
 
 		send_single_packet(qconf, m, dst_port);
 	} else {
examples/l3fwd/l3fwd_lpm.h +4 -2
index 0c98d3fc4..950cde32a 100644
@@ -43,7 +43,8 @@ l3fwd_lpm_simple_forward(struct rte_mbuf *m, uint16_t portid,
 		*(uint64_t *)&eth_hdr->d_addr = dest_eth_addr[dst_port];
 
 		/* src addr */
-		ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
+		rte_ether_addr_copy(&ports_eth_addr[dst_port],
+				&eth_hdr->s_addr);
 
 		send_single_packet(qconf, m, dst_port);
 	} else if (RTE_ETH_IS_IPV6_HDR(m->packet_type)) {
@@ -64,7 +65,8 @@ l3fwd_lpm_simple_forward(struct rte_mbuf *m, uint16_t portid,
 		*(uint64_t *)&eth_hdr->d_addr = dest_eth_addr[dst_port];
 
 		/* src addr */
-		ether_addr_copy(&ports_eth_addr[dst_port], &eth_hdr->s_addr);
+		rte_ether_addr_copy(&ports_eth_addr[dst_port],
+				&eth_hdr->s_addr);
 
 		send_single_packet(qconf, m, dst_port);
 	} else {
examples/l3fwd/main.c +2 -2
index b0a700ab1..3f4625abd 100644
@@ -650,7 +650,7 @@ static void
 print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr)
 {
 	char buf[ETHER_ADDR_FMT_SIZE];
-	ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+	rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
 	printf("%s%s", name, buf);
 }
 
@@ -914,7 +914,7 @@ main(int argc, char **argv)
 		/*
 		 * prepare src MACs for each port.
 		 */
-		ether_addr_copy(&ports_eth_addr[portid],
+		rte_ether_addr_copy(&ports_eth_addr[portid],
 			(struct rte_ether_addr *)(val_eth + portid) + 1);
 
 		/* init memory */
examples/link_status_interrupt/main.c +1 -1
index 9997c58f4..9cd4dc7a6 100644
@@ -176,7 +176,7 @@ lsi_simple_forward(struct rte_mbuf *m, unsigned portid)
 	*((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40);
 
 	/* src addr */
-	ether_addr_copy(&lsi_ports_eth_addr[dst_port], &eth->s_addr);
+	rte_ether_addr_copy(&lsi_ports_eth_addr[dst_port], &eth->s_addr);
 
 	buffer = tx_buffer[dst_port];
 	sent = rte_eth_tx_buffer(dst_port, 0, buffer, m);
examples/performance-thread/l3fwd-thread/main.c +22 -20

78 lines not on this page · raw message

examples/ptpclient/ptpclient.c +1 -1
index 7d28f59ce..1266f521c 100644
@@ -401,7 +401,7 @@ parse_fup(struct ptpv2_data_slave_ordinary *ptp_data)
 		rte_eth_macaddr_get(ptp_data->portid, &eth_hdr->s_addr);
 
 		/* Set multicast address 01-1B-19-00-00-00. */
-		ether_addr_copy(&eth_multicast, &eth_hdr->d_addr);
+		rte_ether_addr_copy(&eth_multicast, &eth_hdr->d_addr);
 
 		eth_hdr->ether_type = htons(PTP_PROTOCOL);
 		ptp_msg = (struct ptp_message *)
examples/quota_watermark/qw/main.c +1 -1
index 61e92a820..a61360b99 100644
@@ -67,7 +67,7 @@ static void send_pause_frame(uint16_t port_id, uint16_t duration)
 	pause_frame = (struct ether_fc_frame *) &hdr[1];
 
 	rte_eth_macaddr_get(port_id, &mac_addr);
-	ether_addr_copy(&mac_addr, &hdr->s_addr);
+	rte_ether_addr_copy(&mac_addr, &hdr->s_addr);
 
 	void *tmp = &hdr->d_addr.addr_bytes[0];
 	*((uint64_t *)tmp) = 0x010000C28001ULL;
examples/tep_termination/vxlan_setup.c +9 -7
index e4af7bc4d..3316df13a 100644
@@ -243,7 +243,7 @@ vxlan_link(struct vhost_dev *vdev, struct rte_mbuf *m)
 
 	/* Learn MAC address of guest device from packet */
 	pkt_hdr = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
-	if (is_same_ether_addr(&(pkt_hdr->s_addr), &vdev->mac_address)) {
+	if (rte_is_same_ether_addr(&(pkt_hdr->s_addr), &vdev->mac_address)) {
 		RTE_LOG(INFO, VHOST_DATA,
 			"(%d) WARNING: This device is using an existing"
 			" MAC address and has not been registered.\n",
@@ -261,11 +261,11 @@ vxlan_link(struct vhost_dev *vdev, struct rte_mbuf *m)
 	memset(&tunnel_filter_conf, 0,
 		sizeof(struct rte_eth_tunnel_filter_conf));
 
-	ether_addr_copy(&ports_eth_addr[0], &tunnel_filter_conf.outer_mac);
+	rte_ether_addr_copy(&ports_eth_addr[0], &tunnel_filter_conf.outer_mac);
 	tunnel_filter_conf.filter_type = tep_filter_type[filter_idx];
 
 	/* inner MAC */
-	ether_addr_copy(&vdev->mac_address, &tunnel_filter_conf.inner_mac);
+	rte_ether_addr_copy(&vdev->mac_address, &tunnel_filter_conf.inner_mac);
 
 	tunnel_filter_conf.queue_id = vdev->rx_q;
 	tunnel_filter_conf.tenant_id = tenant_id_conf[vdev->rx_q];
@@ -309,9 +309,9 @@ vxlan_link(struct vhost_dev *vdev, struct rte_mbuf *m)
 	}
 
 	vxdev.out_key = tenant_id_conf[vdev->rx_q];
-	ether_addr_copy(&vxdev.port[portid].peer_mac,
+	rte_ether_addr_copy(&vxdev.port[portid].peer_mac,
 			&app_l2_hdr[portid].d_addr);
-	ether_addr_copy(&ports_eth_addr[0],
+	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(ETHER_TYPE_IPv4);
 
@@ -349,8 +349,10 @@ vxlan_unlink(struct vhost_dev *vdev)
 		memset(&tunnel_filter_conf, 0,
 			sizeof(struct rte_eth_tunnel_filter_conf));
 
-		ether_addr_copy(&ports_eth_addr[0], &tunnel_filter_conf.outer_mac);
-		ether_addr_copy(&vdev->mac_address, &tunnel_filter_conf.inner_mac);
+		rte_ether_addr_copy(&ports_eth_addr[0],
+				&tunnel_filter_conf.outer_mac);
+		rte_ether_addr_copy(&vdev->mac_address,
+				&tunnel_filter_conf.inner_mac);
 		tunnel_filter_conf.tenant_id = tenant_id_conf[vdev->rx_q];
 		tunnel_filter_conf.filter_type = tep_filter_type[filter_idx];
 
examples/vhost/main.c +2 -2
index cd1a51bfa..f4f0fc862 100644
@@ -666,7 +666,7 @@ find_vhost_dev(struct rte_ether_addr *mac)
 
 	TAILQ_FOREACH(vdev, &vhost_dev_list, global_vdev_entry) {
 		if (vdev->ready == DEVICE_RX &&
-		    is_same_ether_addr(mac, &vdev->mac_address))
+		    rte_is_same_ether_addr(mac, &vdev->mac_address))
 			return vdev;
 	}
 
@@ -916,7 +916,7 @@ virtio_tx_route(struct vhost_dev *vdev, struct rte_mbuf *m, uint16_t vlan_tag)
 
 
 	nh = rte_pktmbuf_mtod(m, struct rte_ether_hdr *);
-	if (unlikely(is_broadcast_ether_addr(&nh->d_addr))) {
+	if (unlikely(rte_is_broadcast_ether_addr(&nh->d_addr))) {
 		struct vhost_dev *vdev2;
 
 		TAILQ_FOREACH(vdev2, &vhost_dev_list, global_vdev_entry) {
examples/vmdq/main.c +1 -1
index 5195a515a..7281ffd7f 100644
@@ -417,7 +417,7 @@ update_mac_address(struct rte_mbuf *m, unsigned dst_port)
 	*((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40);
 
 	/* src addr */
-	ether_addr_copy(&vmdq_ports_eth_addr[dst_port], &eth->s_addr);
+	rte_ether_addr_copy(&vmdq_ports_eth_addr[dst_port], &eth->s_addr);
 }
 
 /* When we receive a HUP signal, print out our stats */
examples/vmdq_dcb/main.c +1 -1
index 75cf31a10..389000327 100644
@@ -504,7 +504,7 @@ update_mac_address(struct rte_mbuf *m, unsigned dst_port)
 	*((uint64_t *)tmp) = 0x000000000002 + ((uint64_t)dst_port << 40);
 
 	/* src addr */
-	ether_addr_copy(&vmdq_ports_eth_addr[dst_port], &eth->s_addr);
+	rte_ether_addr_copy(&vmdq_ports_eth_addr[dst_port], &eth->s_addr);
 }
 
 /* When we receive a HUP signal, print out our stats */
lib/librte_ethdev/rte_class_eth.c +1 -1
index e554668da..873a65353 100644
@@ -61,7 +61,7 @@ eth_mac_cmp(const char *key __rte_unused,
 	/* Return 0 if devargs MAC is matching one of the device MACs. */
 	rte_eth_dev_info_get(data->port_id, &dev_info);
 	for (index = 0; index < dev_info.max_mac_addrs; index++)
-		if (is_same_ether_addr(&mac, &data->mac_addrs[index]))
+		if (rte_is_same_ether_addr(&mac, &data->mac_addrs[index]))
 			return 0;
 	return -1; /* no match */
 }
lib/librte_ethdev/rte_ethdev.c +10 -10
index b868535c2..1af36dead 100644
@@ -1363,7 +1363,7 @@ rte_eth_dev_mac_restore(struct rte_eth_dev *dev,
 			addr = &dev->data->mac_addrs[i];
 
 			/* skip zero address */
-			if (is_zero_ether_addr(addr))
+			if (rte_is_zero_ether_addr(addr))
 				continue;
 
 			pool = 0;
@@ -2597,7 +2597,7 @@ rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr)
 
 	RTE_ETH_VALID_PORTID_OR_RET(port_id);
 	dev = &rte_eth_devices[port_id];
-	ether_addr_copy(&dev->data->mac_addrs[0], mac_addr);
+	rte_ether_addr_copy(&dev->data->mac_addrs[0], mac_addr);
 }
 
 
@@ -3109,7 +3109,7 @@ rte_eth_dev_mac_addr_add(uint16_t port_id, struct rte_ether_addr *addr,
 	dev = &rte_eth_devices[port_id];
 	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->mac_addr_add, -ENOTSUP);
 
-	if (is_zero_ether_addr(addr)) {
+	if (rte_is_zero_ether_addr(addr)) {
 		RTE_ETHDEV_LOG(ERR, "Port %u: Cannot add NULL MAC address\n",
 			port_id);
 		return -EINVAL;
@@ -3140,7 +3140,7 @@ rte_eth_dev_mac_addr_add(uint16_t port_id, struct rte_ether_addr *addr,
 
 	if (ret == 0) {
 		/* Update address in NIC data structure */
-		ether_addr_copy(addr, &dev->data->mac_addrs[index]);
+		rte_ether_addr_copy(addr, &dev->data->mac_addrs[index]);
 
 		/* Update pool bitmap in NIC data structure */
 		dev->data->mac_pool_sel[index] |= (1ULL << pool);
@@ -3172,7 +3172,7 @@ rte_eth_dev_mac_addr_remove(uint16_t port_id, struct rte_ether_addr *addr)
 	(*dev->dev_ops->mac_addr_remove)(dev, index);
 
 	/* Update address in NIC data structure */
-	ether_addr_copy(&null_mac_addr, &dev->data->mac_addrs[index]);
+	rte_ether_addr_copy(&null_mac_addr, &dev->data->mac_addrs[index]);
 
 	/* reset pool bitmap */
 	dev->data->mac_pool_sel[index] = 0;
@@ -3188,7 +3188,7 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
 
-	if (!is_valid_assigned_ether_addr(addr))
+	if (!rte_is_valid_assigned_ether_addr(addr))
 		return -EINVAL;
 
 	dev = &rte_eth_devices[port_id];
@@ -3199,7 +3199,7 @@ rte_eth_dev_default_mac_addr_set(uint16_t port_id, struct rte_ether_addr *addr)
 		return ret;
 
 	/* Update default address in NIC data structure */
-	ether_addr_copy(addr, &dev->data->mac_addrs[0]);
+	rte_ether_addr_copy(addr, &dev->data->mac_addrs[0]);
 
 	return 0;
 }
@@ -3239,7 +3239,7 @@ rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr,
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
 
 	dev = &rte_eth_devices[port_id];
-	if (is_zero_ether_addr(addr)) {
+	if (rte_is_zero_ether_addr(addr)) {
 		RTE_ETHDEV_LOG(ERR, "Port %u: Cannot add NULL MAC address\n",
 			port_id);
 		return -EINVAL;
@@ -3271,10 +3271,10 @@ rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr,
 	if (ret == 0) {
 		/* Update address in NIC data structure */
 		if (on)
-			ether_addr_copy(addr,
+			rte_ether_addr_copy(addr,
 					&dev->data->hash_mac_addrs[index]);
 		else
-			ether_addr_copy(&null_mac_addr,
+			rte_ether_addr_copy(&null_mac_addr,
 					&dev->data->hash_mac_addrs[index]);
 	}
 
lib/librte_gro/gro_tcp4.c +4 -4
index 284219517..99c9c7d91 100644
@@ -160,8 +160,8 @@ insert_new_flow(struct gro_tcp4_tbl *tbl,
 
 	dst = &(tbl->flows[flow_idx].key);
 
-	ether_addr_copy(&(src->eth_saddr), &(dst->eth_saddr));
-	ether_addr_copy(&(src->eth_daddr), &(dst->eth_daddr));
+	rte_ether_addr_copy(&(src->eth_saddr), &(dst->eth_saddr));
+	rte_ether_addr_copy(&(src->eth_daddr), &(dst->eth_daddr));
 	dst->ip_src_addr = src->ip_src_addr;
 	dst->ip_dst_addr = src->ip_dst_addr;
 	dst->recv_ack = src->recv_ack;
@@ -243,8 +243,8 @@ gro_tcp4_reassemble(struct rte_mbuf *pkt,
 	ip_id = is_atomic ? 0 : rte_be_to_cpu_16(ipv4_hdr->packet_id);
 	sent_seq = rte_be_to_cpu_32(tcp_hdr->sent_seq);
 
-	ether_addr_copy(&(eth_hdr->s_addr), &(key.eth_saddr));
-	ether_addr_copy(&(eth_hdr->d_addr), &(key.eth_daddr));
+	rte_ether_addr_copy(&(eth_hdr->s_addr), &(key.eth_saddr));
+	rte_ether_addr_copy(&(eth_hdr->d_addr), &(key.eth_daddr));
 	key.ip_src_addr = ipv4_hdr->src_addr;
 	key.ip_dst_addr = ipv4_hdr->dst_addr;
 	key.src_port = tcp_hdr->src_port;
lib/librte_gro/gro_tcp4.h +2 -2
index 988cca8c6..ce3471a4d 100644
@@ -187,8 +187,8 @@ uint32_t gro_tcp4_tbl_pkt_count(void *tbl);
 static inline int
 is_same_tcp4_flow(struct tcp4_flow_key k1, struct tcp4_flow_key k2)
 {
-	return (is_same_ether_addr(&k1.eth_saddr, &k2.eth_saddr) &&
-			is_same_ether_addr(&k1.eth_daddr, &k2.eth_daddr) &&
+	return (rte_is_same_ether_addr(&k1.eth_saddr, &k2.eth_saddr) &&
+			rte_is_same_ether_addr(&k1.eth_daddr, &k2.eth_daddr) &&
 			(k1.ip_src_addr == k2.ip_src_addr) &&
 			(k1.ip_dst_addr == k2.ip_dst_addr) &&
 			(k1.recv_ack == k2.recv_ack) &&
lib/librte_gro/gro_vxlan_tcp4.c +11 -10
index d713e3dd6..350793b69 100644
@@ -164,9 +164,9 @@ insert_new_flow(struct gro_vxlan_tcp4_tbl *tbl,
 
 	dst = &(tbl->flows[flow_idx].key);
 
-	ether_addr_copy(&(src->inner_key.eth_saddr),
+	rte_ether_addr_copy(&(src->inner_key.eth_saddr),
 			&(dst->inner_key.eth_saddr));
-	ether_addr_copy(&(src->inner_key.eth_daddr),
+	rte_ether_addr_copy(&(src->inner_key.eth_daddr),
 			&(dst->inner_key.eth_daddr));
 	dst->inner_key.ip_src_addr = src->inner_key.ip_src_addr;
 	dst->inner_key.ip_dst_addr = src->inner_key.ip_dst_addr;
@@ -176,8 +176,8 @@ insert_new_flow(struct gro_vxlan_tcp4_tbl *tbl,
 
 	dst->vxlan_hdr.vx_flags = src->vxlan_hdr.vx_flags;
 	dst->vxlan_hdr.vx_vni = src->vxlan_hdr.vx_vni;
-	ether_addr_copy(&(src->outer_eth_saddr), &(dst->outer_eth_saddr));
-	ether_addr_copy(&(src->outer_eth_daddr), &(dst->outer_eth_daddr));
+	rte_ether_addr_copy(&(src->outer_eth_saddr), &(dst->outer_eth_saddr));
+	rte_ether_addr_copy(&(src->outer_eth_daddr), &(dst->outer_eth_daddr));
 	dst->outer_ip_src_addr = src->outer_ip_src_addr;
 	dst->outer_ip_dst_addr = src->outer_ip_dst_addr;
 	dst->outer_src_port = src->outer_src_port;
@@ -193,8 +193,9 @@ static inline int
 is_same_vxlan_tcp4_flow(struct vxlan_tcp4_flow_key k1,
 		struct vxlan_tcp4_flow_key k2)
 {
-	return (is_same_ether_addr(&k1.outer_eth_saddr, &k2.outer_eth_saddr) &&
-			is_same_ether_addr(&k1.outer_eth_daddr,
+	return (rte_is_same_ether_addr(&k1.outer_eth_saddr,
+					&k2.outer_eth_saddr) &&
+			rte_is_same_ether_addr(&k1.outer_eth_daddr,
 				&k2.outer_eth_daddr) &&
 			(k1.outer_ip_src_addr == k2.outer_ip_src_addr) &&
 			(k1.outer_ip_dst_addr == k2.outer_ip_dst_addr) &&
@@ -356,8 +357,8 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt,
 
 	sent_seq = rte_be_to_cpu_32(tcp_hdr->sent_seq);
 
-	ether_addr_copy(&(eth_hdr->s_addr), &(key.inner_key.eth_saddr));
-	ether_addr_copy(&(eth_hdr->d_addr), &(key.inner_key.eth_daddr));
+	rte_ether_addr_copy(&(eth_hdr->s_addr), &(key.inner_key.eth_saddr));
+	rte_ether_addr_copy(&(eth_hdr->d_addr), &(key.inner_key.eth_daddr));
 	key.inner_key.ip_src_addr = ipv4_hdr->src_addr;
 	key.inner_key.ip_dst_addr = ipv4_hdr->dst_addr;
 	key.inner_key.recv_ack = tcp_hdr->recv_ack;
@@ -366,8 +367,8 @@ gro_vxlan_tcp4_reassemble(struct rte_mbuf *pkt,
 
 	key.vxlan_hdr.vx_flags = vxlan_hdr->vx_flags;
 	key.vxlan_hdr.vx_vni = vxlan_hdr->vx_vni;
-	ether_addr_copy(&(outer_eth_hdr->s_addr), &(key.outer_eth_saddr));
-	ether_addr_copy(&(outer_eth_hdr->d_addr), &(key.outer_eth_daddr));
+	rte_ether_addr_copy(&(outer_eth_hdr->s_addr), &(key.outer_eth_saddr));
+	rte_ether_addr_copy(&(outer_eth_hdr->d_addr), &(key.outer_eth_daddr));
 	key.outer_ip_src_addr = outer_ipv4_hdr->src_addr;
 	key.outer_ip_dst_addr = outer_ipv4_hdr->dst_addr;
 	key.outer_src_port = udp_hdr->src_port;
lib/librte_net/rte_arp.c +3 -3
index adda9f700..0b204a573 100644
@@ -31,7 +31,7 @@ rte_net_make_rarp_packet(struct rte_mempool *mpool,
 
 	/* Ethernet header. */
 	memset(eth_hdr->d_addr.addr_bytes, 0xff, ETHER_ADDR_LEN);
-	ether_addr_copy(mac, &eth_hdr->s_addr);
+	rte_ether_addr_copy(mac, &eth_hdr->s_addr);
 	eth_hdr->ether_type = htons(ETHER_TYPE_RARP);
 
 	/* RARP header. */
@@ -42,8 +42,8 @@ rte_net_make_rarp_packet(struct rte_mempool *mpool,
 	rarp->arp_plen = 4;
 	rarp->arp_opcode  = htons(RTE_ARP_OP_REVREQUEST);
 
-	ether_addr_copy(mac, &rarp->arp_data.arp_sha);
-	ether_addr_copy(mac, &rarp->arp_data.arp_tha);
+	rte_ether_addr_copy(mac, &rarp->arp_data.arp_sha);
+	rte_ether_addr_copy(mac, &rarp->arp_data.arp_tha);
 	memset(&rarp->arp_data.arp_sip, 0x00, 4);
 	memset(&rarp->arp_data.arp_tip, 0x00, 4);
 
lib/librte_net/rte_ether.h +12 -12
index afdbaa1a7..cc31fbd9b 100644
@@ -75,7 +75,7 @@ struct rte_ether_addr {
  *  True  (1) if the given two ethernet address are the same;
  *  False (0) otherwise.
  */
-static inline int is_same_ether_addr(const struct rte_ether_addr *ea1,
+static inline int rte_is_same_ether_addr(const struct rte_ether_addr *ea1,
 				     const struct rte_ether_addr *ea2)
 {
 	int i;
@@ -95,7 +95,7 @@ static inline int is_same_ether_addr(const struct rte_ether_addr *ea1,
  *   True  (1) if the given ethernet address is filled with zeros;
  *   false (0) otherwise.
  */
-static inline int is_zero_ether_addr(const struct rte_ether_addr *ea)
+static inline int rte_is_zero_ether_addr(const struct rte_ether_addr *ea)
 {
 	int i;
 	for (i = 0; i < ETHER_ADDR_LEN; i++)
@@ -114,7 +114,7 @@ static inline int is_zero_ether_addr(const struct rte_ether_addr *ea)
  *   True  (1) if the given ethernet address is a unicast address;
  *   false (0) otherwise.
  */
-static inline int is_unicast_ether_addr(const struct rte_ether_addr *ea)
+static inline int rte_is_unicast_ether_addr(const struct rte_ether_addr *ea)
 {
 	return (ea->addr_bytes[0] & ETHER_GROUP_ADDR) == 0;
 }
@@ -129,7 +129,7 @@ static inline int is_unicast_ether_addr(const struct rte_ether_addr *ea)
  *   True  (1) if the given ethernet address is a multicast address;
  *   false (0) otherwise.
  */
-static inline int is_multicast_ether_addr(const struct rte_ether_addr *ea)
+static inline int rte_is_multicast_ether_addr(const struct rte_ether_addr *ea)
 {
 	return ea->addr_bytes[0] & ETHER_GROUP_ADDR;
 }
@@ -144,7 +144,7 @@ static inline int is_multicast_ether_addr(const struct rte_ether_addr *ea)
  *   True  (1) if the given ethernet address is a broadcast address;
  *   false (0) otherwise.
  */
-static inline int is_broadcast_ether_addr(const struct rte_ether_addr *ea)
+static inline int rte_is_broadcast_ether_addr(const struct rte_ether_addr *ea)
 {
 	const unaligned_uint16_t *ea_words = (const unaligned_uint16_t *)ea;
 
@@ -162,7 +162,7 @@ static inline int is_broadcast_ether_addr(const struct rte_ether_addr *ea)
  *   True  (1) if the given ethernet address is a universally assigned address;
  *   false (0) otherwise.
  */
-static inline int is_universal_ether_addr(const struct rte_ether_addr *ea)
+static inline int rte_is_universal_ether_addr(const struct rte_ether_addr *ea)
 {
 	return (ea->addr_bytes[0] & ETHER_LOCAL_ADMIN_ADDR) == 0;
 }
@@ -177,7 +177,7 @@ static inline int is_universal_ether_addr(const struct rte_ether_addr *ea)
  *   True  (1) if the given ethernet address is a locally assigned address;
  *   false (0) otherwise.
  */
-static inline int is_local_admin_ether_addr(const struct rte_ether_addr *ea)
+static inline int rte_is_local_admin_ether_addr(const struct rte_ether_addr *ea)
 {
 	return (ea->addr_bytes[0] & ETHER_LOCAL_ADMIN_ADDR) != 0;
 }
@@ -193,9 +193,9 @@ static inline int is_local_admin_ether_addr(const struct rte_ether_addr *ea)
  *   True  (1) if the given ethernet address is valid;
  *   false (0) otherwise.
  */
-static inline int is_valid_assigned_ether_addr(const struct rte_ether_addr *ea)
+static inline int rte_is_valid_assigned_ether_addr(const struct rte_ether_addr *ea)
 {
-	return is_unicast_ether_addr(ea) && (!is_zero_ether_addr(ea));
+	return rte_is_unicast_ether_addr(ea) && (!rte_is_zero_ether_addr(ea));
 }
 
 /**
@@ -204,7 +204,7 @@ static inline int is_valid_assigned_ether_addr(const struct rte_ether_addr *ea)
  * @param addr
  *   A pointer to Ethernet address.
  */
-static inline void eth_random_addr(uint8_t *addr)
+static inline void rte_eth_random_addr(uint8_t *addr)
 {
 	uint64_t rand = rte_rand();
 	uint8_t *p = (uint8_t *)&rand;
@@ -222,7 +222,7 @@ static inline void eth_random_addr(uint8_t *addr)
  * @param ea_to
  *   A pointer to a ether_addr structure where to copy the Ethernet address.
  */
-static inline void ether_addr_copy(const struct rte_ether_addr *ea_from,
+static inline void rte_ether_addr_copy(const struct rte_ether_addr *ea_from,
 				   struct rte_ether_addr *ea_to)
 {
 #ifdef __INTEL_COMPILER
@@ -252,7 +252,7 @@ static inline void ether_addr_copy(const struct rte_ether_addr *ea_from,
  *   A pointer to a ether_addr structure.
  */
 static inline void
-ether_format_addr(char *buf, uint16_t size,
+rte_ether_format_addr(char *buf, uint16_t size,
 		  const struct rte_ether_addr *eth_addr)
 {
 	snprintf(buf, size, "%02X:%02X:%02X:%02X:%02X:%02X",
lib/librte_pipeline/rte_table_action.c +28 -20

108 lines not on this page · raw message

Signature · 1 line
2.11.0