On Wed, Jun 1, 2016 at 5:14 PM, Bodireddy, Bhanuprakash < bhanuprakash.bodire...@intel.com> wrote:
> >-----Original Message----- > >From: Mauricio Vásquez [mailto:mauriciovasquezber...@gmail.com] > >Sent: Wednesday, June 1, 2016 3:37 PM > >To: Bodireddy, Bhanuprakash <bhanuprakash.bodire...@intel.com> > >Cc: ovs dev <dev@openvswitch.org> > >Subject: Re: --with-dpdk configure option issue > > > > > > > >On Wed, Jun 1, 2016 at 3:29 PM, Bodireddy, Bhanuprakash > ><bhanuprakash.bodire...@intel.com> wrote: > >>-----Original Message----- > >>From: Mauricio Vásquez [mailto:mauriciovasquezber...@gmail.com] > >>Sent: Wednesday, June 1, 2016 11:17 AM > >>To: ovs dev <dev@openvswitch.org> > >>Cc: Bodireddy, Bhanuprakash <bhanuprakash.bodire...@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 > > This looks fine, but for one minor issue when using ./configure > --without-dpdk option. > Below it says dpdk datapath is still enabled and errors out.. > > checking whether dpdk datapath is enabled... yes > checking for no/include/rte_config.h... no > checking for no/include/dpdk/rte_config.h... no > configure: error: Could not find DPDK libraries in no/lib > > You are right!, what about? diff --git a/acinclude.m4 b/acinclude.m4 index f3de855..a5080ef 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 || test "$with_dpdk" = no; then AC_MSG_RESULT([no]) DPDKLIB_FOUND=false else > I don’t think anyone would use '--without-dpdk' explicitly to avoid > building DPDK datapath with OVS. > > Regards, > Bhanu Prakash. > > > > >> > >>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, > > Regards, Mauricio V, _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev