Skip to contentSkip to conversation

examples/ip_pipeline: fix freebsd build error

PATCH Superseded Jasvinder Singh 4 participants 10 messages Apr 9, 2018 – Apr 10, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 examples/ip_pipeline/Makefile | 5 +++++
 1 file changed, 5 insertions(+)
examples/ip_pipeline/Makefile +5 -0
index c936d1e..6ff2abf 100644
@@ -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)
Signature · 1 line
2.9.3
Acked-by on v1 1/1
#1 lore raw
Quoted 37 lines

-----Original Message-----
From: Singh, Jasvinder
Sent: Monday, April 9, 2018 1:07 PM
To: [email protected]
Cc: Dumitrescu, Cristian <[email protected]>
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")
---
 examples/ip_pipeline/Makefile | 5 +++++
 1 file changed, 5 insertions(+)
examples/ip_pipeline/Makefile +5 -1
index c936d1e..6ff2abf 100644
@@ -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)
--
Quoted 1 line

2.9.3

#2 lore raw
In reply to Jasvinder Singh

09/04/2018 14:06, Jasvinder Singh:

Quoted 10 lines

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

---

examples/ip_pipeline/Makefile RTE_TARGET ?= x86_64-native-linuxapp-gcc · line 73

Quoted 4 lines
examples/ip_pipeline/Makefile +4 -0
+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.

#3 lore raw
Quoted 27 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday, April 9, 2018 11:34 PM
To: Singh, Jasvinder <[email protected]>
Cc: [email protected]; Dumitrescu, Cristian <[email protected]>
Subject: Re: [dpdk-dev] [PATCH] examples/ip_pipeline: fix freebsd build error

09/04/2018 14:06, Jasvinder Singh:

Quoted 10 lines

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

---

examples/ip_pipeline/Makefile

Quoted 4 lines
examples/ip_pipeline/Makefile +4 -0
+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).

Quoted 2 lines

You should add a test in examples/Makefile to really skip it.

Pushed v2 that allows skipping the ip pipeline app on FreeBSD.Thanks.

#4 lore raw

PATCH v2 1/1 examples/ip_pipeline: fix freebsd build error

In reply to 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")
---
 examples/ip_pipeline/Makefile | 8 ++++++++
 1 file changed, 8 insertions(+)
examples/ip_pipeline/Makefile +8 -0
index c936d1e..11d2b35 100644
@@ -67,6 +67,13 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
+ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
+$(info This application can only operate in a linuxapp environment, \
+please change the definition of the RTE_TARGET environment variable)
+all:
+clean:
+else
+
 INC += $(sort $(wildcard *.h))
 
 SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) := $(SRCS-y)
@@ -79,3 +86,4 @@ CFLAGS += $(WERROR_FLAGS)
 include $(RTE_SDK)/mk/rte.extapp.mk
 
 endif
+endif
Signature · 1 line
2.9.3
#5 lore raw

10/04/2018 11:51, Jasvinder Singh:

Quoted 2 lines

IP_Pipeline app is not supported in FreeBSD environment. Therefore, skip it while building the sample apps on FreeBSD.

[...]

examples/ip_pipeline/Makefile RTE_TARGET ?= x86_64-native-linuxapp-gcc · line 70

Quoted 7 lines
examples/ip_pipeline/Makefile +1 -0
@@ -67,6 +67,13 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
+ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")

You can use CONFIG_RTE_EXEC_ENV_LINUXAPP

examples/ip_pipeline/Makefile RTE_TARGET ?= x86_64-native-linuxapp-gcc · line 75

Quoted 5 lines
examples/ip_pipeline/Makefile +5 -0
+$(info This application can only operate in a linuxapp environment, \
+please change the definition of the RTE_TARGET environment variable)
+all:
+clean:
+else

Copy of my previous comment:
"
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. "

In this v2, you replaced the error by an info message. Error was better in my opinion.

#6 lore raw
Quoted 35 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, April 10, 2018 11:15 AM
To: Singh, Jasvinder <[email protected]>
Cc: [email protected]; Dumitrescu, Cristian <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2] examples/ip_pipeline: fix freebsd build error

10/04/2018 11:51, Jasvinder Singh:

Quoted 2 lines

IP_Pipeline app is not supported in FreeBSD environment. Therefore, skip it while building the sample apps on FreeBSD.

[...]

examples/ip_pipeline/Makefile RTE_TARGET ?= x86_64-native-linuxapp-gcc · line 70

Quoted 7 lines
examples/ip_pipeline/Makefile +1 -0
@@ -67,6 +67,13 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
+ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")

You can use CONFIG_RTE_EXEC_ENV_LINUXAPP

examples/ip_pipeline/Makefile RTE_TARGET ?= x86_64-native-linuxapp-gcc · line 75

