* [dpdk-dev] [PATCH] rte_eth_ctrl: rename rte_eth_fdir_flow.ip6_flow @ 2014-12-09 17:32 Mark Kavanagh 2014-12-09 17:32 ` Mark Kavanagh 0 siblings, 1 reply; 4+ messages in thread From: Mark Kavanagh @ 2014-12-09 17:32 UTC (permalink / raw) To: dev Hi, This patch resolves a compilation issue that arises when DPDK1.8-rc3 is linked with OVS on Fedora 20, kernel v3.16.4-200. Specifically, the name of 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. Regards, Mark Mark Kavanagh (1): rte_eth_ctrl: rename rte_eth_fdir_flow.ip6_flow app/test-pmd/cmdline.c | 4 ++-- lib/librte_ether/rte_eth_ctrl.h | 2 +- lib/librte_pmd_i40e/i40e_fdir.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) -- 1.9.3 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [dpdk-dev] [PATCH] rte_eth_ctrl: rename rte_eth_fdir_flow.ip6_flow 2014-12-09 17:32 [dpdk-dev] [PATCH] rte_eth_ctrl: rename rte_eth_fdir_flow.ip6_flow Mark Kavanagh @ 2014-12-09 17:32 ` Mark Kavanagh 2014-12-09 18:45 ` Neil Horman 0 siblings, 1 reply; 4+ messages in thread From: Mark Kavanagh @ 2014-12-09 17:32 UTC (permalink / raw) To: dev 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 <mark.b.kavanagh@intel.com> --- app/test-pmd/cmdline.c | 4 ++-- lib/librte_ether/rte_eth_ctrl.h | 2 +- lib/librte_pmd_i40e/i40e_fdir.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index f79ea3e..882a5a2 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 7088d8d..5d9c387 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 ad38803..68511c8 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; -- 1.9.3 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] rte_eth_ctrl: rename rte_eth_fdir_flow.ip6_flow 2014-12-09 17:32 ` Mark Kavanagh @ 2014-12-09 18:45 ` Neil Horman 2014-12-11 0:57 ` Thomas Monjalon 0 siblings, 1 reply; 4+ messages in thread From: Neil Horman @ 2014-12-09 18:45 UTC (permalink / raw) To: Mark Kavanagh; +Cc: dev On Tue, Dec 09, 2014 at 05:32:08PM +0000, Mark Kavanagh wrote: > 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 <mark.b.kavanagh@intel.com> > --- > app/test-pmd/cmdline.c | 4 ++-- > lib/librte_ether/rte_eth_ctrl.h | 2 +- > lib/librte_pmd_i40e/i40e_fdir.c | 4 ++-- > 3 files changed, 5 insertions(+), 5 deletions(-) > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > index f79ea3e..882a5a2 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 7088d8d..5d9c387 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 ad38803..68511c8 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; > -- > 1.9.3 > > Acked-by: Neil Horman <nhorman@tuxdriver.com> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] rte_eth_ctrl: rename rte_eth_fdir_flow.ip6_flow 2014-12-09 18:45 ` Neil Horman @ 2014-12-11 0:57 ` Thomas Monjalon 0 siblings, 0 replies; 4+ messages in thread From: Thomas Monjalon @ 2014-12-11 0:57 UTC (permalink / raw) To: Mark Kavanagh; +Cc: dev > > 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 <mark.b.kavanagh@intel.com> > > Acked-by: Neil Horman <nhorman@tuxdriver.com> Applied Thanks -- Thomas ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-12-11 0:58 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-12-09 17:32 [dpdk-dev] [PATCH] rte_eth_ctrl: rename rte_eth_fdir_flow.ip6_flow Mark Kavanagh 2014-12-09 17:32 ` Mark Kavanagh 2014-12-09 18:45 ` Neil Horman 2014-12-11 0:57 ` Thomas Monjalon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).