Skip to contentSkip to conversation

remove traces of bare metal support

PATCH In review Thomas Monjalon 2 participants 8 messages Sep 26, 2014 – Nov 27, 2014 2 messages not in the archive Library code

lore
Share & tools
lore
#0 lore raw

cover remove traces of bare metal support

There are some references to bare metal (i.e. without OS) support, especially some options to build a libc with DPDK.
As there are currently no such support, it can be removed. Some comments are cleaned in the same time.

Thanks to David for having done most of this effort:
config: no more bare metal environment
mk: no more bare metal environment
eal: no more bare metal environment
app: no more bare metal environment
examples: no more bare metal environment

Signature · 1 line
Thomas

A message that is not in the archive (sent off-list or not yet received): 1411740242-4240-1-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH 1/5 config: no more bare metal environment

From: David Marchand <[email protected]>

---
 config/common_bsdapp   |  7 +------
 config/common_linuxapp | 32 +-------------------------------
 2 files changed, 2 insertions(+), 37 deletions(-)
config/common_bsdapp +1 -6
index eebd05b..c3cee6e 100644
@@ -33,7 +33,7 @@
 #
 # define executive environment
 #
-# CONFIG_RTE_EXEC_ENV can be linuxapp, baremetal, bsdapp
+# CONFIG_RTE_EXEC_ENV can be linuxapp, bsdapp
 #
 CONFIG_RTE_EXEC_ENV="bsdapp"
 CONFIG_RTE_EXEC_ENV_BSDAPP=y
@@ -116,11 +116,6 @@ CONFIG_RTE_LIBRTE_EAL_BSDAPP=y
 CONFIG_RTE_LIBRTE_EAL_LINUXAPP=n
 
 #
-# Compile Environment Abstraction Layer for Bare metal
-#
-CONFIG_RTE_LIBRTE_EAL_BAREMETAL=n
-
-#
 # Compile Environment Abstraction Layer to support Vmware TSC map
 #
 CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y
config/common_linuxapp +1 -31
index 4713eb4..3acb8cb 100644
@@ -33,7 +33,7 @@
 #
 # define executive environment
 #
-# CONFIG_RTE_EXEC_ENV can be linuxapp, baremetal, bsdapp
+# CONFIG_RTE_EXEC_ENV can be linuxapp, bsdapp
 #
 CONFIG_RTE_EXEC_ENV="linuxapp"
 CONFIG_RTE_EXEC_ENV_LINUXAPP=y
@@ -85,31 +85,6 @@ CONFIG_RTE_BUILD_COMBINE_LIBS=n
 CONFIG_RTE_LIBNAME="intel_dpdk"
 
 #
-# Compile libc directory
-#
-CONFIG_RTE_LIBC=n
-
-#
-# Compile newlib as libc from source
-#
-CONFIG_RTE_LIBC_NEWLIB_SRC=n
-
-#
-# Use binary newlib
-#
-CONFIG_RTE_LIBC_NEWLIB_BIN=n
-
-#
-# Use binary newlib
-#
-CONFIG_RTE_LIBC_NETINCS=n
-
-#
-# Compile libgloss (newlib-stubs)
-#
-CONFIG_RTE_LIBGLOSS=n
-
-#
 # Compile Environment Abstraction Layer
 #
 CONFIG_RTE_LIBRTE_EAL=y
@@ -139,11 +114,6 @@ CONFIG_RTE_PCI_MAX_READ_REQUEST_SIZE=0
 CONFIG_RTE_LIBRTE_EAL_LINUXAPP=y
 
 #
-# Compile Environment Abstraction Layer for Bare metal
-#
-CONFIG_RTE_LIBRTE_EAL_BAREMETAL=n
-
-#
 # Compile Environment Abstraction Layer to support Vmware TSC map
 #
 CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y
Signature · 1 line
2.0.4
#3 lore raw

PATCH 2/5 mk: no more bare metal environment

In reply to a message not in the archive

From: David Marchand <[email protected]>

---
 mk/exec-env/bsdapp/rte.vars.mk   |  2 +-
 mk/exec-env/linuxapp/rte.vars.mk |  2 +-
 mk/rte.app.mk                    |  9 ---------
 mk/rte.sdkroot.mk                |  2 +-
 mk/target/generic/rte.vars.mk    |  2 +-
 mk/toolchain/gcc/rte.vars.mk     |  4 ----
 mk/toolchain/icc/rte.vars.mk     | 15 ---------------
 7 files changed, 4 insertions(+), 32 deletions(-)
mk/exec-env/bsdapp/rte.vars.mk +1 -1
index fef9579..aed0e18 100644
@@ -37,7 +37,7 @@
 #   - define EXECENV_ASFLAGS variable (overriden by cmdline)
 #   - may override any previously defined variable
 #
-# examples for RTE_EXEC_ENV: linuxapp, baremetal
+# examples for RTE_EXEC_ENV: linuxapp, bsdapp
 #
 ifeq ($(RTE_BUILD_SHARED_LIB),y)
 EXECENV_CFLAGS  = -pthread -fPIC
mk/exec-env/linuxapp/rte.vars.mk +1 -1
index d4808c2..afcefa6 100644
@@ -37,7 +37,7 @@
 #   - define EXECENV_ASFLAGS variable (overriden by cmdline)
 #   - may override any previously defined variable
 #
-# examples for RTE_EXEC_ENV: linuxapp, baremetal
+# examples for RTE_EXEC_ENV: linuxapp, bsdapp
 #
 ifeq ($(RTE_BUILD_SHARED_LIB),y)
 EXECENV_CFLAGS  = -pthread -fPIC
mk/rte.app.mk +0 -9
index 34dff2a..76f2fd3 100644
@@ -149,15 +149,6 @@ ifeq ($(CONFIG_RTE_LIBRTE_RING),y)
 LDLIBS += -lrte_ring
 endif
 
-ifeq ($(CONFIG_RTE_LIBC),y)
-LDLIBS += -lc
-LDLIBS += -lm
-endif
-
-ifeq ($(CONFIG_RTE_LIBGLOSS),y)
-LDLIBS += -lgloss
-endif
-
 ifeq ($(CONFIG_RTE_LIBRTE_EAL),y)
 LDLIBS += -lrte_eal
 endif
