DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/ip_pipeline: fix freeBSD build error
@ 2016-10-17 15:48 Jasvinder Singh
  2016-10-18 13:28 ` Dumitrescu, Cristian
  0 siblings, 1 reply; 7+ messages in thread
From: Jasvinder Singh @ 2016-10-17 15:48 UTC (permalink / raw)
  To: dev; +Cc: cristian.dumitrescu

Error log:
 CC init.o
 examples/ip_pipeline/init.c:38:22: fatal error: linux/if.h: No such file or directory
 #include <linux/if.h>
                      ^
Fixes: 3f2c9f3bb6c6 ("examples/ip_pipeline: add TAP port")

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

diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
index 4fed474..3b36b53 100644
--- a/examples/ip_pipeline/init.c
+++ b/examples/ip_pipeline/init.c
@@ -35,8 +35,10 @@
 #include <stdio.h>
 #include <string.h>
 #include <netinet/in.h>
+#ifdef RTE_EXEC_ENV_LINUXAPP
 #include <linux/if.h>
 #include <linux/if_tun.h>
+#endif
 #include <fcntl.h>
 #include <sys/ioctl.h>
 #include <unistd.h>
@@ -1160,6 +1162,15 @@ app_init_tm(struct app_params *app)
 	}
 }
 
+#ifndef RTE_EXEC_ENV_LINUXAPP
+static void
+app_init_tap(struct app_params *app) {
+	if (app->n_pktq_tap == 0)
+		return;
+
+	rte_panic("TAP device not supported.\n");
+}
+#else
 static void
 app_init_tap(struct app_params *app)
 {
@@ -1187,6 +1198,7 @@ app_init_tap(struct app_params *app)
 		app->tap[i] = fd;
 	}
 }
+#endif
 
 #ifdef RTE_LIBRTE_KNI
 static int
@@ -1404,6 +1416,7 @@ void app_pipeline_params_get(struct app_params *app,
 			out->burst_size = app->tm_params[in->id].burst_read;
 			break;
 		}
+#ifdef RTE_EXEC_ENV_LINUXAPP
 		case APP_PKTQ_IN_TAP:
 		{
 			struct app_pktq_tap_params *tap_params =
@@ -1420,6 +1433,7 @@ void app_pipeline_params_get(struct app_params *app,
 			out->burst_size = app->tap_params[in->id].burst_read;
 			break;
 		}
+#endif
 #ifdef RTE_LIBRTE_KNI
 		case APP_PKTQ_IN_KNI:
 		{
@@ -1564,6 +1578,7 @@ void app_pipeline_params_get(struct app_params *app,
 				app->tm_params[in->id].burst_write;
 			break;
 		}
+#ifdef RTE_EXEC_ENV_LINUXAPP
 		case APP_PKTQ_OUT_TAP:
 		{
 			struct rte_port_fd_writer_params *params =
@@ -1575,6 +1590,7 @@ void app_pipeline_params_get(struct app_params *app,
 				app->tap_params[in->id].burst_write;
 			break;
 		}
+#endif
 #ifdef RTE_LIBRTE_KNI
 		case APP_PKTQ_OUT_KNI:
 		{
-- 
2.5.5

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/ip_pipeline: fix freeBSD build error
  2016-10-17 15:48 [dpdk-dev] [PATCH] examples/ip_pipeline: fix freeBSD build error Jasvinder Singh
@ 2016-10-18 13:28 ` Dumitrescu, Cristian
  2016-10-25 14:32   ` Thomas Monjalon
  0 siblings, 1 reply; 7+ messages in thread
From: Dumitrescu, Cristian @ 2016-10-18 13:28 UTC (permalink / raw)
  To: Singh, Jasvinder, dev



> -----Original Message-----
> From: Singh, Jasvinder
> Sent: Monday, October 17, 2016 4:49 PM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Subject: [PATCH] examples/ip_pipeline: fix freeBSD build error
> 
> Error log:
>  CC init.o
>  examples/ip_pipeline/init.c:38:22: fatal error: linux/if.h: No such file or
> directory
>  #include <linux/if.h>
>                       ^
> Fixes: 3f2c9f3bb6c6 ("examples/ip_pipeline: add TAP port")
> 
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> ---

Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/ip_pipeline: fix freeBSD build error
  2016-10-18 13:28 ` Dumitrescu, Cristian
@ 2016-10-25 14:32   ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2016-10-25 14:32 UTC (permalink / raw)
  To: Singh, Jasvinder; +Cc: dev, Dumitrescu, Cristian

> > Error log:
> >  CC init.o
> >  examples/ip_pipeline/init.c:38:22: fatal error: linux/if.h: No such file or
> > directory
> >  #include <linux/if.h>
> >                       ^
> > Fixes: 3f2c9f3bb6c6 ("examples/ip_pipeline: add TAP port")
> > 
> > Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> 
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/ip_pipeline: fix freebsd build error
  2018-04-09 22:34 ` Thomas Monjalon
@ 2018-04-10  9:53   ` Singh, Jasvinder
  0 siblings, 0 replies; 7+ messages in thread
From: Singh, Jasvinder @ 2018-04-10  9:53 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Dumitrescu, Cristian



> -----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. 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/ip_pipeline: fix freebsd build error
  2018-04-09 12:06 [dpdk-dev] [PATCH] examples/ip_pipeline: fix freebsd " Jasvinder Singh
  2018-04-09 12:58 ` Dumitrescu, Cristian
@ 2018-04-09 22:34 ` Thomas Monjalon
  2018-04-10  9:53   ` Singh, Jasvinder
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2018-04-09 22:34 UTC (permalink / raw)
  To: Jasvinder Singh; +Cc: dev, cristian.dumitrescu

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/ip_pipeline: fix freebsd build error
  2018-04-09 12:06 [dpdk-dev] [PATCH] examples/ip_pipeline: fix freebsd " Jasvinder Singh
@ 2018-04-09 12:58 ` Dumitrescu, Cristian
  2018-04-09 22:34 ` Thomas Monjalon
  1 sibling, 0 replies; 7+ messages in thread
From: Dumitrescu, Cristian @ 2018-04-09 12:58 UTC (permalink / raw)
  To: Singh, Jasvinder, dev



> -----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>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [dpdk-dev] [PATCH] examples/ip_pipeline: fix freebsd build error
@ 2018-04-09 12:06 Jasvinder Singh
  2018-04-09 12:58 ` Dumitrescu, Cristian
  2018-04-09 22:34 ` Thomas Monjalon
  0 siblings, 2 replies; 7+ messages in thread
From: Jasvinder Singh @ 2018-04-09 12:06 UTC (permalink / raw)
  To: dev; +Cc: cristian.dumitrescu

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-04-10  9:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-17 15:48 [dpdk-dev] [PATCH] examples/ip_pipeline: fix freeBSD build error Jasvinder Singh
2016-10-18 13:28 ` Dumitrescu, Cristian
2016-10-25 14:32   ` Thomas Monjalon
2018-04-09 12:06 [dpdk-dev] [PATCH] examples/ip_pipeline: fix freebsd " Jasvinder Singh
2018-04-09 12:58 ` Dumitrescu, Cristian
2018-04-09 22:34 ` Thomas Monjalon
2018-04-10  9:53   ` Singh, Jasvinder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).