[dpdk-dev] examples/ip_pipeline: fix freebsd build error

Message ID 20180409120632.38567-1-jasvinder.singh@intel.com (mailing list archive)
State Superseded, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Jasvinder Singh April 9, 2018, 12:06 p.m. UTC
  IP_Pipeline app is not supported in FreeBSD environment. Therefore,
skip it while building the sample apps on FreeBSD.

Fixes: 4bbf8e30aa5e ("examples/ip_pipeline: add CLI interface")
Fixes: 2f74ae28e23f ("examples/ip_pipeline: add tap object")

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
 examples/ip_pipeline/Makefile | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Cristian Dumitrescu April 9, 2018, 12:58 p.m. UTC | #1
> -----Original Message-----
> From: Singh, Jasvinder
> Sent: Monday, April 9, 2018 1:07 PM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Subject: [PATCH] examples/ip_pipeline: fix freebsd build error
> 
> IP_Pipeline app is not supported in FreeBSD environment. Therefore,
> skip it while building the sample apps on FreeBSD.
> 
> Fixes: 4bbf8e30aa5e ("examples/ip_pipeline: add CLI interface")
> Fixes: 2f74ae28e23f ("examples/ip_pipeline: add tap object")
> 
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> ---
>  examples/ip_pipeline/Makefile | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile
> index c936d1e..6ff2abf 100644
> --- a/examples/ip_pipeline/Makefile
> +++ b/examples/ip_pipeline/Makefile
> @@ -67,6 +67,11 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
> 
>  include $(RTE_SDK)/mk/rte.vars.mk
> 
> +ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
> +$(error This application can only operate in a linuxapp environment, \
> +please change the definition of the RTE_TARGET environment variable)
> +endif
> +
>  INC += $(sort $(wildcard *.h))
> 
>  SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) := $(SRCS-y)
> --
> 2.9.3

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
  
Thomas Monjalon April 9, 2018, 10:34 p.m. UTC | #2
09/04/2018 14:06, Jasvinder Singh:
> IP_Pipeline app is not supported in FreeBSD environment. Therefore,
> skip it while building the sample apps on FreeBSD.
> 
> Fixes: 4bbf8e30aa5e ("examples/ip_pipeline: add CLI interface")
> Fixes: 2f74ae28e23f ("examples/ip_pipeline: add tap object")
> 
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> ---
> --- a/examples/ip_pipeline/Makefile
> +++ b/examples/ip_pipeline/Makefile
> +ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
> +$(error This application can only operate in a linuxapp environment, \
> +please change the definition of the RTE_TARGET environment variable)
> +endif

It is not skipping the example, just throwing an error (which is needed).

You should add a test in examples/Makefile to really skip it.
  
Jasvinder Singh April 10, 2018, 9:53 a.m. UTC | #3
> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Monday, April 9, 2018 11:34 PM
> To: Singh, Jasvinder <jasvinder.singh@intel.com>
> Cc: dev@dpdk.org; Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] examples/ip_pipeline: fix freebsd build error
> 
> 09/04/2018 14:06, Jasvinder Singh:
> > IP_Pipeline app is not supported in FreeBSD environment. Therefore,
> > skip it while building the sample apps on FreeBSD.
> >
> > Fixes: 4bbf8e30aa5e ("examples/ip_pipeline: add CLI interface")
> > Fixes: 2f74ae28e23f ("examples/ip_pipeline: add tap object")
> >
> > Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> > ---
> > --- a/examples/ip_pipeline/Makefile
> > +++ b/examples/ip_pipeline/Makefile
> > +ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
> > +$(error This application can only operate in a linuxapp environment,
> > +\ please change the definition of the RTE_TARGET environment
> > +variable) endif
> 
> It is not skipping the example, just throwing an error (which is needed).
> 
> You should add a test in examples/Makefile to really skip it.
> 
Pushed v2 that allows skipping the ip pipeline app on FreeBSD.Thanks.
  

Patch

diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile
index c936d1e..6ff2abf 100644
--- a/examples/ip_pipeline/Makefile
+++ b/examples/ip_pipeline/Makefile
@@ -67,6 +67,11 @@  RTE_TARGET ?= x86_64-native-linuxapp-gcc
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
+ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
+$(error This application can only operate in a linuxapp environment, \
+please change the definition of the RTE_TARGET environment variable)
+endif
+
 INC += $(sort $(wildcard *.h))
 
 SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) := $(SRCS-y)