[ovs-dev] --with-dpdk configure option issue

Mauricio Vásquez mauriciovasquezbernal at gmail.com
Wed Jun 1 14:37:24 UTC 2016


On Wed, Jun 1, 2016 at 3:29 PM, Bodireddy, Bhanuprakash <
bhanuprakash.bodireddy at intel.com> wrote:

> >-----Original Message-----
> >From: Mauricio Vásquez [mailto:mauriciovasquezbernal at gmail.com]
> >Sent: Wednesday, June 1, 2016 11:17 AM
> >To: ovs dev <dev at openvswitch.org>
> >Cc: Bodireddy, Bhanuprakash <bhanuprakash.bodireddy at intel.com>
> >Subject: --with-dpdk configure option issue
> >
> >Dear All,
> >I noticed that when I run the command
> >./configure --with-dpdk=$SOME_NON_EXISTING_ENV_VAR
> >it does not give me an error, somewhere it says:
> >"checking whether dpdk datapath is enabled... no" but there is not an
> explicit
> >error.
> >I think this behavior should be avoided, an explicit error should be
> printed to
> >avoid any possible confusion, as for example when DPDK_BUILD is not set.
>
> Thanks for reporting this issue.  This is treated more a misconfiguration
> than a bug. Please see below.
> The configure script was modified to handle auto discovery of DPDK library
> if present in standard search paths with ' ./configure --with-dpdk' option.
> It also handles other valid options as listed below in case (a),(b),(c),
> (e). All the below options will set string 'with_dpdk' in OVS_CHECK_DPDK
> function in acinclude.m4.
>
> (a)  ./configure --with-dpdk=$DPDK_BUILD                       [
> $with_dpdk will be a valid $DPDK_BUILD dir]
> (b)  ./configure --with-dpdk=$DPDK_BUILD/install         [ $with_dpdk will
> be a valid $DPDK_BUILD/install dir]
> (c)   ./configure --without-dpdk.
>     [$with_dpdk will be 'no']
> (d)  ./configure --with-dpdk=""
>     [$with_dpdk will be an empty string]
> (e)  ./configure
>                       [ $with_dpdk will be an empty string]
>
> In case (d), when empty string is passed to --with-dpdk option, it's not
> known if user has invoked case (d) or case (e).  Hence I throw dpdk
> datapath isn't enabled as part of configuration.
> i.e "checking whether dpdk datapath is enabled... no".
>

I had a look at the autotools documentation and I think there is a way to
distinguish between cases (d) and (e).

What do you think about something like this?

diff --git a/acinclude.m4 b/acinclude.m4
index f3de855..9314d82 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -161,10 +161,11 @@ dnl Configure DPDK source tree
 AC_DEFUN([OVS_CHECK_DPDK], [
   AC_ARG_WITH([dpdk],
               [AC_HELP_STRING([--with-dpdk=/path/to/dpdk],
-                              [Specify the DPDK build directory])])
+                              [Specify the DPDK build directory])],
+               [have_dpdk=true])

   AC_MSG_CHECKING([whether dpdk datapath is enabled])
-  if test -z "$with_dpdk" || test "$with_dpdk" = no; then
+  if test "$have_dpdk" != true; then
     AC_MSG_RESULT([no])
     DPDKLIB_FOUND=false
   else


> >
> >Bhanuprakash, I CC'ed you because you are author of 40b5ea86319f
> >("acinclude: Autodetect DPDK location when configuring OVS"), then I think
> >you know how  to fix it.
> >Mauricio V,
>



More information about the dev mailing list