Quoted 5 lines
examples/ip_pipeline/Makefile +5 -0
+$(info This application can only operate in a linuxapp environment, \
+please change the definition of the RTE_TARGET environment variable)
+all:
+clean:
+else

Copy of my previous comment:
"
It is not skipping the example, just throwing an error (which is needed).

Quoted 2 lines

You should add a test in examples/Makefile to really skip it. "

In V2, we follow the same pattern as followed in other examples such as l3fwd-power, ethtool, etc.

If we put check in examples/Makefile, than how the situation is handled if someone tries to build ip_pipeline straight instead of building all examples.

Quoted 4 lines

In this v2, you replaced the error by an info message. Error was better in my opinion.

#7 lore raw

10/04/2018 12:25, Singh, Jasvinder:

Quoted 26 lines

From: Thomas Monjalon [mailto:[email protected]]

Quoted 25 lines

10/04/2018 11:51, Jasvinder Singh:

Quoted 2 lines

IP_Pipeline app is not supported in FreeBSD environment. Therefore, skip it while building the sample apps on FreeBSD.

[...]

examples/ip_pipeline/Makefile RTE_TARGET ?= x86_64-native-linuxapp-gcc · line 70

Quoted 7 lines
examples/ip_pipeline/Makefile +1 -0
@@ -67,6 +67,13 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
+ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")

You can use CONFIG_RTE_EXEC_ENV_LINUXAPP

examples/ip_pipeline/Makefile RTE_TARGET ?= x86_64-native-linuxapp-gcc · line 75

Quoted 5 lines
examples/ip_pipeline/Makefile +5 -0
+$(info This application can only operate in a linuxapp environment, \
+please change the definition of the RTE_TARGET environment variable)
+all:
+clean:
+else

Copy of my previous comment:
"
It is not skipping the example, just throwing an error (which is needed).

Quoted 4 lines
Quoted 2 lines

You should add a test in examples/Makefile to really skip it. "

In V2, we follow the same pattern as followed in other examples such as l3fwd-power, ethtool, etc.

A kind of counter example is:

	ifeq ($(CONFIG_RTE_ARCH_X86_64),y)
	DIRS-y += performance-thread
	endif

But I get your point that it is done this way in several examples.

Quoted 1 line

If we put check in examples/Makefile, than how the situation is handled if someone tries to build ip_pipeline straight instead of building all examples.

My thought is that if you try to build explicitly this example on FreeBSD, you should get an error.

Quoted 2 lines
Quoted 2 lines

In this v2, you replaced the error by an info message. Error was better in my opinion.

I will get this v2 and not bother you more about that. All examples could be fixed at once. Not sure it is worth though, given this is the legacy build system.

#8 lore raw
Quoted 41 lines · Thomas Monjalon

10/04/2018 12:25, Singh, Jasvinder:

Quoted 20 lines

From: Thomas Monjalon [mailto:[email protected]]

Quoted 19 lines

10/04/2018 11:51, Jasvinder Singh:

Quoted 2 lines

IP_Pipeline app is not supported in FreeBSD environment. Therefore, skip it while building the sample apps on FreeBSD.

[...]

Quoted 7 lines

--- a/examples/ip_pipeline/Makefile +++ b/examples/ip_pipeline/Makefile @@ -67,6 +67,13 @@ RTE_TARGET ?= x86_64-native-linuxapp-gcc

include $(RTE_SDK)/mk/rte.vars.mk

+ifneq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")

You can use CONFIG_RTE_EXEC_ENV_LINUXAPP

Quoted 3 lines

+$(info This application can only operate in a linuxapp environment, \ +please change the definition of the RTE_TARGET environment variable) +all: +clean: +else

Quoted 7 lines
Quoted 4 lines

Copy of my previous comment: " 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. "

In V2, we follow the same pattern as followed in other examples such as l3fwd-power, ethtool, etc.

A kind of counter example is: ifeq ($(CONFIG_RTE_ARCH_X86_64),y) DIRS-y += performance-thread endif

But I get your point that it is done this way in several examples.

Quoted 3 lines

If we put check in examples/Makefile, than how the situation is handled if someone tries to build ip_pipeline straight instead of building all examples.

My thought is that if you try to build explicitly this example on FreeBSD, you should get an error.

Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

In this v2, you replaced the error by an info message. Error was better in my opinion.

I will get this v2 and not bother you more about that. All examples could be fixed at once. Not sure it is worth though, given this is the legacy build system.

Well, we still need a make-based solution for the example apps, because if we using meson & ninja for the main DPDK build, we still need to provide a makefile for each sample app. That makefile should build each app standalone using the pkg-config info to find DPDK libs. It also needs to signal to the user when they are trying to compile the app on an unsupported platform.

The alternative, I suppose, is not to have unsupported examples shipped for different platforms, but I think that is not as good a solution.

/Bruce