[ovs-dev] [PATCH] acinclude: Autodetect DPDK location when configuring OVS

Bodireddy, Bhanuprakash bhanuprakash.bodireddy at intel.com
Sun Mar 20 20:38:53 UTC 2016


Hello Panu,

Thanks for the comments.  I have  follow up question on the auto discovery of DPDK install location. 
As the  DPDK install location can vary with distros, do OVS configure script has to search for DPDK libraries in /usr/local/share as a starting point and proceed to /usr/share location (or) search only in /usr/local/share and throw up an error in case of missing libraries? 

I shall send out the updated patch based on your feedback.

Regards,
Bhanu Prakash.

-----Original Message-----
From: Panu Matilainen [mailto:pmatilai at redhat.com] 
Sent: Friday, March 18, 2016 11:23 AM
To: Bodireddy, Bhanuprakash <bhanuprakash.bodireddy at intel.com>; dev at openvswitch.org
Subject: Re: [ovs-dev] [PATCH] acinclude: Autodetect DPDK location when configuring OVS

On 03/18/2016 01:11 PM, Bhanuprakash Bodireddy wrote:
> When using DPDK datapath, the OVS configure script requires the DPDK 
> build directory passed on --with-dpdk. This can be avoided if the DPDK 
> is installed in standard location i.e /usr/src.
>
> This patch fixes the problem by searching for DPDK libraries in 
> standard location and configures OVS sources for dpdk datapath.
>
> Signed-off-by: Bhanuprakash Bodireddy 
> <bhanuprakash.bodireddy at intel.com>
> ---
>   acinclude.m4 |   36 ++++++++++++++++++++++++++++++++++--
>   1 files changed, 34 insertions(+), 2 deletions(-)
>
> diff --git a/acinclude.m4 b/acinclude.m4 index 74f0494..c1036e4 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -163,9 +163,41 @@ AC_DEFUN([OVS_CHECK_DPDK], [
>                 [AC_HELP_STRING([--with-dpdk=/path/to/dpdk],
>                                 [Specify the DPDK build directory])])
>
> -  if test X"$with_dpdk" != X; then
> -    RTE_SDK=$with_dpdk
> +  RTE_SDK=""
> +  AC_MSG_CHECKING([whether dpdk datapath is enabled])  case 
> + "$with_dpdk" in
> +    yes)
> +      AC_MSG_RESULT([$with_dpdk])
> +      DEFAULT_RTE_SDK="/usr/src/dpdk*"
> +      DEFAULT_RTE_TARGET="x86_64-native-linuxapp-gcc"
> +      dpdk_build=`find $DEFAULT_RTE_SDK -name $DEFAULT_RTE_TARGET 2>/dev/null | head -1`
> +      if test -d "$dpdk_build"; then
> +        AC_CHECK_FILE("$dpdk_build/lib/libdpdk.a", dpdk_lib=1, [AC_CHECK_FILE("$dpdk_build/lib/libdpdk.so", dpdk_lib=1, dpdk_lib=0)])
> +        if test "$dpdk_lib" = 1; then
> +          RTE_SDK="$dpdk_build"
> +        fi
> +      else
> +        AC_MSG_ERROR([Unable to find dpdk in /usr/src, if installed in a non-standard location specify the target location using '--with-dpdk' option])
> +      fi

Um, /usr/src is in no way a standard location for dpdk. "make install" 
in dpdk >= 2.2.0 installs the sdk environment to <prefix>/share/dpdk/<target> where <prefix> by upstream default is /usr/local. Distros are likely to use /usr as the prfix.

I'd suggest using the dpdk upstream installation layout as a starting point for automatic discovery.

	- Panu -


--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.


More information about the dev mailing list