mk/rte.sdkroot.mk +1 -1
index f7eab1d..e8423b0 100644
@@ -53,7 +53,7 @@ export BUILDING_RTE_SDK
 
 #
 # We can specify the configuration template when doing the "make
-# config". For instance: make config T=i686-native-baremetal-gcc
+# config". For instance: make config T=x86_64-native-linuxapp-gcc
 #
 RTE_CONFIG_TEMPLATE :=
 ifdef T
mk/target/generic/rte.vars.mk +1 -1
index 6020f20..53650c3 100644
@@ -94,7 +94,7 @@ include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.vars.mk
 #   - define EXECENV_ASFLAGS variable (overriden by cmdline)
 #   - may override any previously defined variable
 #
-# examples for RTE_EXEC_ENV: linuxapp, baremetal
+# examples for RTE_EXEC_ENV: linuxapp, bsdapp
 #
 include $(RTE_SDK)/mk/exec-env/$(RTE_EXEC_ENV)/rte.vars.mk
 
mk/toolchain/gcc/rte.vars.mk +0 -4
index 262ebdf..fac5697 100644
@@ -74,11 +74,7 @@ WERROR_FLAGS := -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes
 WERROR_FLAGS += -Wmissing-declarations -Wold-style-definition -Wpointer-arith
 WERROR_FLAGS += -Wcast-align -Wnested-externs -Wcast-qual
 WERROR_FLAGS += -Wformat-nonliteral -Wformat-security
-
-ifeq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
-# These trigger warnings in newlib, so can't be used for baremetal
 WERROR_FLAGS += -Wundef -Wwrite-strings
-endif
 
 # process cpu flags
 include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.toolchain-compat.mk
mk/toolchain/icc/rte.vars.mk +0 -15
index 612370d..807134a 100644
@@ -70,22 +70,7 @@ TOOLCHAIN_ASFLAGS =
 #   Remark #271   : trailing comma is nonstandard
 #   Warning #1478 : function "<func_name>" (declared at line N of "<filename>")
 #                   was declared "deprecated"
-ifeq ($(CONFIG_RTE_EXEC_ENV),"linuxapp")
 WERROR_FLAGS := -Wall -Werror-all -w2 -diag-disable 271 -diag-warning 1478
-else
-
-# Turn off some ICC warnings -
-#   Remark #193   : zero used for undefined preprocessing identifier
-#                  (needed for newlib)
-#   Remark #271   : trailing comma is nonstandard
-#   Remark #1292  : attribute "warning" ignored ((warning ("the use of
-#                   `mktemp' is dangerous; use `mkstemp' instead"))));
-#                   (needed for newlib)
-#   Warning #1478 : function "<func_name>" (declared at line N of "<filename>")
-#                   was declared "deprecated"
-WERROR_FLAGS := -Wall -Werror-all -w2 -diag-disable 193,271,1292 \
-		-diag-warning 1478
-endif
 
 # process cpu flags
 include $(RTE_SDK)/mk/toolchain/$(RTE_TOOLCHAIN)/rte.toolchain-compat.mk
Signature · 1 line
2.0.4
#4 lore raw

PATCH 3/5 eal: no more bare metal environment

In reply to a message not in the archive

From: David Marchand <[email protected]>

---
 lib/Makefile                            | 1 -
 lib/librte_eal/Makefile                 | 2 --
 lib/librte_eal/common/Makefile          | 3 ---
 lib/librte_eal/common/include/rte_eal.h | 5 ++---
 lib/librte_eal/common/include/rte_log.h | 3 +--
 5 files changed, 3 insertions(+), 11 deletions(-)
lib/Makefile +0 -1
index 10c5bb3..8af6bd7 100644
@@ -31,7 +31,6 @@
 
 include $(RTE_SDK)/mk/rte.vars.mk
 
-DIRS-$(CONFIG_RTE_LIBC) += libc
 DIRS-$(CONFIG_RTE_LIBRTE_EAL) += librte_eal
 DIRS-$(CONFIG_RTE_LIBRTE_MALLOC) += librte_malloc
 DIRS-$(CONFIG_RTE_LIBRTE_RING) += librte_ring
lib/librte_eal/Makefile +0 -2
index 3e1441b..69003cf 100644
@@ -35,7 +35,5 @@ DIRS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += common
 DIRS-$(CONFIG_RTE_LIBRTE_EAL_LINUXAPP) += linuxapp
 DIRS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += common
 DIRS-$(CONFIG_RTE_LIBRTE_EAL_BSDAPP) += bsdapp
-DIRS-$(CONFIG_RTE_LIBRTE_EAL_BAREMETAL) += baremetal
-DIRS-$(CONFIG_RTE_LIBRTE_EAL_BAREMETAL) += common
 
 include $(RTE_SDK)/mk/rte.subdir.mk
lib/librte_eal/common/Makefile +0 -3
index 7f27966..40986a7 100644
@@ -52,7 +52,4 @@ SYMLINK-$(CONFIG_RTE_LIBRTE_EAL)-include := $(addprefix include/,$(INC))
 SYMLINK-$(CONFIG_RTE_LIBRTE_EAL)-include/arch := \
 	$(addprefix include/$(RTE_ARCH)/arch/,$(ARCH_INC))
 
-# add libc if configured
-DEPDIRS-$(CONFIG_RTE_LIBC) += lib/libc
-
 include $(RTE_SDK)/mk/rte.install.mk
lib/librte_eal/common/include/rte_eal.h +2 -3
index 273da9a..3c2d357 100644
@@ -124,9 +124,8 @@ enum rte_proc_type_t rte_eal_process_type(void);
  * This function is to be executed on the MASTER lcore only, as soon
  * as possible in the application's main() function.
  *
- * The function finishes the initialization process that was started
- * during boot (in case of baremetal) or before main() is called (in
- * case of linuxapp). It puts the SLAVE lcores in the WAIT state.
+ * The function finishes the initialization process before main() is called.
+ * It puts the SLAVE lcores in the WAIT state.
  *
  * When the multi-partition feature is supported, depending on the
  * configuration (if CONFIG_RTE_EAL_MAIN_PARTITION is disabled), this
lib/librte_eal/common/include/rte_log.h +1 -2
index 02cbb14..db1ea08 100644
@@ -106,8 +106,7 @@ extern FILE *eal_default_log_stream;
  *
  * This can be done at any time. The f argument represents the stream
  * to be used to send the logs. If f is NULL, the default output is
