Re: [ovs-dev] [PATCH v2] netdev-dpdk: fix ARM cross compilation failure

2017-04-14 Thread Ben Pfaff
On Tue, Mar 21, 2017 at 02:56:36PM +0800, Jianbo Liu wrote:
> The 03/21/2017 06:43, Hemant Agrawal wrote:
> >
> >
> > > -Original Message-
> > > From: Jianbo Liu [mailto:jianbo@arm.com]
> > > Sent: Tuesday, March 21, 2017 10:55 AM
> > > To: Hemant Agrawal <hemant.agra...@nxp.com>
> > > Cc: b...@ovn.org; d...@openvswitch.org
> > > Subject: Re: [ovs-dev] [PATCH v2] netdev-dpdk: fix ARM cross compilation
> > > failure
> > >
> > > The 03/20/2017 16:43, Hemant Agrawal wrote:
> > > > configure with_dpdk and cross compile fails with:
> > > > "configure: error: cannot check for file existence when cross
> > > > compiling"
> > > >
> > > > This is due to the usages of AC_CHECK_FILES.
> > > >
> > > > AC_CHECK_FILES only works when not cross compiling. It test a feature
> > > > of the host machine, and therefore, die when cross-compiling.
> > > >
> > > > The current patch put the check in condition, i.e. check only if not
> > > > cross-compiling.
> > >
> > > There are many defines in rte_config.h, which are important for compiling,
> > > whether it is cross compiling or not. So I disagree to remove the 
> > > checking.
> >
> >  [Hemant] can you suggest an alternate to make it work?
> 
> Copy, or execute "make config T=your_config_file" to create rte_config.h
> in your dpdk source directory.

I think that this thread reflects a misunderstanding.  I posted a patch
that matches my own understanding of the problem:
https://mail.openvswitch.org/pipermail/ovs-dev/2017-April/330941.html
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2] netdev-dpdk: fix ARM cross compilation failure

2017-03-21 Thread Jianbo Liu
The 03/21/2017 06:43, Hemant Agrawal wrote:
>
>
> > -Original Message-
> > From: Jianbo Liu [mailto:jianbo@arm.com]
> > Sent: Tuesday, March 21, 2017 10:55 AM
> > To: Hemant Agrawal <hemant.agra...@nxp.com>
> > Cc: b...@ovn.org; d...@openvswitch.org
> > Subject: Re: [ovs-dev] [PATCH v2] netdev-dpdk: fix ARM cross compilation
> > failure
> >
> > The 03/20/2017 16:43, Hemant Agrawal wrote:
> > > configure with_dpdk and cross compile fails with:
> > > "configure: error: cannot check for file existence when cross
> > > compiling"
> > >
> > > This is due to the usages of AC_CHECK_FILES.
> > >
> > > AC_CHECK_FILES only works when not cross compiling. It test a feature
> > > of the host machine, and therefore, die when cross-compiling.
> > >
> > > The current patch put the check in condition, i.e. check only if not
> > > cross-compiling.
> >
> > There are many defines in rte_config.h, which are important for compiling,
> > whether it is cross compiling or not. So I disagree to remove the checking.
>
>  [Hemant] can you suggest an alternate to make it work?

Copy, or execute "make config T=your_config_file" to create rte_config.h
in your dpdk source directory.

