summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/test-eventdev/test_perf_common.c2
-rw-r--r--app/test-eventdev/test_pipeline_common.c2
-rw-r--r--app/test-pmd/cmdline.c34
-rw-r--r--app/test-pmd/cmdline_flow.c80
-rw-r--r--app/test-pmd/config.c4
-rw-r--r--app/test-pmd/csumonly.c46
-rw-r--r--app/test-pmd/flowgen.c2
-rw-r--r--app/test-pmd/icmpecho.c12
-rw-r--r--app/test-pmd/ieee1588fwd.c4
-rw-r--r--app/test-pmd/parameters.c6
-rw-r--r--app/test-pmd/testpmd.c11
-rw-r--r--app/test-pmd/testpmd.h20
-rw-r--r--app/test-pmd/txonly.c2
-rw-r--r--app/test-pmd/util.c4
-rw-r--r--app/test/packet_burst_generator.c14
-rw-r--r--app/test/test_cmdline_etheraddr.c2
-rw-r--r--app/test/test_flow_classify.c6
-rw-r--r--app/test/test_link_bonding.c111
-rw-r--r--app/test/test_link_bonding_mode4.c30
-rw-r--r--app/test/test_link_bonding_rssconf.c4
-rw-r--r--app/test/test_pmd_perf.c8
-rw-r--r--app/test/test_sched.c2
-rw-r--r--app/test/virtual_pmd.c2
23 files changed, 207 insertions, 201 deletions
diff --git a/app/test-eventdev/test_perf_common.c b/app/test-eventdev/test_perf_common.c
index 8dbfd81..01f7828 100644
--- a/app/test-eventdev/test_perf_common.c
+++ b/app/test-eventdev/test_perf_common.c
@@ -658,7 +658,7 @@ perf_ethdev_setup(struct evt_test *test, struct evt_options *opt)
struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
- .max_rx_pkt_len = ETHER_MAX_LEN,
+ .max_rx_pkt_len = RTE_ETHER_MAX_LEN,
.split_hdr_size = 0,
},
.rx_adv_conf = {
diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c
index 1e52564..16c49b8 100644
--- a/app/test-eventdev/test_pipeline_common.c
+++ b/app/test-eventdev/test_pipeline_common.c
@@ -165,7 +165,7 @@ pipeline_ethdev_setup(struct evt_test *test, struct evt_options *opt)
struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
- .max_rx_pkt_len = ETHER_MAX_LEN,
+ .max_rx_pkt_len = RTE_ETHER_MAX_LEN,
},
.rx_adv_conf = {
.rss_conf = {
diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c
index 1fb6099..d1e0d44 100644
--- a/app/test-pmd/cmdline.c
+++ b/app/test-pmd/cmdline.c
@@ -1925,16 +1925,16 @@ cmd_config_max_pkt_len_parsed(void *parsed_result,
uint64_t rx_offloads = port->dev_conf.rxmode.offloads;
if (!strcmp(res->name, "max-pkt-len")) {
- if (res->value < ETHER_MIN_LEN) {
+ if (res->value < RTE_ETHER_MIN_LEN) {
printf("max-pkt-len can not be less than %d\n",
- ETHER_MIN_LEN);
+ RTE_ETHER_MIN_LEN);
return;
}
if (res->value == port->dev_conf.rxmode.max_rx_pkt_len)
return;
port->dev_conf.rxmode.max_rx_pkt_len = res->value;
- if (res->value > ETHER_MAX_LEN)
+ if (res->value > RTE_ETHER_MAX_LEN)
rx_offloads |= DEV_RX_OFFLOAD_JUMBO_FRAME;
else
rx_offloads &= ~DEV_RX_OFFLOAD_JUMBO_FRAME;
@@ -1996,8 +1996,8 @@ cmd_config_mtu_parsed(void *parsed_result,
{
struct cmd_config_mtu_result *res = parsed_result;
- if (res->value < ETHER_MIN_LEN) {
- printf("mtu cannot be less than %d\n", ETHER_MIN_LEN);
+ if (res->value < RTE_ETHER_MIN_LEN) {
+ printf("mtu cannot be less than %d\n", RTE_ETHER_MIN_LEN);
return;
}
port_mtu_set(res->port_id, res->value);
@@ -8236,7 +8236,7 @@ cmd_set_vf_macvlan_parsed(void *parsed_result,
memset(&filter, 0, sizeof(struct rte_eth_mac_filter));
- rte_memcpy(&filter.mac_addr, &res->address, ETHER_ADDR_LEN);
+ rte_memcpy(&filter.mac_addr, &res->address, RTE_ETHER_ADDR_LEN);
/* set VF MAC filter */
filter.is_vf = 1;
@@ -9210,7 +9210,7 @@ cmd_set_mirror_mask_parsed(void *parsed_result,
return;
for (i = 0; i < nb_item; i++) {
- if (vlan_list[i] > ETHER_MAX_VLAN_ID) {
+ if (vlan_list[i] > RTE_ETHER_MAX_VLAN_ID) {
printf("Invalid vlan_id: must be < 4096\n");
return;
}
@@ -15301,9 +15301,9 @@ static void cmd_set_vxlan_parsed(void *parsed_result,
if (vxlan_encap_conf.select_vlan)
vxlan_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci);
rte_memcpy(vxlan_encap_conf.eth_src, res->eth_src.addr_bytes,
- ETHER_ADDR_LEN);
+ RTE_ETHER_ADDR_LEN);
rte_memcpy(vxlan_encap_conf.eth_dst, res->eth_dst.addr_bytes,
- ETHER_ADDR_LEN);
+ RTE_ETHER_ADDR_LEN);
}
cmdline_parse_inst_t cmd_set_vxlan = {
@@ -15492,9 +15492,9 @@ static void cmd_set_nvgre_parsed(void *parsed_result,
if (nvgre_encap_conf.select_vlan)
nvgre_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci);
rte_memcpy(nvgre_encap_conf.eth_src, res->eth_src.addr_bytes,
- ETHER_ADDR_LEN);
+ RTE_ETHER_ADDR_LEN);
rte_memcpy(nvgre_encap_conf.eth_dst, res->eth_dst.addr_bytes,
- ETHER_ADDR_LEN);
+ RTE_ETHER_ADDR_LEN);
}
cmdline_parse_inst_t cmd_set_nvgre = {
@@ -15609,9 +15609,9 @@ static void cmd_set_l2_encap_parsed(void *parsed_result,
if (l2_encap_conf.select_vlan)
l2_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci);
rte_memcpy(l2_encap_conf.eth_src, res->eth_src.addr_bytes,
- ETHER_ADDR_LEN);
+ RTE_ETHER_ADDR_LEN);
rte_memcpy(l2_encap_conf.eth_dst, res->eth_dst.addr_bytes,
- ETHER_ADDR_LEN);
+ RTE_ETHER_ADDR_LEN);
}
cmdline_parse_inst_t cmd_set_l2_encap = {
@@ -15801,9 +15801,9 @@ static void cmd_set_mplsogre_encap_parsed(void *parsed_result,
if (mplsogre_encap_conf.select_vlan)
mplsogre_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci);
rte_memcpy(mplsogre_encap_conf.eth_src, res->eth_src.addr_bytes,
- ETHER_ADDR_LEN);
+ RTE_ETHER_ADDR_LEN);
rte_memcpy(mplsogre_encap_conf.eth_dst, res->eth_dst.addr_bytes,
- ETHER_ADDR_LEN);
+ RTE_ETHER_ADDR_LEN);
}
cmdline_parse_inst_t cmd_set_mplsogre_encap = {
@@ -16039,9 +16039,9 @@ static void cmd_set_mplsoudp_encap_parsed(void *parsed_result,
if (mplsoudp_encap_conf.select_vlan)
mplsoudp_encap_conf.vlan_tci = rte_cpu_to_be_16(res->tci);
rte_memcpy(mplsoudp_encap_conf.eth_src, res->eth_src.addr_bytes,
- ETHER_ADDR_LEN);
+ RTE_ETHER_ADDR_LEN);
rte_memcpy(mplsoudp_encap_conf.eth_dst, res->eth_dst.addr_bytes,
- ETHER_ADDR_LEN);
+ RTE_ETHER_ADDR_LEN);
}
cmdline_parse_inst_t cmd_set_mplsoudp_encap = {
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 2e274f9..7a1c5ab 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3493,9 +3493,9 @@ parse_vc_action_vxlan_encap(struct context *ctx, const struct token *token,
.item_vxlan.flags = 0,
};
memcpy(action_vxlan_encap_data->item_eth.dst.addr_bytes,
- vxlan_encap_conf.eth_dst, ETHER_ADDR_LEN);
+ vxlan_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
memcpy(action_vxlan_encap_data->item_eth.src.addr_bytes,
- vxlan_encap_conf.eth_src, ETHER_ADDR_LEN);
+ vxlan_encap_conf.eth_src, RTE_ETHER_ADDR_LEN);
if (!vxlan_encap_conf.select_ipv4) {
memcpy(&action_vxlan_encap_data->item_ipv6.hdr.src_addr,
&vxlan_encap_conf.ipv6_src,
@@ -3616,9 +3616,9 @@ parse_vc_action_nvgre_encap(struct context *ctx, const struct token *token,
.item_nvgre.flow_id = 0,
};
memcpy(action_nvgre_encap_data->item_eth.dst.addr_bytes,
- nvgre_encap_conf.eth_dst, ETHER_ADDR_LEN);
+ nvgre_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
memcpy(action_nvgre_encap_data->item_eth.src.addr_bytes,
- nvgre_encap_conf.eth_src, ETHER_ADDR_LEN);
+ nvgre_encap_conf.eth_src, RTE_ETHER_ADDR_LEN);
if (!nvgre_encap_conf.select_ipv4) {
memcpy(&action_nvgre_encap_data->item_ipv6.hdr.src_addr,
&nvgre_encap_conf.ipv6_src,
@@ -3680,22 +3680,22 @@ parse_vc_action_l2_encap(struct context *ctx, const struct token *token,
};
header = action_encap_data->data;
if (l2_encap_conf.select_vlan)
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_VLAN);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
else if (l2_encap_conf.select_ipv4)
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
else
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_IPv6);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(eth.dst.addr_bytes,
- l2_encap_conf.eth_dst, ETHER_ADDR_LEN);
+ l2_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
memcpy(eth.src.addr_bytes,
- l2_encap_conf.eth_src, ETHER_ADDR_LEN);
+ l2_encap_conf.eth_src, RTE_ETHER_ADDR_LEN);
memcpy(header, &eth, sizeof(eth));
header += sizeof(eth);
if (l2_encap_conf.select_vlan) {
if (l2_encap_conf.select_ipv4)
- vlan.inner_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
else
- vlan.inner_type = rte_cpu_to_be_16(ETHER_TYPE_IPv6);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(header, &vlan, sizeof(vlan));
header += sizeof(vlan);
}
@@ -3744,7 +3744,7 @@ parse_vc_action_l2_decap(struct context *ctx, const struct token *token,
};
header = action_decap_data->data;
if (l2_decap_conf.select_vlan)
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_VLAN);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
memcpy(header, &eth, sizeof(eth));
header += sizeof(eth);
if (l2_decap_conf.select_vlan) {
@@ -3815,22 +3815,22 @@ parse_vc_action_mplsogre_encap(struct context *ctx, const struct token *token,
};
header = action_encap_data->data;
if (mplsogre_encap_conf.select_vlan)
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_VLAN);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
else if (mplsogre_encap_conf.select_ipv4)
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
else
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_IPv6);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(eth.dst.addr_bytes,
- mplsogre_encap_conf.eth_dst, ETHER_ADDR_LEN);
+ mplsogre_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
memcpy(eth.src.addr_bytes,
- mplsogre_encap_conf.eth_src, ETHER_ADDR_LEN);
+ mplsogre_encap_conf.eth_src, RTE_ETHER_ADDR_LEN);
memcpy(header, &eth, sizeof(eth));
header += sizeof(eth);
if (mplsogre_encap_conf.select_vlan) {
if (mplsogre_encap_conf.select_ipv4)
- vlan.inner_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
else
- vlan.inner_type = rte_cpu_to_be_16(ETHER_TYPE_IPv6);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(header, &vlan, sizeof(vlan));
header += sizeof(vlan);
}
@@ -3910,22 +3910,22 @@ parse_vc_action_mplsogre_decap(struct context *ctx, const struct token *token,
};
header = action_decap_data->data;
if (mplsogre_decap_conf.select_vlan)
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_VLAN);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
else if (mplsogre_encap_conf.select_ipv4)
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
else
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_IPv6);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(eth.dst.addr_bytes,
- mplsogre_encap_conf.eth_dst, ETHER_ADDR_LEN);
+ mplsogre_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
memcpy(eth.src.addr_bytes,
- mplsogre_encap_conf.eth_src, ETHER_ADDR_LEN);
+ mplsogre_encap_conf.eth_src, RTE_ETHER_ADDR_LEN);
memcpy(header, &eth, sizeof(eth));
header += sizeof(eth);
if (mplsogre_encap_conf.select_vlan) {
if (mplsogre_encap_conf.select_ipv4)
- vlan.inner_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
else
- vlan.inner_type = rte_cpu_to_be_16(ETHER_TYPE_IPv6);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(header, &vlan, sizeof(vlan));
header += sizeof(vlan);
}
@@ -4006,22 +4006,22 @@ parse_vc_action_mplsoudp_encap(struct context *ctx, const struct token *token,
};
header = action_encap_data->data;
if (mplsoudp_encap_conf.select_vlan)
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_VLAN);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
else if (mplsoudp_encap_conf.select_ipv4)
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
else
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_IPv6);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(eth.dst.addr_bytes,
- mplsoudp_encap_conf.eth_dst, ETHER_ADDR_LEN);
+ mplsoudp_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
memcpy(eth.src.addr_bytes,
- mplsoudp_encap_conf.eth_src, ETHER_ADDR_LEN);
+ mplsoudp_encap_conf.eth_src, RTE_ETHER_ADDR_LEN);
memcpy(header, &eth, sizeof(eth));
header += sizeof(eth);
if (mplsoudp_encap_conf.select_vlan) {
if (mplsoudp_encap_conf.select_ipv4)
- vlan.inner_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
else
- vlan.inner_type = rte_cpu_to_be_16(ETHER_TYPE_IPv6);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(header, &vlan, sizeof(vlan));
header += sizeof(vlan);
}
@@ -4103,22 +4103,22 @@ parse_vc_action_mplsoudp_decap(struct context *ctx, const struct token *token,
};
header = action_decap_data->data;
if (mplsoudp_decap_conf.select_vlan)
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_VLAN);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
else if (mplsoudp_encap_conf.select_ipv4)
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
else
- eth.type = rte_cpu_to_be_16(ETHER_TYPE_IPv6);
+ eth.type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(eth.dst.addr_bytes,
- mplsoudp_encap_conf.eth_dst, ETHER_ADDR_LEN);
+ mplsoudp_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
memcpy(eth.src.addr_bytes,
- mplsoudp_encap_conf.eth_src, ETHER_ADDR_LEN);
+ mplsoudp_encap_conf.eth_src, RTE_ETHER_ADDR_LEN);
memcpy(header, &eth, sizeof(eth));
header += sizeof(eth);
if (mplsoudp_encap_conf.select_vlan) {
if (mplsoudp_encap_conf.select_ipv4)
- vlan.inner_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
else
- vlan.inner_type = rte_cpu_to_be_16(ETHER_TYPE_IPv6);
+ vlan.inner_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv6);
memcpy(header, &vlan, sizeof(vlan));
header += sizeof(vlan);
}
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 7a67690..ab458c8 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -110,8 +110,8 @@ const struct rss_type_info rss_type_table[] = {
static void
print_ethaddr(const char *name, struct rte_ether_addr *eth_addr)
{
- char buf[ETHER_ADDR_FMT_SIZE];
- rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+ char buf[RTE_ETHER_ADDR_FMT_SIZE];
+ rte_ether_format_addr(buf, RTE_ETHER_ADDR_FMT_SIZE, eth_addr);
printf("%s%s", name, buf);
}
diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c
index 8de37c8..d1344b9 100644
--- a/app/test-pmd/csumonly.c
+++ b/app/test-pmd/csumonly.c
@@ -92,9 +92,9 @@ struct simple_gre_hdr {
static uint16_t
get_udptcp_checksum(void *l3_hdr, void *l4_hdr, uint16_t ethertype)
{
- if (ethertype == _htons(ETHER_TYPE_IPv4))
+ if (ethertype == _htons(RTE_ETHER_TYPE_IPv4))
return rte_ipv4_udptcp_cksum(l3_hdr, l4_hdr);
- else /* assume ethertype == ETHER_TYPE_IPv6 */
+ else /* assume ethertype == RTE_ETHER_TYPE_IPv6 */
return rte_ipv6_udptcp_cksum(l3_hdr, l4_hdr);
}
@@ -150,7 +150,7 @@ parse_ethernet(struct rte_ether_hdr *eth_hdr, struct testpmd_offload_info *info)
info->l2_len = sizeof(struct rte_ether_hdr);
info->ethertype = eth_hdr->ether_type;
- if (info->ethertype == _htons(ETHER_TYPE_VLAN)) {
+ if (info->ethertype == _htons(RTE_ETHER_TYPE_VLAN)) {
struct rte_vlan_hdr *vlan_hdr = (
struct rte_vlan_hdr *)(eth_hdr + 1);
@@ -159,11 +159,11 @@ parse_ethernet(struct rte_ether_hdr *eth_hdr, struct testpmd_offload_info *info)
}
switch (info->ethertype) {
- case _htons(ETHER_TYPE_IPv4):
+ case _htons(RTE_ETHER_TYPE_IPv4):
ipv4_hdr = (struct ipv4_hdr *) ((char *)eth_hdr + info->l2_len);
parse_ipv4(ipv4_hdr, info);
break;
- case _htons(ETHER_TYPE_IPv6):
+ case _htons(RTE_ETHER_TYPE_IPv6):
ipv6_hdr = (struct ipv6_hdr *) ((char *)eth_hdr + info->l2_len);
parse_ipv6(ipv6_hdr, info);
break;
@@ -201,7 +201,7 @@ parse_vxlan(struct udp_hdr *udp_hdr,
sizeof(struct rte_vxlan_hdr));
parse_ethernet(eth_hdr, info);
- info->l2_len += ETHER_VXLAN_HLEN; /* add udp + vxlan */
+ info->l2_len += RTE_ETHER_VXLAN_HLEN; /* add udp + vxlan */
}
/* Parse a vxlan-gpe header */
@@ -223,7 +223,7 @@ parse_vxlan_gpe(struct udp_hdr *udp_hdr,
sizeof(struct udp_hdr));
if (!vxlan_gpe_hdr->proto || vxlan_gpe_hdr->proto ==
- VXLAN_GPE_TYPE_IPV4) {
+ RTE_VXLAN_GPE_TYPE_IPV4) {
info->is_tunnel = 1;
info->outer_ethertype = info->ethertype;
info->outer_l2_len = info->l2_len;
@@ -234,10 +234,10 @@ parse_vxlan_gpe(struct udp_hdr *udp_hdr,
vxlan_gpe_len);
parse_ipv4(ipv4_hdr, info);
- info->ethertype = _htons(ETHER_TYPE_IPv4);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IPv4);
info->l2_len = 0;
- } else if (vxlan_gpe_hdr->proto == VXLAN_GPE_TYPE_IPV6) {
+ } else if (vxlan_gpe_hdr->proto == RTE_VXLAN_GPE_TYPE_IPV6) {
info->is_tunnel = 1;
info->outer_ethertype = info->ethertype;
info->outer_l2_len = info->l2_len;
@@ -247,11 +247,11 @@ parse_vxlan_gpe(struct udp_hdr *udp_hdr,
ipv6_hdr = (struct ipv6_hdr *)((char *)vxlan_gpe_hdr +
vxlan_gpe_len);
- info->ethertype = _htons(ETHER_TYPE_IPv6);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IPv6);
parse_ipv6(ipv6_hdr, info);
info->l2_len = 0;
- } else if (vxlan_gpe_hdr->proto == VXLAN_GPE_TYPE_ETH) {
+ } else if (vxlan_gpe_hdr->proto == RTE_VXLAN_GPE_TYPE_ETH) {
info->is_tunnel = 1;
info->outer_ethertype = info->ethertype;
info->outer_l2_len = info->l2_len;
@@ -265,7 +265,7 @@ parse_vxlan_gpe(struct udp_hdr *udp_hdr,
} else
return;
- info->l2_len += ETHER_VXLAN_GPE_HLEN;
+ info->l2_len += RTE_ETHER_VXLAN_GPE_HLEN;
}
/* Parse a gre header */
@@ -286,7 +286,7 @@ parse_gre(struct simple_gre_hdr *gre_hdr, struct testpmd_offload_info *info)
if (gre_hdr->flags & _htons(GRE_CHECKSUM_PRESENT))
gre_len += GRE_EXT_LEN;
- if (gre_hdr->proto == _htons(ETHER_TYPE_IPv4)) {
+ if (gre_hdr->proto == _htons(RTE_ETHER_TYPE_IPv4)) {
info->is_tunnel = 1;
info->outer_ethertype = info->ethertype;
info->outer_l2_len = info->l2_len;
@@ -296,10 +296,10 @@ parse_gre(struct simple_gre_hdr *gre_hdr, struct testpmd_offload_info *info)
ipv4_hdr = (struct ipv4_hdr *)((char *)gre_hdr + gre_len);
parse_ipv4(ipv4_hdr, info);
- info->ethertype = _htons(ETHER_TYPE_IPv4);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IPv4);
info->l2_len = 0;
- } else if (gre_hdr->proto == _htons(ETHER_TYPE_IPv6)) {
+ } else if (gre_hdr->proto == _htons(RTE_ETHER_TYPE_IPv6)) {
info->is_tunnel = 1;
info->outer_ethertype = info->ethertype;
info->outer_l2_len = info->l2_len;
@@ -308,11 +308,11 @@ parse_gre(struct simple_gre_hdr *gre_hdr, struct testpmd_offload_info *info)
ipv6_hdr = (struct ipv6_hdr *)((char *)gre_hdr + gre_len);
- info->ethertype = _htons(ETHER_TYPE_IPv6);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IPv6);
parse_ipv6(ipv6_hdr, info);
info->l2_len = 0;
- } else if (gre_hdr->proto == _htons(ETHER_TYPE_TEB)) {
+ } else if (gre_hdr->proto == _htons(RTE_ETHER_TYPE_TEB)) {
info->is_tunnel = 1;
info->outer_ethertype = info->ethertype;
info->outer_l2_len = info->l2_len;
@@ -349,10 +349,10 @@ parse_encap_ip(void *encap_ip, struct testpmd_offload_info *info)
if (ip_version == 4) {
parse_ipv4(ipv4_hdr, info);
- info->ethertype = _htons(ETHER_TYPE_IPv4);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IPv4);
} else {
parse_ipv6(ipv6_hdr, info);
- info->ethertype = _htons(ETHER_TYPE_IPv6);
+ info->ethertype = _htons(RTE_ETHER_TYPE_IPv6);
}
info->l2_len = 0;
}
@@ -384,7 +384,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
tso_segsz = info->tunnel_tso_segsz;
}
- if (info->ethertype == _htons(ETHER_TYPE_IPv4)) {
+ if (info->ethertype == _htons(RTE_ETHER_TYPE_IPv4)) {
ipv4_hdr = l3_hdr;
ipv4_hdr->hdr_checksum = 0;
@@ -398,7 +398,7 @@ process_inner_cksums(void *l3_hdr, const struct testpmd_offload_info *info,
ipv4_hdr->hdr_checksum =
rte_ipv4_cksum(ipv4_hdr);
}
- } else if (info->ethertype == _htons(ETHER_TYPE_IPv6))
+ } else if (info->ethertype == _htons(RTE_ETHER_TYPE_IPv6))
ol_flags |= PKT_TX_IPV6;
else
return 0; /* packet type not supported, nothing to do */
@@ -459,7 +459,7 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
struct udp_hdr *udp_hdr;
uint64_t ol_flags = 0;
- if (info->outer_ethertype == _htons(ETHER_TYPE_IPv4)) {
+ if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPv4)) {
ipv4_hdr->hdr_checksum = 0;
ol_flags |= PKT_TX_OUTER_IPV4;
@@ -495,7 +495,7 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info,
/* do not recalculate udp cksum if it was 0 */
if (udp_hdr->dgram_cksum != 0) {
udp_hdr->dgram_cksum = 0;
- if (info->outer_ethertype == _htons(ETHER_TYPE_IPv4))
+ if (info->outer_ethertype == _htons(RTE_ETHER_TYPE_IPv4))
udp_hdr->dgram_cksum =
rte_ipv4_udptcp_cksum(ipv4_hdr, udp_hdr);
else
diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index 3f29e94..ccc5dd8 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -173,7 +173,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
eth_hdr = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
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);
+ eth_hdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
/* Initialize IP header. */
ip_hdr = (struct ipv4_hdr *)(eth_hdr + 1);
diff --git a/app/test-pmd/icmpecho.c b/app/test-pmd/icmpecho.c
index f411792..c6c7cb6 100644
--- a/app/test-pmd/icmpecho.c
+++ b/app/test-pmd/icmpecho.c
@@ -223,9 +223,9 @@ ipv4_addr_to_dot(uint32_t be_ipv4_addr, char *buf)
static void
ether_addr_dump(const char *what, const struct rte_ether_addr *ea)
{
- char buf[ETHER_ADDR_FMT_SIZE];
+ char buf[RTE_ETHER_ADDR_FMT_SIZE];
- rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, ea);
+ rte_ether_format_addr(buf, RTE_ETHER_ADDR_FMT_SIZE, ea);
if (what)
printf("%s", what);
printf("%s", buf);
@@ -330,7 +330,7 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
ether_addr_dump(" ETH: src=", &eth_h->s_addr);
ether_addr_dump(" dst=", &eth_h->d_addr);
}
- if (eth_type == ETHER_TYPE_VLAN) {
+ if (eth_type == RTE_ETHER_TYPE_VLAN) {
vlan_h = (struct rte_vlan_hdr *)
((char *)eth_h + sizeof(struct rte_ether_hdr));
l2_len += sizeof(struct rte_vlan_hdr);
@@ -346,7 +346,7 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
}
/* Reply to ARP requests */
- if (eth_type == ETHER_TYPE_ARP) {
+ if (eth_type == RTE_ETHER_TYPE_ARP) {
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);
@@ -360,7 +360,7 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
}
if ((RTE_BE_TO_CPU_16(arp_h->arp_hardware) !=
RTE_ARP_HRD_ETHER) ||
- (arp_pro != ETHER_TYPE_IPv4) ||
+ (arp_pro != RTE_ETHER_TYPE_IPv4) ||
(arp_h->arp_hlen != 6) ||
(arp_h->arp_plen != 4)
) {
@@ -414,7 +414,7 @@ reply_to_icmp_echo_rqsts(struct fwd_stream *fs)
continue;
}
- if (eth_type != ETHER_TYPE_IPv4) {
+ if (eth_type != RTE_ETHER_TYPE_IPv4) {
rte_pktmbuf_free(pkt);
continue;
}
diff --git a/app/test-pmd/ieee1588fwd.c b/app/test-pmd/ieee1588fwd.c
index 2b7003b..e3b98e3 100644
--- a/app/test-pmd/ieee1588fwd.c
+++ b/app/test-pmd/ieee1588fwd.c
@@ -115,7 +115,7 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
eth_type = rte_be_to_cpu_16(eth_hdr->ether_type);
if (! (mb->ol_flags & PKT_RX_IEEE1588_PTP)) {
- if (eth_type == ETHER_TYPE_1588) {
+ if (eth_type == RTE_ETHER_TYPE_1588) {
printf("Port %u Received PTP packet not filtered"
" by hardware\n",
fs->rx_port);
@@ -128,7 +128,7 @@ ieee1588_packet_fwd(struct fwd_stream *fs)
rte_pktmbuf_free(mb);
return;
}
- if (eth_type != ETHER_TYPE_1588) {
+ if (eth_type != RTE_ETHER_TYPE_1588) {
printf("Port %u Received NON PTP packet incorrectly"
" detected by hardware\n",
fs->rx_port);
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 41eb3ff..245b610 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -879,15 +879,15 @@ launch_args_parse(int argc, char** argv)
}
if (!strcmp(lgopts[opt_idx].name, "max-pkt-len")) {
n = atoi(optarg);
- if (n >= ETHER_MIN_LEN) {
+ if (n >= RTE_ETHER_MIN_LEN) {
rx_mode.max_rx_pkt_len = (uint32_t) n;
- if (n > ETHER_MAX_LEN)
+ if (n > RTE_ETHER_MAX_LEN)
rx_offloads |=
DEV_RX_OFFLOAD_JUMBO_FRAME;
} else
rte_exit(EXIT_FAILURE,
"Invalid max-pkt-len=%d - should be > %d\n",
- n, ETHER_MIN_LEN);
+ n, RTE_ETHER_MIN_LEN);
}
if (!strcmp(lgopts[opt_idx].name, "pkt-filter-mode")) {
if (!strcmp(optarg, "signature"))
diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c
index 2c736ec..55e1b9d 100644
--- a/app/test-pmd/testpmd.c
+++ b/app/test-pmd/testpmd.c
@@ -413,7 +413,8 @@ lcoreid_t latencystats_lcore_id = -1;
* Ethernet device configuration.
*/
struct rte_eth_rxmode rx_mode = {
- .max_rx_pkt_len = ETHER_MAX_LEN, /**< Default maximum frame length. */
+ .max_rx_pkt_len = RTE_ETHER_MAX_LEN,
+ /**< Default maximum frame length. */
};
struct rte_eth_txmode tx_mode = {
@@ -526,7 +527,7 @@ static void dev_event_callback(const char *device_name,
static int all_ports_started(void);
struct gso_status gso_ports[RTE_MAX_ETHPORTS];
-uint16_t gso_max_segment_size = ETHER_MAX_LEN - ETHER_CRC_LEN;
+uint16_t gso_max_segment_size = RTE_ETHER_MAX_LEN - RTE_ETHER_CRC_LEN;
/*
* Helper function to check if socket is already discovered.
@@ -582,7 +583,7 @@ set_def_peer_eth_addrs(void)
portid_t i;
for (i = 0; i < RTE_MAX_ETHPORTS; i++) {
- peer_eth_addrs[i].addr_bytes[0] = ETHER_LOCAL_ADMIN_ADDR;
+ peer_eth_addrs[i].addr_bytes[0] = RTE_ETHER_LOCAL_ADMIN_ADDR;
peer_eth_addrs[i].addr_bytes[5] = i;
}
}
@@ -1223,8 +1224,8 @@ init_config(void)
fwd_lcores[lc_id]->gso_ctx.direct_pool = mbp;
fwd_lcores[lc_id]->gso_ctx.indirect_pool = mbp;
fwd_lcores[lc_id]->gso_ctx.gso_types = gso_types;
- fwd_lcores[lc_id]->gso_ctx.gso_size = ETHER_MAX_LEN -
- ETHER_CRC_LEN;
+ fwd_lcores[lc_id]->gso_ctx.gso_size = RTE_ETHER_MAX_LEN -
+ RTE_ETHER_CRC_LEN;
fwd_lcores[lc_id]->gso_ctx.flag = 0;
}
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index abee0a9..e3a6f7c 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -501,8 +501,8 @@ struct vxlan_encap_conf {
rte_be16_t vlan_tci;
uint8_t ip_tos;
uint8_t ip_ttl;
- uint8_t eth_src[ETHER_ADDR_LEN];
- uint8_t eth_dst[ETHER_ADDR_LEN];
+ uint8_t eth_src[RTE_ETHER_ADDR_LEN];
+ uint8_t eth_dst[RTE_ETHER_ADDR_LEN];
};
struct vxlan_encap_conf vxlan_encap_conf;
@@ -516,8 +516,8 @@ struct nvgre_encap_conf {
uint8_t ipv6_src[16];
uint8_t ipv6_dst[16];
rte_be16_t vlan_tci;
- uint8_t eth_src[ETHER_ADDR_LEN];
- uint8_t eth_dst[ETHER_ADDR_LEN];
+ uint8_t eth_src[RTE_ETHER_ADDR_LEN];
+ uint8_t eth_dst[RTE_ETHER_ADDR_LEN];
};
struct nvgre_encap_conf nvgre_encap_conf;
@@ -526,8 +526,8 @@ struct l2_encap_conf {
uint32_t select_ipv4:1;
uint32_t select_vlan:1;
rte_be16_t vlan_tci;
- uint8_t eth_src[ETHER_ADDR_LEN];
- uint8_t eth_dst[ETHER_ADDR_LEN];
+ uint8_t eth_src[RTE_ETHER_ADDR_LEN];
+ uint8_t eth_dst[RTE_ETHER_ADDR_LEN];
};
struct l2_encap_conf l2_encap_conf;
@@ -547,8 +547,8 @@ struct mplsogre_encap_conf {
uint8_t ipv6_src[16];
uint8_t ipv6_dst[16];
rte_be16_t vlan_tci;
- uint8_t eth_src[ETHER_ADDR_LEN];
- uint8_t eth_dst[ETHER_ADDR_LEN];
+ uint8_t eth_src[RTE_ETHER_ADDR_LEN];
+ uint8_t eth_dst[RTE_ETHER_ADDR_LEN];
};
struct mplsogre_encap_conf mplsogre_encap_conf;
@@ -571,8 +571,8 @@ struct mplsoudp_encap_conf {
uint8_t ipv6_src[16];
uint8_t ipv6_dst[16];
rte_be16_t vlan_tci;
- uint8_t eth_src[ETHER_ADDR_LEN];
- uint8_t eth_dst[ETHER_ADDR_LEN];
+ uint8_t eth_src[RTE_ETHER_ADDR_LEN];
+ uint8_t eth_dst[RTE_ETHER_ADDR_LEN];
};
struct mplsoudp_encap_conf mplsoudp_encap_conf;
diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index eb3a245..91fb1f6 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -268,7 +268,7 @@ pkt_burst_transmit(struct fwd_stream *fs)
*/
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);
+ eth_hdr.ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
if (rte_mempool_get_bulk(mbp, (void **)pkts_burst,
nb_pkt_per_burst) == 0) {
diff --git a/app/test-pmd/util.c b/app/test-pmd/util.c
index 55f3844..105c560 100644
--- a/app/test-pmd/util.c
+++ b/app/test-pmd/util.c
@@ -16,8 +16,8 @@
static inline void
print_ether_addr(const char *what, struct rte_ether_addr *eth_addr)
{
- char buf[ETHER_ADDR_FMT_SIZE];
- rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+ char buf[RTE_ETHER_ADDR_FMT_SIZE];
+ rte_ether_format_addr(buf, RTE_ETHER_ADDR_FMT_SIZE, eth_addr);
printf("%s%s", what, buf);
}
diff --git a/app/test/packet_burst_generator.c b/app/test/packet_burst_generator.c
index ba94e61..0999b87 100644
--- a/app/test/packet_burst_generator.c
+++ b/app/test/packet_burst_generator.c
@@ -65,7 +65,7 @@ initialize_eth_header(struct rte_ether_hdr *eth_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);
+ eth_hdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
vhdr->eth_proto = rte_cpu_to_be_16(ether_type);
vhdr->vlan_tci = van_id;
@@ -82,8 +82,8 @@ initialize_arp_header(struct rte_arp_hdr *arp_hdr,
uint32_t opcode)
{
arp_hdr->arp_hardware = rte_cpu_to_be_16(RTE_ARP_HRD_ETHER);
- arp_hdr->arp_protocol = rte_cpu_to_be_16(ETHER_TYPE_IPv4);
- arp_hdr->arp_hlen = ETHER_ADDR_LEN;
+ arp_hdr->arp_protocol = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
+ arp_hdr->arp_hlen = RTE_ETHER_ADDR_LEN;
arp_hdr->arp_plen = sizeof(uint32_t);
arp_hdr->arp_opcode = rte_cpu_to_be_16(opcode);
rte_ether_addr_copy(src_mac, &arp_hdr->arp_data.arp_sha);
@@ -322,10 +322,10 @@ nomore_mbuf:
pkt->l2_len = eth_hdr_size;
if (ipv4) {
- pkt->vlan_tci = ETHER_TYPE_IPv4;
+ pkt->vlan_tci = RTE_ETHER_TYPE_IPv4;
pkt->l3_len = sizeof(struct ipv4_hdr);
} else {
- pkt->vlan_tci = ETHER_TYPE_IPv6;
+ pkt->vlan_tci = RTE_ETHER_TYPE_IPv6;
pkt->l3_len = sizeof(struct ipv6_hdr);
}
@@ -437,10 +437,10 @@ nomore_mbuf:
pkt->l2_len = eth_hdr_size;
if (ipv4) {
- pkt->vlan_tci = ETHER_TYPE_IPv4;
+ pkt->vlan_tci = RTE_ETHER_TYPE_IPv4;
pkt->l3_len = sizeof(struct ipv4_hdr);
} else {
- pkt->vlan_tci = ETHER_TYPE_IPv6;
+ pkt->vlan_tci = RTE_ETHER_TYPE_IPv6;
pkt->l3_len = sizeof(struct ipv6_hdr);
}
diff --git a/app/test/test_cmdline_etheraddr.c b/app/test/test_cmdline_etheraddr.c
index 90943c2..9a32fd7 100644
--- a/app/test/test_cmdline_etheraddr.c
+++ b/app/test/test_cmdline_etheraddr.c
@@ -85,7 +85,7 @@ static int
is_addr_different(const struct rte_ether_addr addr, uint64_t num)
{
int i;
- for (i = 0; i < ETHER_ADDR_LEN; i++, num >>= 8)
+ for (i = 0; i < RTE_ETHER_ADDR_LEN; i++, num >>= 8)
if (addr.addr_bytes[i] != (num & 0xFF)) {
return 1;
}
diff --git a/app/test/test_flow_classify.c b/app/test/test_flow_classify.c
index f81bbba..3f06f30 100644
--- a/app/test/test_flow_classify.c
+++ b/app/test/test_flow_classify.c
@@ -504,7 +504,7 @@ init_ipv4_udp_traffic(struct rte_mempool *mp,
printf("Set up IPv4 UDP traffic\n");
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
- (struct rte_ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
+ (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPv4, 0, 0);
pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
printf("ETH pktlen %u\n", pktlen);
@@ -541,7 +541,7 @@ init_ipv4_tcp_traffic(struct rte_mempool *mp,
printf("Set up IPv4 TCP traffic\n");
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
- (struct rte_ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
+ (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPv4, 0, 0);
pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
printf("ETH pktlen %u\n", pktlen);
@@ -578,7 +578,7 @@ init_ipv4_sctp_traffic(struct rte_mempool *mp,
printf("Set up IPv4 SCTP traffic\n");
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
- (struct rte_ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
+ (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPv4, 0, 0);
pktlen = (uint16_t)(sizeof(struct rte_ether_hdr));
printf("ETH pktlen %u\n", pktlen);
diff --git a/app/test/test_link_bonding.c b/app/test/test_link_bonding.c
index 5a7f45f..eb6f1a9 100644
--- a/app/test/test_link_bonding.c
+++ b/app/test/test_link_bonding.c
@@ -136,7 +136,7 @@ static struct rte_eth_conf default_pmd_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_NONE,
.split_hdr_size = 0,
- .max_rx_pkt_len = ETHER_MAX_LEN,
+ .max_rx_pkt_len = RTE_ETHER_MAX_LEN,
},
.txmode = {
.mq_mode = ETH_MQ_TX_NONE,
@@ -237,7 +237,7 @@ test_setup(void)
for (i = 0; i < TEST_MAX_NUMBER_OF_PORTS; i++) {
char pmd_name[RTE_ETH_NAME_MAX_LEN];
- mac_addr->addr_bytes[ETHER_ADDR_LEN-1] = i;
+ mac_addr->addr_bytes[RTE_ETHER_ADDR_LEN-1] = i;
snprintf(pmd_name, RTE_ETH_NAME_MAX_LEN, "eth_virt_%d", i);
@@ -396,7 +396,7 @@ test_remove_slave_from_bonded_device(void)
mac_addr = (struct rte_ether_addr *)slave_mac;
- mac_addr->addr_bytes[ETHER_ADDR_LEN-1] =
+ mac_addr->addr_bytes[RTE_ETHER_ADDR_LEN-1] =
test_params->bonded_slave_count-1;
rte_eth_macaddr_get(
@@ -752,7 +752,7 @@ test_set_primary_slave(void)
test_params->bonded_port_id);
expected_mac_addr = (struct rte_ether_addr *)&slave_mac;
- expected_mac_addr->addr_bytes[ETHER_ADDR_LEN-1] = i;
+ expected_mac_addr->addr_bytes[RTE_ETHER_ADDR_LEN-1] = i;
/* Check primary slave MAC */
rte_eth_macaddr_get(test_params->slave_port_ids[i], &read_mac_addr);
@@ -902,7 +902,8 @@ test_set_bonded_port_initialization_mac_assignment(void)
for (i = 0; i < BONDED_INIT_MAC_ASSIGNMENT_SLAVE_COUNT; i++) {
char pmd_name[RTE_ETH_NAME_MAX_LEN];
- slave_mac_addr.addr_bytes[ETHER_ADDR_LEN-1] = i + 100;
+ slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN - 1] =
+ i + 100;
snprintf(pmd_name, RTE_ETH_NAME_MAX_LEN,
"eth_slave_%d", i);
@@ -942,8 +943,8 @@ test_set_bonded_port_initialization_mac_assignment(void)
/*
* 3. Set explicit MAC address on bonded ethdev
*/
- bonded_mac_addr.addr_bytes[ETHER_ADDR_LEN-2] = 0xFF;
- bonded_mac_addr.addr_bytes[ETHER_ADDR_LEN-1] = 0xAA;
+ bonded_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-2] = 0xFF;
+ bonded_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 0xAA;
TEST_ASSERT_SUCCESS(rte_eth_bond_mac_address_set(
bonded_port_id, &bonded_mac_addr),
@@ -974,13 +975,13 @@ test_set_bonded_port_initialization_mac_assignment(void)
sizeof(read_mac_addr)),
"slave port 0 mac address not as expected");
- slave_mac_addr.addr_bytes[ETHER_ADDR_LEN-1] = 1 + 100;
+ slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 1 + 100;
rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port 1 mac address not as expected");
- slave_mac_addr.addr_bytes[ETHER_ADDR_LEN-1] = 2 + 100;
+ slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 2 + 100;
rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
@@ -1005,13 +1006,13 @@ test_set_bonded_port_initialization_mac_assignment(void)
sizeof(read_mac_addr)),
"bonded port mac address not as expected");
- slave_mac_addr.addr_bytes[ETHER_ADDR_LEN-1] = 0 + 100;
+ slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 0 + 100;
rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port 0 mac address not as expected");
- slave_mac_addr.addr_bytes[ETHER_ADDR_LEN-1] = 1 + 100;
+ slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 1 + 100;
rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
@@ -1042,19 +1043,19 @@ test_set_bonded_port_initialization_mac_assignment(void)
"Number of slaves (%d) is great than expected (%d).",
slave_count, 0);
- slave_mac_addr.addr_bytes[ETHER_ADDR_LEN-1] = 0 + 100;
+ slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 0 + 100;
rte_eth_macaddr_get(slave_port_ids[0], &read_mac_addr);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port 0 mac address not as expected");
- slave_mac_addr.addr_bytes[ETHER_ADDR_LEN-1] = 1 + 100;
+ slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 1 + 100;
rte_eth_macaddr_get(slave_port_ids[1], &read_mac_addr);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
"slave port 1 mac address not as expected");
- slave_mac_addr.addr_bytes[ETHER_ADDR_LEN-1] = 2 + 100;
+ slave_mac_addr.addr_bytes[RTE_ETHER_ADDR_LEN-1] = 2 + 100;
rte_eth_macaddr_get(slave_port_ids[2], &read_mac_addr);
TEST_ASSERT_SUCCESS(memcmp(&slave_mac_addr, &read_mac_addr,
sizeof(read_mac_addr)),
@@ -1271,9 +1272,9 @@ generate_test_burst(struct rte_mbuf **pkts_burst, uint16_t burst_size,
void *ip_hdr;
if (ipv4)
- ether_type = ETHER_TYPE_IPv4;
+ ether_type = RTE_ETHER_TYPE_IPv4;
else
- ether_type = ETHER_TYPE_IPv6;
+ ether_type = RTE_ETHER_TYPE_IPv6;
if (toggle_dst_mac)
initialize_eth_header(test_params->pkt_eth_hdr,
@@ -1953,7 +1954,7 @@ test_roundrobin_verfiy_polling_slave_link_status_change(void)
for (i = 0; i < TEST_RR_POLLING_LINK_STATUS_SLAVE_COUNT; i++) {
/* Generate slave name / MAC address */
snprintf(slave_name, RTE_ETH_NAME_MAX_LEN, "eth_virt_poll_%d", i);
- mac_addr->addr_bytes[ETHER_ADDR_LEN-1] = i;
+ mac_addr->addr_bytes[RTE_ETHER_ADDR_LEN-1] = i;
/* Create slave devices with no ISR Support */
if (polling_test_slaves[i] == -1) {
@@ -2046,7 +2047,7 @@ test_activebackup_tx_burst(void)
initialize_eth_header(test_params->pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
(struct rte_ether_addr *)dst_mac_0,
- ETHER_TYPE_IPv4, 0, 0);
+ RTE_ETHER_TYPE_IPv4, 0, 0);
pktlen = initialize_udp_header(test_params->pkt_udp_hdr, src_port,
dst_port_0, 16);
pktlen = initialize_ipv4_header(test_params->pkt_ipv4_hdr, src_addr,
@@ -2583,7 +2584,7 @@ test_balance_l2_tx_burst(void)
initialize_eth_header(test_params->pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
(struct rte_ether_addr *)dst_mac_0,
- ETHER_TYPE_IPv4, 0, 0);
+ RTE_ETHER_TYPE_IPv4, 0, 0);
pktlen = initialize_udp_header(test_params->pkt_udp_hdr, src_port,
dst_port_0, 16);
pktlen = initialize_ipv4_header(test_params->pkt_ipv4_hdr, src_addr,
@@ -2599,7 +2600,7 @@ test_balance_l2_tx_burst(void)
initialize_eth_header(test_params->pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
(struct rte_ether_addr *)dst_mac_1,
- ETHER_TYPE_IPv4, 0, 0);
+ RTE_ETHER_TYPE_IPv4, 0, 0);
/* Generate a burst 2 of packets to transmit */
TEST_ASSERT_EQUAL(generate_packet_burst(test_params->mbuf_pool, &pkts_burst[1][0],
@@ -3425,7 +3426,7 @@ test_broadcast_tx_burst(void)
initialize_eth_header(test_params->pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
(struct rte_ether_addr *)dst_mac_0,
- ETHER_TYPE_IPv4, 0, 0);
+ RTE_ETHER_TYPE_IPv4, 0, 0);
pktlen = initialize_udp_header(test_params->pkt_udp_hdr, src_port,
dst_port_0, 16);
@@ -4011,12 +4012,12 @@ test_tlb_tx_burst(void)
initialize_eth_header(test_params->pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
(struct rte_ether_addr *)dst_mac_0,
- ETHER_TYPE_IPv4, 0, 0);
+ RTE_ETHER_TYPE_IPv4, 0, 0);
} else {
initialize_eth_header(test_params->pkt_eth_hdr,
(struct rte_ether_addr *)test_params->default_slave_mac,
(struct rte_ether_addr *)dst_mac_0,
- ETHER_TYPE_IPv4, 0, 0);
+ RTE_ETHER_TYPE_IPv4, 0, 0);
}
pktlen = initialize_udp_header(test_params->pkt_udp_hdr, src_port,
dst_port_0, 16);
@@ -4519,10 +4520,10 @@ test_alb_change_mac_in_reply_sent(void)
* them through the bonding port.
*/
pkt = rte_pktmbuf_alloc(test_params->mbuf_pool);
- memcpy(client_mac.addr_bytes, mac_client1, ETHER_ADDR_LEN);
+ memcpy(client_mac.addr_bytes, mac_client1, RTE_ETHER_ADDR_LEN);
eth_pkt = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
- initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
- 0);
+ initialize_eth_header(eth_pkt, &bond_mac, &client_mac,
+ RTE_ETHER_TYPE_ARP, 0, 0);
arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
sizeof(struct rte_ether_hdr));
initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client1,
@@ -4530,10 +4531,10 @@ test_alb_change_mac_in_reply_sent(void)
rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
pkt = rte_pktmbuf_alloc(test_params->mbuf_pool);
- memcpy(client_mac.addr_bytes, mac_client2, ETHER_ADDR_LEN);
+ memcpy(client_mac.addr_bytes, mac_client2, RTE_ETHER_ADDR_LEN);
eth_pkt = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
- initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
- 0);
+ initialize_eth_header(eth_pkt, &bond_mac, &client_mac,
+ RTE_ETHER_TYPE_ARP, 0, 0);
arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
sizeof(struct rte_ether_hdr));
initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client2,
@@ -4541,10 +4542,10 @@ test_alb_change_mac_in_reply_sent(void)
rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
pkt = rte_pktmbuf_alloc(test_params->mbuf_pool);
- memcpy(client_mac.addr_bytes, mac_client3, ETHER_ADDR_LEN);
+ memcpy(client_mac.addr_bytes, mac_client3, RTE_ETHER_ADDR_LEN);
eth_pkt = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
- initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
- 0);
+ initialize_eth_header(eth_pkt, &bond_mac, &client_mac,
+ RTE_ETHER_TYPE_ARP, 0, 0);
arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
sizeof(struct rte_ether_hdr));
initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client3,
@@ -4552,10 +4553,10 @@ test_alb_change_mac_in_reply_sent(void)
rte_eth_tx_burst(test_params->bonded_port_id, 0, &pkt, 1);
pkt = rte_pktmbuf_alloc(test_params->mbuf_pool);
- memcpy(client_mac.addr_bytes, mac_client4, ETHER_ADDR_LEN);
+ memcpy(client_mac.addr_bytes, mac_client4, RTE_ETHER_ADDR_LEN);
eth_pkt = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
- initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
- 0);
+ initialize_eth_header(eth_pkt, &bond_mac, &client_mac,
+ RTE_ETHER_TYPE_ARP, 0, 0);
arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
sizeof(struct rte_ether_hdr));
initialize_arp_header(arp_pkt, &bond_mac, &client_mac, ip_host, ip_client4,
@@ -4640,10 +4641,10 @@ test_alb_reply_from_client(void)
* them in the rx queue to be received by the bonding driver on rx_burst.
*/
pkt = rte_pktmbuf_alloc(test_params->mbuf_pool);
- memcpy(client_mac.addr_bytes, mac_client1, ETHER_ADDR_LEN);
+ memcpy(client_mac.addr_bytes, mac_client1, RTE_ETHER_ADDR_LEN);
eth_pkt = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
- initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
- 0);
+ initialize_eth_header(eth_pkt, &bond_mac, &client_mac,
+ RTE_ETHER_TYPE_ARP, 0, 0);
arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
sizeof(struct rte_ether_hdr));
initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client1, ip_host,
@@ -4652,10 +4653,10 @@ test_alb_reply_from_client(void)
1);
pkt = rte_pktmbuf_alloc(test_params->mbuf_pool);
- memcpy(client_mac.addr_bytes, mac_client2, ETHER_ADDR_LEN);
+ memcpy(client_mac.addr_bytes, mac_client2, RTE_ETHER_ADDR_LEN);
eth_pkt = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
- initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
- 0);
+ initialize_eth_header(eth_pkt, &bond_mac, &client_mac,
+ RTE_ETHER_TYPE_ARP, 0, 0);
arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
sizeof(struct rte_ether_hdr));
initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client2, ip_host,
@@ -4664,10 +4665,10 @@ test_alb_reply_from_client(void)
1);
pkt = rte_pktmbuf_alloc(test_params->mbuf_pool);
- memcpy(client_mac.addr_bytes, mac_client3, ETHER_ADDR_LEN);
+ memcpy(client_mac.addr_bytes, mac_client3, RTE_ETHER_ADDR_LEN);
eth_pkt = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
- initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
- 0);
+ initialize_eth_header(eth_pkt, &bond_mac, &client_mac,
+ RTE_ETHER_TYPE_ARP, 0, 0);
arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
sizeof(struct rte_ether_hdr));
initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client3, ip_host,
@@ -4676,10 +4677,10 @@ test_alb_reply_from_client(void)
1);
pkt = rte_pktmbuf_alloc(test_params->mbuf_pool);
- memcpy(client_mac.addr_bytes, mac_client4, ETHER_ADDR_LEN);
+ memcpy(client_mac.addr_bytes, mac_client4, RTE_ETHER_ADDR_LEN);
eth_pkt = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
- initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_ARP, 0,
- 0);
+ initialize_eth_header(eth_pkt, &bond_mac, &client_mac,
+ RTE_ETHER_TYPE_ARP, 0, 0);
arp_pkt = (struct rte_arp_hdr *)((char *)eth_pkt +
sizeof(struct rte_ether_hdr));
initialize_arp_header(arp_pkt, &client_mac, &bond_mac, ip_client4, ip_host,
@@ -4774,16 +4775,16 @@ test_alb_receive_vlan_reply(void)
* Generating packet with double VLAN header and placing it in the rx queue.
*/
pkt = rte_pktmbuf_alloc(test_params->mbuf_pool);
- memcpy(client_mac.addr_bytes, mac_client1, ETHER_ADDR_LEN);
+ memcpy(client_mac.addr_bytes, mac_client1, RTE_ETHER_ADDR_LEN);
eth_pkt = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
- initialize_eth_header(eth_pkt, &bond_mac, &client_mac, ETHER_TYPE_VLAN, 0,
- 0);
+ initialize_eth_header(eth_pkt, &bond_mac, &client_mac,
+ RTE_ETHER_TYPE_VLAN, 0, 0);
vlan_pkt = (struct rte_vlan_hdr *)((char *)(eth_pkt + 1));
vlan_pkt->vlan_tci = rte_cpu_to_be_16(1);
- vlan_pkt->eth_proto = rte_cpu_to_be_16(ETHER_TYPE_VLAN);
+ vlan_pkt->eth_proto = rte_cpu_to_be_16(RTE_ETHER_TYPE_VLAN);
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);
+ vlan_pkt->eth_proto = rte_cpu_to_be_16(RTE_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,
RTE_ARP_OP_REPLY);
@@ -4810,7 +4811,8 @@ test_alb_receive_vlan_reply(void)
retval = -1;
goto test_end;
}
- if (vlan_pkt->eth_proto != rte_cpu_to_be_16(ETHER_TYPE_VLAN)) {
+ if (vlan_pkt->eth_proto != rte_cpu_to_be_16(
+ RTE_ETHER_TYPE_VLAN)) {
retval = -1;
goto test_end;
}
@@ -4819,7 +4821,8 @@ test_alb_receive_vlan_reply(void)
retval = -1;
goto test_end;
}
- if (vlan_pkt->eth_proto != rte_cpu_to_be_16(ETHER_TYPE_ARP)) {
+ if (vlan_pkt->eth_proto != rte_cpu_to_be_16(
+ RTE_ETHER_TYPE_ARP)) {
retval = -1;
goto test_end;
}
diff --git a/app/test/test_link_bonding_mode4.c b/app/test/test_link_bonding_mode4.c
index 0bb81fd..96466a1 100644
--- a/app/test/test_link_bonding_mode4.c
+++ b/app/test/test_link_bonding_mode4.c
@@ -108,7 +108,7 @@ static struct link_bonding_unittest_params test_params = {
static struct rte_eth_conf default_pmd_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_NONE,
- .max_rx_pkt_len = ETHER_MAX_LEN,
+ .max_rx_pkt_len = RTE_ETHER_MAX_LEN,
.split_hdr_size = 0,
},
.txmode = {
@@ -233,7 +233,7 @@ add_slave(struct slave_conf *slave, uint8_t start)
RTE_VERIFY(slave->port_id != INVALID_PORT_ID);
rte_ether_addr_copy(&slave_mac_default, &addr);
- addr.addr_bytes[ETHER_ADDR_LEN - 1] = slave->port_id;
+ addr.addr_bytes[RTE_ETHER_ADDR_LEN - 1] = slave->port_id;
rte_eth_dev_mac_addr_remove(slave->port_id, &addr);
@@ -299,7 +299,7 @@ lacp_recv_cb(uint16_t slave_id, struct rte_mbuf *lacp_pkt)
RTE_VERIFY(lacp_pkt != NULL);
hdr = rte_pktmbuf_mtod(lacp_pkt, struct rte_ether_hdr *);
- RTE_VERIFY(hdr->ether_type == rte_cpu_to_be_16(ETHER_TYPE_SLOW));
+ RTE_VERIFY(hdr->ether_type == rte_cpu_to_be_16(RTE_ETHER_TYPE_SLOW));
slow_hdr = rte_pktmbuf_mtod(lacp_pkt, struct slow_protocol_frame *);
RTE_VERIFY(slow_hdr->slow_protocol.subtype == SLOW_SUBTYPE_LACP);
@@ -480,7 +480,7 @@ make_lacp_reply(struct slave_conf *slave, struct rte_mbuf *pkt)
/* look for LACP */
hdr = rte_pktmbuf_mtod(pkt, struct rte_ether_hdr *);
- if (hdr->ether_type != rte_cpu_to_be_16(ETHER_TYPE_SLOW))
+ if (hdr->ether_type != rte_cpu_to_be_16(RTE_ETHER_TYPE_SLOW))
return 1;
slow_hdr = rte_pktmbuf_mtod(pkt, struct slow_protocol_frame *);
@@ -492,7 +492,8 @@ make_lacp_reply(struct slave_conf *slave, struct rte_mbuf *pkt)
/* Change source address to partner address */
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;
+ slow_hdr->eth_hdr.s_addr.addr_bytes[RTE_ETHER_ADDR_LEN - 1] =
+ slave->port_id;
lacp = (struct lacpdu *) &slow_hdr->slow_protocol;
/* Save last received state */
@@ -930,11 +931,11 @@ test_mode4_rx(void)
FOR_EACH_SLAVE(i, slave) {
void *pkt = NULL;
- dst_mac.addr_bytes[ETHER_ADDR_LEN - 1] = slave->port_id;
+ dst_mac.addr_bytes[RTE_ETHER_ADDR_LEN - 1] = slave->port_id;
retval = generate_and_put_packets(slave, &src_mac, &dst_mac, 1);
TEST_ASSERT_SUCCESS(retval, "Failed to generate test packet burst.");
- src_mac.addr_bytes[ETHER_ADDR_LEN - 1] = slave->port_id;
+ src_mac.addr_bytes[RTE_ETHER_ADDR_LEN - 1] = slave->port_id;
retval = generate_and_put_packets(slave, &src_mac, &bonded_mac, 1);
TEST_ASSERT_SUCCESS(retval, "Failed to generate test packet burst.");
@@ -995,7 +996,7 @@ test_mode4_tx_burst(void)
/* Prepare burst */
for (pkts_cnt = 0; pkts_cnt < RTE_DIM(pkts); pkts_cnt++) {
- dst_mac.addr_bytes[ETHER_ADDR_LEN - 1] = pkts_cnt;
+ dst_mac.addr_bytes[RTE_ETHER_ADDR_LEN - 1] = pkts_cnt;
retval = generate_packets(&bonded_mac, &dst_mac, 1, &pkts[pkts_cnt]);
if (retval != 1)
@@ -1068,7 +1069,7 @@ test_mode4_tx_burst(void)
/* Prepare burst. */
for (pkts_cnt = 0; pkts_cnt < RTE_DIM(pkts); pkts_cnt++) {
- dst_mac.addr_bytes[ETHER_ADDR_LEN - 1] = pkts_cnt;
+ dst_mac.addr_bytes[RTE_ETHER_ADDR_LEN - 1] = pkts_cnt;
retval = generate_packets(&bonded_mac, &dst_mac, 1, &pkts[pkts_cnt]);
if (retval != 1)
@@ -1140,9 +1141,10 @@ init_marker(struct rte_mbuf *pkt, struct slave_conf *slave)
/* Init source address */
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.s_addr.addr_bytes[RTE_ETHER_ADDR_LEN - 1] =
+ slave->port_id;
- marker_hdr->eth_hdr.ether_type = rte_cpu_to_be_16(ETHER_TYPE_SLOW);
+ marker_hdr->eth_hdr.ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_SLOW);
marker_hdr->marker.subtype = SLOW_SUBTYPE_MARKER;
marker_hdr->marker.version_number = 1;
@@ -1168,7 +1170,7 @@ test_mode4_marker(void)
int retval;
uint16_t nb_pkts;
uint8_t i, j;
- const uint16_t ethtype_slow_be = rte_be_to_cpu_16(ETHER_TYPE_SLOW);
+ const uint16_t ethtype_slow_be = rte_be_to_cpu_16(RTE_ETHER_TYPE_SLOW);
retval = initialize_bonded_device_with_slaves(TEST_MARKER_SLAVE_COUT,
0);
@@ -1368,7 +1370,7 @@ test_mode4_ext_ctrl(void)
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);
+ RTE_ETHER_TYPE_SLOW, 0, 0);
for (i = 0; i < SLAVE_COUNT; i++) {
lacp_tx_buf[i] = rte_pktmbuf_alloc(test_params.mbuf_pool);
@@ -1422,7 +1424,7 @@ test_mode4_ext_lacp(void)
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);
+ RTE_ETHER_TYPE_SLOW, 0, 0);
for (i = 0; i < SLAVE_COUNT; i++) {
lacp_tx_buf[i] = rte_pktmbuf_alloc(test_params.mbuf_pool);
diff --git a/app/test/test_link_bonding_rssconf.c b/app/test/test_link_bonding_rssconf.c
index 4392522..65de3b9 100644
--- a/app/test/test_link_bonding_rssconf.c
+++ b/app/test/test_link_bonding_rssconf.c
@@ -81,7 +81,7 @@ static struct link_bonding_rssconf_unittest_params test_params = {
static struct rte_eth_conf default_pmd_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_NONE,
- .max_rx_pkt_len = ETHER_MAX_LEN,
+ .max_rx_pkt_len = RTE_ETHER_MAX_LEN,
.split_hdr_size = 0,
},
.txmode = {
@@ -93,7 +93,7 @@ static struct rte_eth_conf default_pmd_conf = {
static struct rte_eth_conf rss_pmd_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_RSS,
- .max_rx_pkt_len = ETHER_MAX_LEN,
+ .max_rx_pkt_len = RTE_ETHER_MAX_LEN,
.split_hdr_size = 0,
},
.txmode = {
diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c
index a0c3eb9..4b973ff 100644
--- a/app/test/test_pmd_perf.c
+++ b/app/test/test_pmd_perf.c
@@ -63,7 +63,7 @@ static struct rte_ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
static struct rte_eth_conf port_conf = {
.rxmode = {
.mq_mode = ETH_MQ_RX_NONE,
- .max_rx_pkt_len = ETHER_MAX_LEN,
+ .max_rx_pkt_len = RTE_ETHER_MAX_LEN,
.split_hdr_size = 0,
},
.txmode = {
@@ -173,8 +173,8 @@ check_all_ports_link_status(uint16_t port_num, uint32_t port_mask)
static void
print_ethaddr(const char *name, const struct rte_ether_addr *eth_addr)
{
- char buf[ETHER_ADDR_FMT_SIZE];
- rte_ether_format_addr(buf, ETHER_ADDR_FMT_SIZE, eth_addr);
+ char buf[RTE_ETHER_ADDR_FMT_SIZE];
+ rte_ether_format_addr(buf, RTE_ETHER_ADDR_FMT_SIZE, eth_addr);
printf("%s%s", name, buf);
}
@@ -192,7 +192,7 @@ init_traffic(struct rte_mempool *mp,
initialize_eth_header(&pkt_eth_hdr,
(struct rte_ether_addr *)src_mac,
- (struct rte_ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0);
+ (struct rte_ether_addr *)dst_mac, RTE_ETHER_TYPE_IPv4, 0, 0);
pktlen = initialize_ipv4_header(&pkt_ipv4_hdr,
IPV4_ADDR(10, 0, 0, 1),
diff --git a/app/test/test_sched.c b/app/test/test_sched.c
index a782bf3..a08e129 100644
--- a/app/test/test_sched.c
+++ b/app/test/test_sched.c
@@ -95,7 +95,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(ETHER_TYPE_IPv4);
+ eth_hdr->ether_type = rte_cpu_to_be_16(RTE_ETHER_TYPE_IPv4);
ip_hdr->dst_addr = IPv4(0,0,TC,QUEUE);
diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c
index 15ce644..55c2bdb 100644
--- a/app/test/virtual_pmd.c
+++ b/app/test/virtual_pmd.c
@@ -566,7 +566,7 @@ virtual_ethdev_create(const char *name, struct rte_ether_addr *mac_addr,
eth_dev->data->dev_link.link_speed = ETH_SPEED_NUM_10G;
eth_dev->data->dev_link.link_duplex = ETH_LINK_FULL_DUPLEX;
- eth_dev->data->mac_addrs = rte_zmalloc(name, ETHER_ADDR_LEN, 0);
+ eth_dev->data->mac_addrs = rte_zmalloc(name, RTE_ETHER_ADDR_LEN, 0);
if (eth_dev->data->mac_addrs == NULL)
goto err;