- * used, which is the serial line in case of bare metal, or directly
- * sent to syslog in case of linux application.
+ * used (stderr).
  *
  * @param f
  *   Pointer to the stream.
Signature · 1 line
2.0.4
#5 lore raw

PATCH 4/5 app: no more bare metal environment

In reply to a message not in the archive

From: David Marchand <[email protected]>

---
 app/cmdline_test/cmdline_test.h |  7 ------
 app/dump_cfg/main.c             |  4 +---
 app/dump_cfg/main.h             | 45 -------------------------------------
 app/test-acl/main.c             |  6 +++--
 app/test-acl/main.h             | 50 -----------------------------------------
 app/test-pipeline/main.c        |  2 +-
 app/test-pipeline/main.h        |  8 -------
 app/test-pmd/cmdline.c          |  2 +-
 app/test-pmd/testpmd.c          |  4 ----
 app/test-pmd/testpmd.h          |  6 -----
 app/test/Makefile               |  4 ----
 app/test/autotest.py            |  8 +------
 app/test/autotest_runner.py     | 33 ++++++++++-----------------
 app/test/process.h              |  4 ----
 app/test/test.c                 |  4 ----
 app/test/test.h                 |  7 ------
 app/test/test_debug.c           | 28 ++---------------------
 app/test/test_interrupts.c      |  2 +-
 app/test/test_mbuf.c            | 14 +-----------
 19 files changed, 24 insertions(+), 214 deletions(-)
 delete mode 100644 app/dump_cfg/main.h
 delete mode 100644 app/test-acl/main.h
app/cmdline_test/cmdline_test.h +0 -7
index 796fe20..1c9af12 100644
@@ -34,13 +34,6 @@
 #ifndef _CMDLINE_TEST_H_
 #define _CMDLINE_TEST_H_
 
-/* icc on baremetal gives us troubles with function named 'main' */
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define main _main
-#endif
-
 extern cmdline_parse_ctx_t main_ctx[];
 
-int main(int argc, char **argv);
-
 #endif
app/dump_cfg/main.c +1 -3
index c9b40d1..127dbb1 100644
@@ -53,10 +53,8 @@
 #include <rte_branch_prediction.h>
 #include <rte_string_fns.h>
 
-#include "main.h"
-
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	int ret;
 	int i;
app/dump_cfg/main.h deleted +0 -45

45 lines not on this page · raw message

app/test-acl/main.c +4 -2
index 44add10..9d4dce6 100644
@@ -62,7 +62,9 @@
 
 #endif /*RTE_LIBRTE_ACL_STANDALONE */
 
-#include "main.h"
+#define	RTE_LOGTYPE_TESTACL	RTE_LOGTYPE_USER1
+
+#define	APP_NAME	"TESTACL"
 
 #define GET_CB_FIELD(in, fd, base, lim, dlm)	do {            \
 	unsigned long val;                                      \
@@ -1012,7 +1014,7 @@ get_input_opts(int argc, char **argv)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	int ret;
 	uint32_t lcore;
app/test-acl/main.h deleted +0 -50

50 lines not on this page · raw message

app/test-pipeline/main.c +1 -1
index 0a2a597..129b1fc 100644
@@ -76,7 +76,7 @@
 #include "main.h"
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	uint32_t lcore;
 	int ret;
app/test-pipeline/main.h +0 -8
index 2ed2928..0c90fc3 100644
@@ -137,12 +137,4 @@ void app_main_loop_tx(void);
 #define APP_FLUSH 0x3FF
 #endif
 
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define MAIN _main
-#else
-#define MAIN main
-#endif
-
-int MAIN(int argc, char **argv);
-
 #endif /* _MAIN_H_ */
app/test-pmd/cmdline.c +1 -1
index 225f669..6fd590e 100644
@@ -171,7 +171,7 @@ static void cmd_help_long_parsed(void *parsed_result,
 			" statistics.\n\n"
 
 			"quit\n"
-			"    Quit to prompt in Linux and reboot on Baremetal.\n\n"
+			"    Quit to prompt.\n\n"
 		);
 	}
 
app/test-pmd/testpmd.c +0 -4
index 9f6cdc4..1888fa2 100644
@@ -1852,10 +1852,6 @@ init_port_dcb_config(portid_t pid,struct dcb_config *dcb_conf)
 	return 0;
 }
 
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define main _main
-#endif
-
 int
 main(int argc, char** argv)
 {
app/test-pmd/testpmd.h +0 -6
index 9cbfeac..a273a2c 100644
@@ -34,12 +34,6 @@
 #ifndef _TESTPMD_H_
 #define _TESTPMD_H_
 
-/* icc on baremetal gives us troubles with function named 'main' */
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define main _main
-int main(int argc, char **argv);
-#endif
-
 #define RTE_PORT_ALL            (~(portid_t)0x0)
 
 #define RTE_TEST_RX_DESC_MAX    2048
app/test/Makefile +0 -4
index 37a3772..210a7f6 100644
@@ -91,13 +91,9 @@ SRCS-y += test_errno.c
 SRCS-y += test_tailq.c
 SRCS-y += test_string_fns.c
 SRCS-y += test_cpuflags.c
-
-ifeq ($(CONFIG_RTE_EXEC_ENV_BAREMETAL),)
 SRCS-y += test_mp_secondary.c
 SRCS-y += test_eal_flags.c
 SRCS-y += test_eal_fs.c
-endif
-
 SRCS-y += test_alarm.c
 SRCS-y += test_interrupts.c
 SRCS-y += test_version.c
app/test/autotest.py +1 -7
index f7056a3..a79db10 100644
@@ -60,13 +60,7 @@ if len(sys.argv) > 3:
 	else:
 		test_whitelist = testlist
 
-# adjust test command line
-if "baremetal" in target:
-	cmdline  = "qemu-system-x86_64 -cdrom %s.iso -boot d " % (sys.argv[1])
-	cmdline	+= "-m 2000 -smp 4 -nographic -net nic,model=e1000"
-	platform = "QEMU x86_64"
-else:
-	cmdline  = "%s -c f -n 4"%(sys.argv[1])
+cmdline  = "%s -c f -n 4"%(sys.argv[1])
 
 print cmdline
 
app/test/autotest_runner.py +12 -21
index 9698ddc..260b72c 100644
@@ -208,23 +208,19 @@ class AutotestRunner:
 	def __get_cmdline(self, test):
 		cmdline = self.cmdline
 
-		# perform additional linuxapp adjustments
-		if not "baremetal" in self.target:
-
-			# append memory limitations for each test
-			# otherwise tests won't run in parallel
-			if not "i686" in self.target:
-				cmdline += " --socket-mem=%s"% test["Memory"]
-			else:
-				# affinitize startup so that tests don't fail on i686
-				cmdline = "taskset 1 " + cmdline
-				cmdline += " -m " + str(sum(map(int,test["Memory"].split(","))))
+		# append memory limitations for each test
+		# otherwise tests won't run in parallel
+		if not "i686" in self.target:
+			cmdline += " --socket-mem=%s"% test["Memory"]
+		else:
+			# affinitize startup so that tests don't fail on i686
+			cmdline = "taskset 1 " + cmdline
+			cmdline += " -m " + str(sum(map(int,test["Memory"].split(","))))
 
-			# set group prefix for autotest group
-			# otherwise they won't run in parallel
-			cmdline += " --file-prefix=%s"% test["Prefix"]
+		# set group prefix for autotest group
+		# otherwise they won't run in parallel
+		cmdline += " --file-prefix=%s"% test["Prefix"]
 
-			return cmdline
 		return cmdline
 
 
@@ -338,12 +334,7 @@ class AutotestRunner:
 			self.__filter_groups(self.non_parallel_test_groups)
 		
 		# create a pool of worker threads
-		if not "baremetal" in self.target:
-			pool = multiprocessing.Pool(processes=1)
-		else:
-			# we can't be sure running baremetal tests in parallel
-			# will work, so let's stay on the safe side
-			pool = multiprocessing.Pool(processes=1)
+		pool = multiprocessing.Pool(processes=1)
 			
 		results = []
 	
app/test/process.h +0 -4
index cb8973e..057ba9f 100644
@@ -34,8 +34,6 @@
 #ifndef _PROCESS_H_
 #define _PROCESS_H_
 
-#ifndef RTE_EXEC_ENV_BAREMETAL
-
 #ifdef RTE_EXEC_ENV_BSDAPP
 #define self "curproc"
 #define exe "file"
@@ -102,6 +100,4 @@ process_dup(const char *const argv[], int numargs, const char *env_value)
 	return status;
 }
 
-#endif /* not baremetal */
-
 #endif /* _PROCESS_H_ */
app/test/test.c +0 -4
index 9bee6bb..12345c0 100644
@@ -66,7 +66,6 @@ extern cmdline_parse_ctx_t main_ctx[];
 
 const char *prgname; /* to be set to argv[0] */
 
-#ifndef RTE_EXEC_ENV_BAREMETAL
 static const char *recursive_call; /* used in linuxapp for MP and other tests */
 
 static int
@@ -110,7 +109,6 @@ do_recursive_call(void)
 	printf("ERROR - missing action to take for %s\n", recursive_call);
 	return -1;
 }
-#endif
 
 int
 main(int argc, char **argv)
@@ -135,10 +133,8 @@ main(int argc, char **argv)
 
 	prgname = argv[0];
 
-#ifndef RTE_EXEC_ENV_BAREMETAL
 	if ((recursive_call = getenv(RECURSIVE_ENV_VAR)) != NULL)
 		return do_recursive_call();
-#endif
 
 #ifdef RTE_LIBEAL_USE_HPET
 	if (rte_eal_hpet_init(1) < 0)
app/test/test.h +0 -7
index 98ab804..75e95d8 100644
@@ -118,19 +118,12 @@ struct unit_test_suite {
 
 int unit_test_suite_runner(struct unit_test_suite *suite);
 
-/* icc on baremetal gives us troubles with function named 'main' */
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define main _main
-#endif
-
 #define RECURSIVE_ENV_VAR "RTE_TEST_RECURSIVE"
 
 extern const char *prgname;
 
 int commands_init(void);
 
-int main(int argc, char **argv);
-
 int test_pci(void);
 int test_pci_run;
 
app/test/test_debug.c +2 -26
index 4659e46..7c3ee92 100644
@@ -45,31 +45,9 @@
 /*
  * Debug test
  * ==========
- *
- * - Call rte_dump_stack() and rte_dump_registers(). The result is not checked
- *   currently, as the functions are not implemented on baremetal.
- * - Check that rte_panic() terminates the program using a non-zero error code.
- *   (Only implemented on linux, since it requires the fork() system call)
  */
 
-#ifdef RTE_EXEC_ENV_BAREMETAL
-
-/* baremetal - don't test rte_panic or rte_exit */
-static int
-test_panic(void)
-{
-	return 0;
-}
-
-static int
-test_exit(void)
-{
-	return 0;
-}
-
-#else
-
-/* linuxapp - use fork() to test rte_panic() */
+/* use fork() to test rte_panic() */
 static int
 test_panic(void)
 {
@@ -94,7 +72,7 @@ test_panic(void)
 	return 0;
 }
 
-/* linuxapp - use fork() to test rte_exit() */
+/* use fork() to test rte_exit() */
 static int
 test_exit_val(int exit_val)
 {
@@ -134,8 +112,6 @@ test_exit(void)
 	return 0;
 }
 
-#endif
-
 static void
 dummy_app_usage(const char *progname)
 {
app/test/test_interrupts.c +1 -1
index 61fdc56..6e3dec3 100644
@@ -157,7 +157,7 @@ test_interrupt_handle_compare(struct rte_intr_handle *intr_handle_l,
 }
 
 #else
-/* to be implemented for baremetal later */
+/* to be implemented for bsd later */
 static inline int
 test_interrupt_handle_sanity_check(struct rte_intr_handle *intr_handle)
 {
app/test/test_mbuf.c +1 -13
index 66bcbc5..2a788d1 100644
@@ -677,21 +677,10 @@ test_refcnt_mbuf(void)
 	return (0);
 }
 
-#ifdef RTE_EXEC_ENV_BAREMETAL
-
-/* baremetal - don't test failing sanity checks */
-static int
-test_failing_mbuf_sanity_check(void)
-{
-	return 0;
-}
-
-#else
-
 #include <unistd.h>
 #include <sys/wait.h>
 
-/* linuxapp - use fork() to test mbuf errors panic */
+/* use fork() to test mbuf errors panic */
 static int
 verify_mbuf_check_panics(struct rte_mbuf *buf)
 {
@@ -776,7 +765,6 @@ test_failing_mbuf_sanity_check(void)
 
 	return 0;
 }
-#endif
 
 
 static int
Signature · 1 line
2.0.4
#6 lore raw

PATCH 5/5 examples: no more bare metal environment

In reply to a message not in the archive

From: David Marchand <[email protected]>

---
 examples/cmdline/main.c                            |  3 +-
 examples/cmdline/main.h                            | 45 ---------------------
 examples/dpdk_qat/main.c                           |  3 +-
 examples/dpdk_qat/main.h                           | 45 ---------------------
 examples/helloworld/main.c                         |  4 +-
 examples/helloworld/main.h                         | 45 ---------------------
 examples/ip_fragmentation/main.c                   |  4 +-
 examples/ip_fragmentation/main.h                   | 46 ----------------------
 examples/ip_pipeline/main.c                        |  2 +-
 examples/ip_pipeline/main.h                        |  8 ----
 examples/ip_reassembly/main.c                      |  4 +-
 examples/ip_reassembly/main.h                      | 46 ----------------------
 examples/ipv4_multicast/main.c                     |  4 +-
 examples/ipv4_multicast/main.h                     | 46 ----------------------
 examples/l2fwd/main.c                              |  4 +-
 examples/l2fwd/main.h                              | 45 ---------------------
 examples/l3fwd-acl/main.c                          |  4 +-
 examples/l3fwd-acl/main.h                          | 45 ---------------------
 examples/l3fwd-power/main.c                        |  4 +-
 examples/l3fwd-power/main.h                        | 45 ---------------------
 examples/l3fwd-vf/main.c                           |  4 +-
 examples/l3fwd-vf/main.h                           | 45 ---------------------
 examples/l3fwd/main.c                              |  4 +-
 examples/l3fwd/main.h                              | 41 -------------------
 examples/link_status_interrupt/main.c              |  4 +-
 examples/link_status_interrupt/main.h              | 45 ---------------------
 examples/load_balancer/main.c                      |  2 +-
 examples/load_balancer/main.h                      |  8 ----
 .../client_server_mp/mp_server/init.c              |  1 -
 .../client_server_mp/mp_server/main.c              |  3 +-
 .../client_server_mp/mp_server/main.h              | 45 ---------------------
 examples/multi_process/l2fwd_fork/main.c           |  3 +-
 examples/multi_process/l2fwd_fork/main.h           | 45 ---------------------
 examples/qos_meter/main.c                          |  2 +-
 examples/qos_meter/main.h                          |  9 -----
 examples/qos_sched/main.c                          |  2 +-
 examples/qos_sched/main.h                          |  7 ----
 examples/quota_watermark/qw/main.c                 |  2 +-
 examples/quota_watermark/qw/main.h                 |  9 -----
 examples/quota_watermark/qwctl/qwctl.c             |  2 +-
 examples/quota_watermark/qwctl/qwctl.h             |  8 ----
 examples/timer/main.c                              |  4 +-
 examples/timer/main.h                              | 45 ---------------------
 examples/vhost/main.c                              |  6 +--
 examples/vhost/main.h                              |  7 ----
 examples/vhost_xen/main.c                          |  2 +-
 examples/vhost_xen/main.h                          |  8 ----
 examples/vmdq/main.c                               |  8 +---
 examples/vmdq/main.h                               | 46 ----------------------
 examples/vmdq_dcb/main.c                           |  8 +---
 examples/vmdq_dcb/main.h                           | 46 ----------------------
 51 files changed, 27 insertions(+), 896 deletions(-)
 delete mode 100644 examples/cmdline/main.h
 delete mode 100644 examples/dpdk_qat/main.h
 delete mode 100644 examples/helloworld/main.h
 delete mode 100644 examples/ip_fragmentation/main.h
 delete mode 100644 examples/ip_reassembly/main.h
 delete mode 100644 examples/ipv4_multicast/main.h
 delete mode 100644 examples/l2fwd/main.h
 delete mode 100644 examples/l3fwd-acl/main.h
 delete mode 100644 examples/l3fwd-power/main.h
 delete mode 100644 examples/l3fwd-vf/main.h
 delete mode 100644 examples/l3fwd/main.h
 delete mode 100644 examples/link_status_interrupt/main.h
 delete mode 100644 examples/multi_process/client_server_mp/mp_server/main.h
 delete mode 100644 examples/multi_process/l2fwd_fork/main.h
 delete mode 100644 examples/timer/main.h
 delete mode 100644 examples/vmdq/main.h
 delete mode 100644 examples/vmdq_dcb/main.h
examples/cmdline/main.c +1 -2
index 668f152..f8ee0a5 100644
@@ -77,9 +77,8 @@
 #include <rte_debug.h>
 
 #include "commands.h"
-#include "main.h"
 
-int MAIN(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	int ret;
 	struct cmdline *cl;
examples/cmdline/main.h deleted +0 -45

45 lines not on this page · raw message

examples/dpdk_qat/main.c +1 -2
index c130ea3..d487650 100644
@@ -69,7 +69,6 @@
 #include <rte_ip.h>
 #include <rte_string_fns.h>
 
-#include "main.h"
 #include "crypto.h"
 
 #define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
@@ -672,7 +671,7 @@ init_mem(void)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	struct lcore_conf *qconf;
 	struct rte_eth_link link;
examples/dpdk_qat/main.h deleted +0 -45

45 lines not on this page · raw message

examples/helloworld/main.c +1 -3
index 0c0f833..a4bbd11 100644
@@ -46,8 +46,6 @@
 #include <rte_lcore.h>
 #include <rte_debug.h>
 
-#include "main.h"
-
 static int
 lcore_hello(__attribute__((unused)) void *arg)
 {
@@ -58,7 +56,7 @@ lcore_hello(__attribute__((unused)) void *arg)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	int ret;
 	unsigned lcore_id;
examples/helloworld/main.h deleted +0 -45

45 lines not on this page · raw message

examples/ip_fragmentation/main.c +1 -3
index 75028ac..46cc664 100644
@@ -75,8 +75,6 @@
 
 #include <rte_ip_frag.h>
 
-#include "main.h"
-
 #define RTE_LOGTYPE_IP_FRAG RTE_LOGTYPE_USER1
 
 #define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
@@ -848,7 +846,7 @@ init_mem(void)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	struct lcore_queue_conf *qconf;
 	struct rx_queue *rxq;
examples/ip_fragmentation/main.h deleted +0 -46

46 lines not on this page · raw message

examples/ip_pipeline/main.c +1 -1
index e19412f..2c53877 100644
@@ -76,7 +76,7 @@
 #include "main.h"
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	int ret;
 
examples/ip_pipeline/main.h +0 -8
index 4bce203..6085aaa 100644
@@ -295,12 +295,4 @@ struct app_msg_resp {
 
 #define APP_FLUSH 0xFF
 
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define MAIN _main
-#else
-#define MAIN main
-#endif
-
-int MAIN(int argc, char **argv);
-
 #endif /* _MAIN_H_ */
examples/ip_reassembly/main.c +1 -3
index 9ba3f0a..32f7d98 100644
@@ -79,8 +79,6 @@
 
 #include <rte_ip_frag.h>
 
-#include "main.h"
-
 #define MAX_PKT_BURST 32
 
 
@@ -1055,7 +1053,7 @@ signal_handler(int signum)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	struct lcore_queue_conf *qconf;
 	struct rx_queue *rxq;
examples/ip_reassembly/main.h deleted +0 -46

46 lines not on this page · raw message

examples/ipv4_multicast/main.c +1 -3
index 5c2ab86..21ff7c6 100644
@@ -71,8 +71,6 @@
 #include <rte_fbk_hash.h>
 #include <rte_ip.h>
 
-#include "main.h"
-
 #define RTE_LOGTYPE_IPv4_MULTICAST RTE_LOGTYPE_USER1
 
 #define MAX_PORTS 16
@@ -710,7 +708,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	struct lcore_queue_conf *qconf;
 	int ret;
examples/ipv4_multicast/main.h deleted +0 -46

46 lines not on this page · raw message

examples/l2fwd/main.c +1 -3
index e16c914..c58ce3e 100644
@@ -70,8 +70,6 @@
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 
-#include "main.h"
-
 #define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1
 
 #define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
@@ -581,7 +579,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	struct lcore_queue_conf *qconf;
 	struct rte_eth_dev_info dev_info;
examples/l2fwd/main.h deleted +0 -45

45 lines not on this page · raw message

examples/l3fwd-acl/main.c +1 -3
index 4dd6b34..7be2d50 100644
@@ -73,8 +73,6 @@
 #include <rte_string_fns.h>
 #include <rte_acl.h>
 
-#include "main.h"
-
 #define DO_RFC_1812_CHECKS
 
 #define RTE_LOGTYPE_L3FWD RTE_LOGTYPE_USER1
@@ -1966,7 +1964,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	struct lcore_conf *qconf;
 	int ret;
examples/l3fwd-acl/main.h deleted +0 -45

45 lines not on this page · raw message

examples/l3fwd-power/main.c +1 -3
index 3bf63ff..a498a46 100644
@@ -76,8 +76,6 @@
 #include <rte_timer.h>
 #include <rte_power.h>
 
-#include "main.h"
-
 #define RTE_LOGTYPE_L3FWD_POWER RTE_LOGTYPE_USER1
 
 #define MAX_PKT_BURST 32
@@ -1510,7 +1508,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	struct lcore_conf *qconf;
 	int ret;
examples/l3fwd-power/main.h deleted +0 -45

45 lines not on this page · raw message

examples/l3fwd-vf/main.c +1 -3
index f567aa8..497fea8 100644
@@ -73,8 +73,6 @@
 #include <rte_udp.h>
 #include <rte_string_fns.h>
 
-#include "main.h"
-
 #define APP_LOOKUP_EXACT_MATCH          0
 #define APP_LOOKUP_LPM                  1
 #define DO_RFC_1812_CHECKS
@@ -976,7 +974,7 @@ init_mem(unsigned nb_mbuf)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	struct lcore_conf *qconf;
 	int ret;
examples/l3fwd-vf/main.h deleted +0 -45

45 lines not on this page · raw message

examples/l3fwd/main.c +1 -3
index 01220e3..a643d2f 100644
@@ -73,8 +73,6 @@
 #include <rte_udp.h>
 #include <rte_string_fns.h>
 
-#include "main.h"
-
 #define APP_LOOKUP_EXACT_MATCH          0
 #define APP_LOOKUP_LPM                  1
 #define DO_RFC_1812_CHECKS
@@ -2445,7 +2443,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	struct lcore_conf *qconf;
 	int ret;
examples/l3fwd/main.h deleted +0 -41

41 lines not on this page · raw message

examples/link_status_interrupt/main.c +1 -3
index b8b7571..e8e677f 100644
@@ -71,8 +71,6 @@
 #include <rte_mempool.h>
 #include <rte_mbuf.h>
 
-#include "main.h"
-
 #define RTE_LOGTYPE_LSI RTE_LOGTYPE_USER1
 
 #define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM)
@@ -630,7 +628,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	struct lcore_queue_conf *qconf;
 	struct rte_eth_dev_info dev_info;
examples/link_status_interrupt/main.h deleted +0 -45

45 lines not on this page · raw message

examples/load_balancer/main.c +1 -1
index 47b0ba7..d0e2c05 100644
@@ -75,7 +75,7 @@
 #include "main.h"
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	uint32_t lcore;
 	int ret;
examples/load_balancer/main.h +0 -8
index 82cdf95..d9f878b 100644
@@ -368,12 +368,4 @@ uint32_t app_get_lcores_io_rx(void);
 uint32_t app_get_lcores_worker(void);
 void app_print_params(void);
 
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define MAIN _main
-#else
-#define MAIN main
-#endif
-
-int MAIN(int argc, char **argv);
-
 #endif /* _MAIN_H_ */
examples/multi_process/client_server_mp/mp_server/init.c +0 -1
index 30518c0..fdcc3c6 100644
@@ -68,7 +68,6 @@
 #include "common.h"
 #include "args.h"
 #include "init.h"
-#include "main.h"
 
 #define MBUFS_PER_CLIENT 1536
 #define MBUFS_PER_PORT 1536
examples/multi_process/client_server_mp/mp_server/main.c +1 -2
index b3887b1..01ccd37 100644
@@ -72,7 +72,6 @@
 #include "common.h"
 #include "args.h"
 #include "init.h"
-#include "main.h"
 
 /*
  * When doing reads from the NIC or the client queues,
@@ -301,7 +300,7 @@ do_packet_forwarding(void)
 }
 
 int
-MAIN(int argc, char *argv[])
+main(int argc, char *argv[])
 {
 	/* initialise the system */
 	if (init(argc, argv) < 0 )
examples/multi_process/client_server_mp/mp_server/main.h deleted +0 -45

45 lines not on this page · raw message

examples/multi_process/l2fwd_fork/main.c +1 -2
index c887b63..de64bc9 100644
@@ -74,7 +74,6 @@
 #include <rte_mbuf.h>
 #include <rte_malloc.h>
 
-#include "main.h"
 #include "flib.h"
 
 #define RTE_LOGTYPE_L2FWD RTE_LOGTYPE_USER1
@@ -999,7 +998,7 @@ check_all_ports_link_status(uint8_t port_num, uint32_t port_mask)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	struct lcore_queue_conf *qconf;
 	struct rte_eth_dev_info dev_info;
examples/multi_process/l2fwd_fork/main.h deleted +0 -45

45 lines not on this page · raw message

examples/qos_meter/main.c +1 -1
index c02ac50..b05b631 100644
@@ -358,7 +358,7 @@ parse_args(int argc, char **argv)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	uint32_t lcore_id;
 	int ret;
examples/qos_meter/main.h +0 -9
index 7bffce5..530bf69 100644
@@ -48,15 +48,6 @@ enum policer_action policer_table[e_RTE_METER_COLORS][e_RTE_METER_COLORS] =
 	{ DROP, DROP, RED}
 };
 
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define MAIN _main
-#else
-#define MAIN main
-#endif
-
-int MAIN(int argc, char **argv);
-
-
 #if APP_MODE == APP_MODE_FWD
 
 #define FUNC_METER(a,b,c,d) color, flow_id=flow_id, pkt_len=pkt_len, time=time
examples/qos_sched/main.c +1 -1
index 19a4f85..ed3cbea 100644
@@ -223,7 +223,7 @@ app_stat(void)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	int ret;
 
examples/qos_sched/main.h +0 -7
index f3b3956..971ec27 100644
@@ -40,12 +40,6 @@ extern "C" {
 
 #include <rte_sched.h>
 
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#error "Baremetal is not supported"
-#else
-#define MAIN main
-#endif
-
 #define RTE_LOGTYPE_APP RTE_LOGTYPE_USER1
 
 /*
@@ -177,7 +171,6 @@ extern struct ring_thresh tx_thresh;
 
 extern struct rte_sched_port_params port_params;
 
-int MAIN(int argc, char **argv);
 int app_parse_args(int argc, char **argv);
 int app_init(void);
 
examples/quota_watermark/qw/main.c +1 -1
index c8bd62f..f269546 100644
@@ -304,7 +304,7 @@ send_stage(__attribute__((unused)) void *args)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
     int ret;
     unsigned int lcore_id, master_lcore_id, last_lcore_id;
examples/quota_watermark/qw/main.h +0 -9
index 3b78324..79d3c26 100644
@@ -36,12 +36,6 @@
 
 #include "../include/conf.h"
 
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define MAIN _main
-#else
-#define MAIN main
-#endif
-
 enum ring_state {
     RING_READY,
     RING_OVERLOADED,
@@ -62,7 +56,4 @@ is_bit_set(int i, unsigned int mask)
     return ((1 << i) & mask);
 }
 
-
-int MAIN(int argc, char **argv);
-
 #endif /* _MAIN_H_ */
examples/quota_watermark/qwctl/qwctl.c +1 -1
index 8bf9e33..eb2f618 100644
@@ -71,7 +71,7 @@ setup_shared_variables(void)
     low_watermark = (unsigned int *) qw_memzone->addr + sizeof(int);
 }
 
-int MAIN(int argc, char **argv)
+int main(int argc, char **argv)
 {
     int ret;
     struct cmdline *cl;
examples/quota_watermark/qwctl/qwctl.h +0 -8
index 4209307..8d146e5 100644
@@ -34,15 +34,7 @@
 #ifndef _MAIN_H_
 #define _MAIN_H_
 
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define MAIN _main
-#else
-#define MAIN main
-#endif
-
 extern int *quota;
 extern unsigned int *low_watermark;
 
-int MAIN(int argc, char **argv);
-
 #endif /* _MAIN_H_ */
examples/timer/main.c +1 -3
index a5ff015..5a5d33c 100644
@@ -49,8 +49,6 @@
 #include <rte_timer.h>
 #include <rte_debug.h>
 
-#include "main.h"
-
 #define TIMER_RESOLUTION_CYCLES 20000000ULL /* around 10ms at 2 Ghz */
 
 static struct rte_timer timer0;
@@ -115,7 +113,7 @@ lcore_mainloop(__attribute__((unused)) void *arg)
 }
 
 int
-MAIN(int argc, char **argv)
+main(int argc, char **argv)
 {
 	int ret;
 	uint64_t hz;
examples/timer/main.h deleted +0 -45

45 lines not on this page · raw message

examples/vhost/main.c +3 -3
index c81b8f5..b01df51 100644
@@ -3528,7 +3528,7 @@ setup_mempool_tbl(int socket, uint32_t index, char *pool_name,
  * device is also registered here to handle the IOCTLs.
  */
 int
-MAIN(int argc, char *argv[])
+main(int argc, char *argv[])
 {
 	struct rte_mempool *mbuf_pool = NULL;
 	unsigned lcore_id, core_id = 0;
@@ -3694,10 +3694,10 @@ MAIN(int argc, char *argv[])
 			}
 
 			LOG_DEBUG(VHOST_CONFIG,
-				"in MAIN: mbuf count in mempool at initial "
+				"in main: mbuf count in mempool at initial "
 				"is: %d\n", count_in_mempool);
 			LOG_DEBUG(VHOST_CONFIG,
-				"in MAIN: mbuf count in  ring at initial  is :"
+				"in main: mbuf count in  ring at initial  is :"
 				" %d\n",
 				rte_ring_count(vpool_array[index].ring));
 		}
examples/vhost/main.h +0 -7
index c15d938..6d75da0 100644
@@ -34,12 +34,6 @@
 #ifndef _MAIN_H_
 #define _MAIN_H_
 
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define MAIN _main
-#else
-#define MAIN main
-#endif
-
 //#define DEBUG
 
 #ifdef DEBUG
@@ -82,5 +76,4 @@ struct lcore_info
 	struct lcore_ll_info	*lcore_ll;	/* Pointer to data core specific lcore_ll_info struct */
 };
 
-int MAIN(int argc, char **argv);
 #endif /* _MAIN_H_ */
examples/vhost_xen/main.c +1 -1
index 498de06..8d62f8d 100644
@@ -1445,7 +1445,7 @@ int init_virtio_net(struct virtio_net_device_ops const * const ops);
  * device is also registered here to handle the IOCTLs.
  */
 int
-MAIN(int argc, char *argv[])
+main(int argc, char *argv[])
 {
 	struct rte_mempool *mbuf_pool;
 	unsigned lcore_id, core_id = 0;
examples/vhost_xen/main.h +0 -8
index 4010766..481572e 100644
@@ -34,12 +34,6 @@
 #ifndef _MAIN_H_
 #define _MAIN_H_
 
-#ifdef RTE_EXEC_ENV_BAREMETAL
-#define MAIN _main
-#else
-#define MAIN main
-#endif
-
 //#define DEBUG
 
 #ifdef DEBUG
@@ -80,6 +74,4 @@ struct lcore_info
 {
 	struct lcore_ll_info	*lcore_ll;	/* Pointer to data core specific lcore_ll_info struct */
 };
-
-int MAIN(int argc, char **argv);
 #endif /* _MAIN_H_ */
examples/vmdq/main.c +1 -7
index a162d8b..2d93bbf 100644
@@ -70,8 +70,6 @@
 #include <rte_mbuf.h>
 #include <rte_memcpy.h>
 
-#include "main.h"
-
 #define MAX_QUEUES 128
 /*
  * For 10 GbE, 128 queues require roughly
@@ -454,7 +452,6 @@ update_mac_address(struct rte_mbuf *m, unsigned dst_port)
 	ether_addr_copy(&vmdq_ports_eth_addr[dst_port], &eth->s_addr);
 }
 
-#ifndef RTE_EXEC_ENV_BAREMETAL
 /* When we receive a HUP signal, print out our stats */
 static void
 sighup_handler(int signum)
@@ -467,7 +464,6 @@ sighup_handler(int signum)
 	}
 	printf("\nFinished handling signal %d\n", signum);
 }
-#endif
 
 /*
  * Main thread that does the work, reading from INPUT_PORT
@@ -573,7 +569,7 @@ static unsigned check_ports_num(unsigned nb_ports)
 
 /* Main function, does initialisation and calls the per-lcore functions */
 int
-MAIN(int argc, char *argv[])
+main(int argc, char *argv[])
 {
 	struct rte_mempool *mbuf_pool;
 	unsigned lcore_id, core_id = 0;
@@ -581,9 +577,7 @@ MAIN(int argc, char *argv[])
 	unsigned nb_ports, valid_num_ports;
 	uint8_t portid;
 
-#ifndef RTE_EXEC_ENV_BAREMETAL
 	signal(SIGHUP, sighup_handler);
-#endif
 
 	/* init EAL */
 	ret = rte_eal_init(argc, argv);
examples/vmdq/main.h deleted +0 -46

46 lines not on this page · raw message

examples/vmdq_dcb/main.c +1 -7
index 2f708a1..a09a972 100644
@@ -70,8 +70,6 @@
 #include <rte_mbuf.h>
 #include <rte_memcpy.h>
 
-#include "main.h"
-
 /* basic constants used in application */
 #define NUM_QUEUES 128
 
@@ -341,7 +339,6 @@ vmdq_parse_args(int argc, char **argv)
 }
 
 
-#ifndef RTE_EXEC_ENV_BAREMETAL
 /* When we receive a HUP signal, print out our stats */
 static void
 sighup_handler(int signum)
@@ -354,7 +351,6 @@ sighup_handler(int signum)
 	}
 	printf("\nFinished handling signal %d\n", signum);
 }
-#endif
 
 /*
  * Main thread that does the work, reading from INPUT_PORT
@@ -429,7 +425,7 @@ static unsigned check_ports_num(unsigned nb_ports)
 
 /* Main function, does initialisation and calls the per-lcore functions */
 int
-MAIN(int argc, char *argv[])
+main(int argc, char *argv[])
 {
 	unsigned cores;
 	struct rte_mempool *mbuf_pool;
@@ -439,9 +435,7 @@ MAIN(int argc, char *argv[])
 	unsigned nb_ports, valid_num_ports;
 	uint8_t portid;
 
-#ifndef RTE_EXEC_ENV_BAREMETAL
 	signal(SIGHUP, sighup_handler);
-#endif
 
 	/* init EAL */
 	ret = rte_eal_init(argc, argv);
examples/vmdq_dcb/main.h deleted +0 -46

46 lines not on this page · raw message

Signature · 1 line
2.0.4
Acked-by
#7 lore raw
In reply to a message not in the archive
Quoted 5 lines · Thomas Monjalon

There are some references to bare metal (i.e. without OS) support, especially some options to build a libc with DPDK.
As there are currently no such support, it can be removed. Some comments are cleaned in the same time.

Quoted 10 lines

Thanks to David for having done most of this effort:
config: no more bare metal environment
mk: no more bare metal environment
eal: no more bare metal environment
app: no more bare metal environment
examples: no more bare metal environment

Signature · 1 line
Thomas

A message that is not in the archive (sent off-list or not yet received): 20140926141343.GF3930-B26myB8xz7F8NnZeBjwnZQMhkBWG/[email protected]

#9 lore raw

2014-09-26 10:13, Neil Horman:

Quoted 6 lines · Thomas Monjalon
Quoted 5 lines

There are some references to bare metal (i.e. without OS) support, especially some options to build a libc with DPDK.
As there are currently no such support, it can be removed. Some comments are cleaned in the same time.

Quoted 8 lines
Quoted 7 lines

Thanks to David for having done most of this effort:
config: no more bare metal environment
mk: no more bare metal environment
eal: no more bare metal environment
app: no more bare metal environment
examples: no more bare metal environment

I've updated the patchset and applied it.
It's possible that there are still some remains of the bare metal support. Do not hesitate to submit such clean-up.

Signature · 1 line
Thomas