>
>
> > >
> > > This patch has been tested on ARM64 platform with DPDK
> > >
> > > Signed-off-by: Hemant Agrawal <hemant.agra...@nxp.com>
> > > ---
> > > v2:
> > > * correct the patch header
> > >
> > >  acinclude.m4 | 6 +-
> > >  1 file changed, 5 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/acinclude.m4 b/acinclude.m4 index 744d8f8..a9ba99c 100644
> > > --- a/acinclude.m4
> > > +++ b/acinclude.m4
> > > @@ -180,9 +180,13 @@ AC_DEFUN([OVS_CHECK_DPDK], [
> > >  DPDK_INCLUDE="$with_dpdk/include"
> > >  # If 'with_dpdk' is passed install directory, point to headers
> > >  # installed in $DESTDIR/$prefix/include/dpdk
> > > -AC_CHECK_FILE([$DPDK_INCLUDE/rte_config.h], [],
> > > + # AC_CHECK_FILES only works when not cross compiling
> > > + if test "$cross_compiling" != "yes"
> > > + then
> > > +AC_CHECK_FILE([$DPDK_INCLUDE/rte_config.h], [],
> > >[AC_CHECK_FILE([$DPDK_INCLUDE/dpdk/rte_config.h],
> > >
> > > [DPDK_INCLUDE=$DPDK_INCLUDE/dpdk], [])])
> > > + fi
> > >  DPDK_LIB_DIR="$with_dpdk/lib"
> > >  ;;
> > >  esac
> > > --
> > > 1.9.1
> > >
> > > ___
> > > dev mailing list
> > > d...@openvswitch.org
> > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
> > --
> > IMPORTANT NOTICE: The contents of this email and any attachments are
> > confidential and may also be privileged. If you are not the intended 
> > recipient,
> > please notify the sender immediately and do not disclose the contents to any
> > other person, use it for any purpose, or store or copy the information in 
> > any
> > medium. Thank you.

--
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2] netdev-dpdk: fix ARM cross compilation failure

2017-03-21 Thread Hemant Agrawal


> -Original Message-
> From: Jianbo Liu [mailto:jianbo@arm.com]
> Sent: Tuesday, March 21, 2017 10:55 AM
> To: Hemant Agrawal <hemant.agra...@nxp.com>
> Cc: b...@ovn.org; d...@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH v2] netdev-dpdk: fix ARM cross compilation
> failure
> 
> The 03/20/2017 16:43, Hemant Agrawal wrote:
> > configure with_dpdk and cross compile fails with:
> > "configure: error: cannot check for file existence when cross
> > compiling"
> >
> > This is due to the usages of AC_CHECK_FILES.
> >
> > AC_CHECK_FILES only works when not cross compiling. It test a feature
> > of the host machine, and therefore, die when cross-compiling.
> >
> > The current patch put the check in condition, i.e. check only if not
> > cross-compiling.
> 
> There are many defines in rte_config.h, which are important for compiling,
> whether it is cross compiling or not. So I disagree to remove the checking.

 [Hemant] can you suggest an alternate to make it work? 

 
> >
> > This patch has been tested on ARM64 platform with DPDK
> >
> > Signed-off-by: Hemant Agrawal <hemant.agra...@nxp.com>
> > ---
> > v2:
> > * correct the patch header
> >
> >  acinclude.m4 | 6 +-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/acinclude.m4 b/acinclude.m4 index 744d8f8..a9ba99c 100644
> > --- a/acinclude.m4
> > +++ b/acinclude.m4
> > @@ -180,9 +180,13 @@ AC_DEFUN([OVS_CHECK_DPDK], [
> >  DPDK_INCLUDE="$with_dpdk/include"
> >  # If 'with_dpdk' is passed install directory, point to headers
> >  # installed in $DESTDIR/$prefix/include/dpdk
> > -AC_CHECK_FILE([$DPDK_INCLUDE/rte_config.h], [],
> > + # AC_CHECK_FILES only works when not cross compiling
> > + if test "$cross_compiling" != "yes"
> > + then
> > +AC_CHECK_FILE([$DPDK_INCLUDE/rte_config.h], [],
> >[AC_CHECK_FILE([$DPDK_INCLUDE/dpdk/rte_config.h],
> >
> > [DPDK_INCLUDE=$DPDK_INCLUDE/dpdk], [])])
> > + fi
> >  DPDK_LIB_DIR="$with_dpdk/lib"
> >  ;;
> >  esac
> > --
> > 1.9.1
> >
> > ___
> > dev mailing list
> > d...@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> 
> --
> IMPORTANT NOTICE: The contents of this email and any attachments are
> confidential and may also be privileged. If you are not the intended 
> recipient,
> please notify the sender immediately and do not disclose the contents to any
> other person, use it for any purpose, or store or copy the information in any
> medium. Thank you.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


Re: [ovs-dev] [PATCH v2] netdev-dpdk: fix ARM cross compilation failure

2017-03-20 Thread Jianbo Liu
The 03/20/2017 16:43, Hemant Agrawal wrote:
> configure with_dpdk and cross compile fails with:
> "configure: error: cannot check for file existence
> when cross compiling"
>
> This is due to the usages of AC_CHECK_FILES.
>
> AC_CHECK_FILES only works when not cross compiling. It test
> a feature of the host machine, and therefore, die when
> cross-compiling.
>
> The current patch put the check in condition, i.e. check only
> if not cross-compiling.

There are many defines in rte_config.h, which are important for compiling,
whether it is cross compiling or not. So I disagree to remove the checking.

>
> This patch has been tested on ARM64 platform with DPDK
>
> Signed-off-by: Hemant Agrawal 
> ---
> v2:
> * correct the patch header
>
>  acinclude.m4 | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/acinclude.m4 b/acinclude.m4
> index 744d8f8..a9ba99c 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -180,9 +180,13 @@ AC_DEFUN([OVS_CHECK_DPDK], [
>  DPDK_INCLUDE="$with_dpdk/include"
>  # If 'with_dpdk' is passed install directory, point to headers
>  # installed in $DESTDIR/$prefix/include/dpdk
> -AC_CHECK_FILE([$DPDK_INCLUDE/rte_config.h], [],
> + # AC_CHECK_FILES only works when not cross compiling
> + if test "$cross_compiling" != "yes"
> + then
> +AC_CHECK_FILE([$DPDK_INCLUDE/rte_config.h], [],
>[AC_CHECK_FILE([$DPDK_INCLUDE/dpdk/rte_config.h],
>   [DPDK_INCLUDE=$DPDK_INCLUDE/dpdk], [])])
> + fi
>  DPDK_LIB_DIR="$with_dpdk/lib"
>  ;;
>  esac
> --
> 1.9.1
>
> ___
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

--
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH v2] netdev-dpdk: fix ARM cross compilation failure

2017-03-20 Thread Hemant Agrawal
configure with_dpdk and cross compile fails with:
"configure: error: cannot check for file existence
when cross compiling"

This is due to the usages of AC_CHECK_FILES.

AC_CHECK_FILES only works when not cross compiling. It test
a feature of the host machine, and therefore, die when
cross-compiling.

The current patch put the check in condition, i.e. check only
if not cross-compiling.

This patch has been tested on ARM64 platform with DPDK

Signed-off-by: Hemant Agrawal 
---
v2:
* correct the patch header

 acinclude.m4 | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 744d8f8..a9ba99c 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -180,9 +180,13 @@ AC_DEFUN([OVS_CHECK_DPDK], [
 DPDK_INCLUDE="$with_dpdk/include"
 # If 'with_dpdk' is passed install directory, point to headers
 # installed in $DESTDIR/$prefix/include/dpdk
-AC_CHECK_FILE([$DPDK_INCLUDE/rte_config.h], [],
+   # AC_CHECK_FILES only works when not cross compiling
+   if test "$cross_compiling" != "yes"
+   then
+AC_CHECK_FILE([$DPDK_INCLUDE/rte_config.h], [],
   [AC_CHECK_FILE([$DPDK_INCLUDE/dpdk/rte_config.h],
  [DPDK_INCLUDE=$DPDK_INCLUDE/dpdk], [])])
+   fi
 DPDK_LIB_DIR="$with_dpdk/lib"
 ;;
 esac
-- 
1.9.1

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev