From: Mark Kavanagh Date: Tue, 9 Dec 2014 17:32:08 +0000 (+0000) Subject: ethdev: fix build with libc ip6 header X-Git-Tag: spdx-start~9960 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=18f59001982558896303e59bcd721014f02fbd71;p=dpdk.git ethdev: fix build with libc ip6 header The name of the rte_eth_fdir_flow's rte_eth_ipv6_flow attribute, 'ip6_flow', clashes with a macro defined in /usr/include/netinet/ip6.h, such that when DPDK is linked with an application that uses the afforementioned header, the macro is expanded within the DPDK struct, causing a compilation error. Rename the relevant attribute in DPDK to resolve this. Signed-off-by: Mark Kavanagh Acked-by: Neil Horman --- diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index f79ea3e624..882a5a288f 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -8261,9 +8261,9 @@ cmd_flow_director_filter_parsed(void *parsed_result, case RTE_ETH_FLOW_TYPE_UDPV6: case RTE_ETH_FLOW_TYPE_TCPV6: IPV6_ADDR_TO_ARRAY(res->ip_dst, - entry.input.flow.ip6_flow.dst_ip); + entry.input.flow.ipv6_flow.dst_ip); IPV6_ADDR_TO_ARRAY(res->ip_src, - entry.input.flow.ip6_flow.src_ip); + entry.input.flow.ipv6_flow.src_ip); /* need convert to big endian. */ entry.input.flow.udp6_flow.dst_port = rte_cpu_to_be_16(res->port_dst); diff --git a/lib/librte_ether/rte_eth_ctrl.h b/lib/librte_ether/rte_eth_ctrl.h index 7088d8dc08..5d9c3873ba 100644 --- a/lib/librte_ether/rte_eth_ctrl.h +++ b/lib/librte_ether/rte_eth_ctrl.h @@ -275,7 +275,7 @@ union rte_eth_fdir_flow { struct rte_eth_udpv6_flow udp6_flow; struct rte_eth_tcpv6_flow tcp6_flow; struct rte_eth_sctpv6_flow sctp6_flow; - struct rte_eth_ipv6_flow ip6_flow; + struct rte_eth_ipv6_flow ipv6_flow; }; /** diff --git a/lib/librte_pmd_i40e/i40e_fdir.c b/lib/librte_pmd_i40e/i40e_fdir.c index ad38803285..68511c8c94 100644 --- a/lib/librte_pmd_i40e/i40e_fdir.c +++ b/lib/librte_pmd_i40e/i40e_fdir.c @@ -749,10 +749,10 @@ i40e_fdir_fill_eth_ip_head(const struct rte_eth_fdir_input *fdir_input, * to the expected received packets. */ rte_memcpy(&(ip6->src_addr), - &(fdir_input->flow.ip6_flow.dst_ip), + &(fdir_input->flow.ipv6_flow.dst_ip), IPV6_ADDR_LEN); rte_memcpy(&(ip6->dst_addr), - &(fdir_input->flow.ip6_flow.src_ip), + &(fdir_input->flow.ipv6_flow.src_ip), IPV6_ADDR_LEN); ip6->proto = next_proto[fdir_input->flow_type]; break;