summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile16
-rw-r--r--build-data/platforms/vpp.mk5
-rw-r--r--build-data/platforms/vpp_lite.mk50
-rw-r--r--src/configure.ac4
-rw-r--r--src/plugins/Makefile.am6
-rw-r--r--src/plugins/ixge.am20
-rw-r--r--src/plugins/ixge/ixge.c (renamed from src/vnet/devices/nic/ixge.c)11
-rw-r--r--src/plugins/ixge/ixge.h (renamed from src/vnet/devices/nic/ixge.h)2
-rw-r--r--src/vlib/buffer.c6
-rw-r--r--src/vnet.am14
-rw-r--r--src/vnet/ethernet/sfp.c (renamed from src/vnet/devices/nic/sfp.c)2
-rw-r--r--src/vnet/ethernet/sfp.h (renamed from src/vnet/devices/nic/sfp.h)0
-rw-r--r--src/vpp-api/lua/bench.lua4
-rw-r--r--src/vpp-api/lua/examples/cli/lua-cli.lua4
-rw-r--r--src/vpp-api/lua/examples/example-classifier.lua4
-rw-r--r--src/vpp-api/lua/examples/example-cli.lua4
-rw-r--r--src/vpp/vnet/main.c3
-rw-r--r--test/framework.py4
18 files changed, 67 insertions, 92 deletions
diff --git a/Makefile b/Makefile
index f0173cc1757..1527d60a793 100644
--- a/Makefile
+++ b/Makefile
@@ -230,18 +230,18 @@ define test
endef
test: bootstrap
- $(call test,vpp_lite,vpp_lite,test)
+ $(call test,vpp,vpp,test)
test-debug: bootstrap
- $(call test,vpp_lite,vpp_lite_debug,test)
+ $(call test,vpp,vpp_debug,test)
test-all: bootstrap
$(eval EXTENDED_TESTS=yes)
- $(call test,vpp_lite,vpp_lite,test)
+ $(call test,vpp,vpp,test)
test-all-debug: bootstrap
$(eval EXTENDED_TESTS=yes)
- $(call test,vpp_lite,vpp_lite_debug,test)
+ $(call test,vpp,vpp_debug,test)
test-help:
@make -C test help
@@ -262,7 +262,7 @@ test-wipe-doc:
@make -C test wipe-doc
test-cov: bootstrap
- $(call test,vpp_lite,vpp_lite_gcov,cov)
+ $(call test,vpp,vpp_gcov,cov)
test-wipe-cov:
@make -C test wipe-cov
@@ -271,10 +271,10 @@ test-checkstyle:
@make -C test checkstyle
retest:
- $(call test,vpp_lite,vpp_lite,retest)
+ $(call test,vpp,vpp,retest)
retest-debug:
- $(call test,vpp_lite,vpp_lite_debug,retest)
+ $(call test,vpp,vpp_debug,retest)
STARTUP_DIR ?= $(PWD)
ifeq ("$(wildcard $(STARTUP_CONF))","")
@@ -376,8 +376,6 @@ endef
verify: install-dep $(BR)/.bootstrap.ok dpdk-install-dev
$(call banner,"Building for PLATFORM=vpp using gcc")
@make -C build-root PLATFORM=vpp TAG=vpp wipe-all install-packages
- $(call banner,"Building for PLATFORM=vpp_lite using gcc")
- @make -C build-root PLATFORM=vpp_lite TAG=vpp_lite wipe-all install-packages
ifeq ($(OS_ID)-$(OS_VERSION_ID),ubuntu-16.04)
$(call banner,"Installing dependencies")
@sudo -E apt-get update
diff --git a/build-data/platforms/vpp.mk b/build-data/platforms/vpp.mk
index 401a383ad92..c61375d8994 100644
--- a/build-data/platforms/vpp.mk
+++ b/build-data/platforms/vpp.mk
@@ -35,11 +35,6 @@ vpp_uses_dpdk = yes
vpp_root_packages = vpp gmod
-vpp_configure_args_vpp = --with-dpdk
-
-# Set these parameters carefully. The vlib_buffer_t is 128 bytes, i.e.
-vlib_configure_args_vpp = --with-pre-data=128
-
# DPDK configuration parameters
# vpp_uses_dpdk_cryptodev_sw = yes
# vpp_uses_dpdk_mlx5_pmd = yes
diff --git a/build-data/platforms/vpp_lite.mk b/build-data/platforms/vpp_lite.mk
deleted file mode 100644
index a556b4879e9..00000000000
--- a/build-data/platforms/vpp_lite.mk
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (c) 2016 Cisco and/or its affiliates.
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at:
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# vector packet processor
-vpp_lite_arch = native
-ifeq ($(shell uname -m),x86_64)
-vpp_lite_march = corei7 # Nehalem Instruction set
-vpp_lite_mtune = corei7-avx # Optimize for Sandy Bridge
-else
-vpp_lite_march = native
-vpp_lite_mtune = generic
-endif
-vpp_lite_native_tools = vppapigen
-
-vpp_lite_uses_dpdk = no
-
-# Uncoment to enable building unit tests
-#vpp_lite_enable_tests = yes
-
-vpp_lite_root_packages = vpp gmod
-
-vlib_configure_args_vpp_lite = --with-pre-data=128
-
-vnet_configure_args_vpp_lite =
-vpp_configure_args_vpp_lite =
-
-vpp_lite_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
- -fstack-protector-all -fPIC -Werror
-vpp_lite_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -DFORTIFY_SOURCE=2 -march=$(MARCH) \
- -fstack-protector-all -fPIC -Werror
-
-vpp_lite_TAG_CFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
- -fstack-protector -fPIC -Werror
-vpp_lite_TAG_LDFLAGS = -g -O2 -DFORTIFY_SOURCE=2 -march=$(MARCH) -mtune=$(MTUNE) \
- -fstack-protector -fPIC -Werror
-
-vpp_lite_gcov_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
- -fPIC -Werror -fprofile-arcs -ftest-coverage
-vpp_lite_gcov_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG -march=$(MARCH) \
- -fPIC -Werror -coverage
diff --git a/src/configure.ac b/src/configure.ac
index c22d152e325..d90740d9fef 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -97,7 +97,6 @@ DISABLE_ARG(papi, [Disable Python API bindings])
DISABLE_ARG(japi, [Disable Java API bindings])
# --with-X
-WITH_ARG(dpdk, [Use use DPDK])
WITH_ARG(dpdk_crypto_sw,[Use DPDK cryptodev SW PMDs])
WITH_ARG(dpdk_mlx5_pmd, [Use DPDK with mlx5 PMD])
@@ -130,7 +129,6 @@ AC_ARG_WITH(pre-data,
AC_SUBST(PRE_DATA_SIZE, [$with_pre_data])
AC_SUBST(APICLI, [-DVPP_API_TEST_BUILTIN=${n_with_apicli}])
-AC_DEFINE_UNQUOTED(DPDK, [${n_with_dpdk}])
AC_DEFINE_UNQUOTED(DPDK_SHARED_LIB, [${n_enable_dpdk_shared}])
AC_DEFINE_UNQUOTED(DPDK_CRYPTO_SW, [${n_with_dpdk_crypto_sw}])
AC_DEFINE_UNQUOTED(WITH_LIBSSL, [${n_with_libssl}])
@@ -147,9 +145,11 @@ AC_SUBST(AR_FLAGS)
# Please keep alphabetical order
PLUGIN_ENABLED(acl)
+PLUGIN_ENABLED(dpdk)
PLUGIN_ENABLED(flowperpkt)
PLUGIN_ENABLED(ila)
PLUGIN_ENABLED(ioam)
+PLUGIN_ENABLED(ixge)
PLUGIN_ENABLED(lb)
PLUGIN_ENABLED(sixrd)
PLUGIN_ENABLED(snat)
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 7b36049edd6..255e644f089 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -33,7 +33,7 @@ if ENABLE_ACL_PLUGIN
include acl.am
endif
-if WITH_DPDK
+if ENABLE_DPDK_PLUGIN
include dpdk.am
endif
@@ -49,6 +49,10 @@ if ENABLE_IOAM_PLUGIN
include ioam.am
endif
+if ENABLE_IXGE_PLUGIN
+include ixge.am
+endif
+
if ENABLE_LB_PLUGIN
include lb.am
endif
diff --git a/src/plugins/ixge.am b/src/plugins/ixge.am
new file mode 100644
index 00000000000..7e61344b50f
--- /dev/null
+++ b/src/plugins/ixge.am
@@ -0,0 +1,20 @@
+# Copyright (c) 2016 Cisco Systems, Inc.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+vppplugins_LTLIBRARIES += ixge_plugin.la
+
+ixge_plugin_la_SOURCES = ixge/ixge.c
+
+noinst_HEADERS += ixge/ixge.h
+
+# vi:syntax=automake
diff --git a/src/vnet/devices/nic/ixge.c b/src/plugins/ixge/ixge.c
index d4c4c6b7414..4eebc457eaa 100644
--- a/src/vnet/devices/nic/ixge.c
+++ b/src/plugins/ixge/ixge.c
@@ -32,8 +32,10 @@ typedef unsigned long long u32x4;
#include <vlib/unix/unix.h>
#include <vlib/pci/pci.h>
#include <vnet/vnet.h>
-#include <vnet/devices/nic/ixge.h>
+#include <ixge/ixge.h>
#include <vnet/ethernet/ethernet.h>
+#include <vnet/plugin/plugin.h>
+#include <vpp/app/version.h>
#define IXGE_ALWAYS_POLL 0
@@ -2929,6 +2931,13 @@ ixge_set_next_node (ixge_rx_next_t next, char *name)
}
#endif
+/* *INDENT-OFF* */
+VLIB_PLUGIN_REGISTER () = {
+ .version = VPP_BUILD_VER,
+ .default_disabled = 1,
+};
+
+/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
*
diff --git a/src/vnet/devices/nic/ixge.h b/src/plugins/ixge/ixge.h
index a8e652dcdab..779603b391b 100644
--- a/src/vnet/devices/nic/ixge.h
+++ b/src/plugins/ixge/ixge.h
@@ -19,7 +19,7 @@
#include <vnet/vnet.h>
#include <vlib/pci/pci.h>
#include <vlib/i2c.h>
-#include <vnet/devices/nic/sfp.h>
+#include <vnet/ethernet/sfp.h>
#include <vnet/ip/ip4_packet.h>
#include <vnet/ip/ip6_packet.h>
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index 6ba82584fcd..a517a5972aa 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -44,6 +44,7 @@
*/
#include <vlib/vlib.h>
+#include <vlib/unix/unix.h>
uword
vlib_buffer_length_in_chain_slow_path (vlib_main_t * vm,
@@ -583,6 +584,11 @@ alloc_from_free_list (vlib_main_t * vm,
dst = alloc_buffers;
+ /* wait with buffer memory allocation as long as possible
+ in case external buffer manager takes over */
+ if (PREDICT_FALSE (vm->os_physmem_alloc_aligned == 0))
+ unix_physmem_init (vm, 0 /* fail_if_physical_memory_not_present */ );
+
n_filled = fill_free_list (vm, free_list, n_alloc_buffers);
if (n_filled == 0)
return 0;
diff --git a/src/vnet.am b/src/vnet.am
index ca24c9c596e..bc9655cc1a2 100644
--- a/src/vnet.am
+++ b/src/vnet.am
@@ -114,14 +114,16 @@ libvnet_la_SOURCES += \
vnet/ethernet/init.c \
vnet/ethernet/interface.c \
vnet/ethernet/node.c \
- vnet/ethernet/pg.c
+ vnet/ethernet/pg.c \
+ vnet/ethernet/sfp.c
nobase_include_HEADERS += \
vnet/ethernet/arp_packet.h \
vnet/ethernet/error.def \
vnet/ethernet/ethernet.h \
vnet/ethernet/packet.h \
- vnet/ethernet/types.def
+ vnet/ethernet/types.def \
+ vnet/ethernet/sfp.h
########################################
# Layer 2 protocol: Ethernet bridging
@@ -792,14 +794,6 @@ nobase_include_HEADERS += \
vnet/pg/pg.h \
vnet/pg/edit.h
-if !WITH_DPDK
-libvnet_la_SOURCES += \
- vnet/devices/nic/ixge.c \
- vnet/devices/nic/ixge.h \
- vnet/devices/nic/sfp.c \
- vnet/devices/nic/sfp.h
-endif
-
########################################
# virtio
########################################
diff --git a/src/vnet/devices/nic/sfp.c b/src/vnet/ethernet/sfp.c
index 9e9c008dc15..624740e3d52 100644
--- a/src/vnet/devices/nic/sfp.c
+++ b/src/vnet/ethernet/sfp.c
@@ -13,7 +13,7 @@
* limitations under the License.
*/
-#include <vnet/devices/nic/sfp.h>
+#include <vnet/ethernet/sfp.h>
static u8 *
format_space_terminated (u8 * s, va_list * args)
diff --git a/src/vnet/devices/nic/sfp.h b/src/vnet/ethernet/sfp.h
index a1ac7997a44..a1ac7997a44 100644
--- a/src/vnet/devices/nic/sfp.h
+++ b/src/vnet/ethernet/sfp.h
diff --git a/src/vpp-api/lua/bench.lua b/src/vpp-api/lua/bench.lua
index 8e5a0b4b101..c7231b90650 100644
--- a/src/vpp-api/lua/bench.lua
+++ b/src/vpp-api/lua/bench.lua
@@ -53,9 +53,9 @@ function do_bench()
end
root_dir = "/home/ubuntu/vpp"
-pneum_path = root_dir .. "/build-root/install-vpp_lite_debug-native/vpp-api/lib64/libpneum.so"
+pneum_path = root_dir .. "/build-root/install-vpp_debug-native/vpp-api/lib64/libpneum.so"
vpp:init({ pneum_path = pneum_path })
-vpp:json_api(root_dir .. "/build-root/install-vpp_lite_debug-native/vpp/vpp-api/vpe.api.json")
+vpp:json_api(root_dir .. "/build-root/install-vpp_debug-native/vpp/vpp-api/vpe.api.json")
vpp:connect("lua-bench")
local n_tests = 10
diff --git a/src/vpp-api/lua/examples/cli/lua-cli.lua b/src/vpp-api/lua/examples/cli/lua-cli.lua
index b3a24d7d0ef..4a27af53604 100644
--- a/src/vpp-api/lua/examples/cli/lua-cli.lua
+++ b/src/vpp-api/lua/examples/cli/lua-cli.lua
@@ -557,12 +557,12 @@ end
function init_vpp(vpp)
local root_dir = "/home/ubuntu/vpp"
- local pneum_path = root_dir .. "/build-root/install-vpp_lite_debug-native/vpp-api/lib64/libpneum.so"
+ local pneum_path = root_dir .. "/build-root/install-vpp_debug-native/vpp-api/lib64/libpneum.so"
vpp:init({ pneum_path = pneum_path })
vpp:init({ pneum_path = pneum_path })
- vpp:json_api(root_dir .. "/build-root/install-vpp_lite_debug-native/vpp/vpp-api/vpe.api.json")
+ vpp:json_api(root_dir .. "/build-root/install-vpp_debug-native/vpp/vpp-api/vpe.api.json")
diff --git a/src/vpp-api/lua/examples/example-classifier.lua b/src/vpp-api/lua/examples/example-classifier.lua
index ec9c3d3e020..b1270757550 100644
--- a/src/vpp-api/lua/examples/example-classifier.lua
+++ b/src/vpp-api/lua/examples/example-classifier.lua
@@ -20,12 +20,12 @@ local vpp = require "vpp-lapi"
local bit = require("bit")
root_dir = "/home/ubuntu/vpp"
-pneum_path = root_dir .. "/build-root/install-vpp_lite_debug-native/vpp-api/lib64/libpneum.so"
+pneum_path = root_dir .. "/build-root/install-vpp_debug-native/vpp-api/lib64/libpneum.so"
vpp:init({ pneum_path = pneum_path })
-vpp:json_api(root_dir .. "/build-root/install-vpp_lite_debug-native/vpp/vpp-api/vpe.api.json")
+vpp:json_api(root_dir .. "/build-root/install-vpp_debug-native/vpp/vpp-api/vpe.api.json")
vpp:connect("aytest")
diff --git a/src/vpp-api/lua/examples/example-cli.lua b/src/vpp-api/lua/examples/example-cli.lua
index 8b84989f1f6..85425caff0b 100644
--- a/src/vpp-api/lua/examples/example-cli.lua
+++ b/src/vpp-api/lua/examples/example-cli.lua
@@ -18,11 +18,11 @@
vpp = require "vpp-lapi"
root_dir = "/home/ubuntu/vpp"
-pneum_path = root_dir .. "/build-root/install-vpp_lite_debug-native/vpp-api/lib64/libpneum.so"
+pneum_path = root_dir .. "/build-root/install-vpp_debug-native/vpp-api/lib64/libpneum.so"
vpp:init({ pneum_path = pneum_path })
-vpp:json_api(root_dir .. "/build-root/install-vpp_lite_debug-native/vpp/vpp-api/vpe.api.json")
+vpp:json_api(root_dir .. "/build-root/install-vpp_debug-native/vpp/vpp-api/vpe.api.json")
vpp:connect("aytest")
diff --git a/src/vpp/vnet/main.c b/src/vpp/vnet/main.c
index a566d956dfe..d6a1232515f 100644
--- a/src/vpp/vnet/main.c
+++ b/src/vpp/vnet/main.c
@@ -199,9 +199,6 @@ defaulted:
{
vm->init_functions_called = hash_create (0, /* value bytes */ 0);
vpe_main_init (vm);
-#if DPDK == 0
- unix_physmem_init (vm, 0 /* fail_if_physical_memory_not_present */ );
-#endif
return vlib_unix_main (argc, argv);
}
else
diff --git a/test/framework.py b/test/framework.py
index 6b1799a5544..a0284e37c28 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -157,7 +157,9 @@ class VppTestCase(unittest.TestCase):
cls.vpp_cmdline = [cls.vpp_bin, "unix",
"{", "nodaemon", debug_cli, coredump_size, "}",
"api-trace", "{", "on", "}",
- "api-segment", "{", "prefix", cls.shm_prefix, "}"]
+ "api-segment", "{", "prefix", cls.shm_prefix, "}",
+ "plugins", "{", "plugin", "dpdk_plugin.so", "{",
+ "disable", "}", "}"]
if cls.plugin_path is not None:
cls.vpp_cmdline.extend(["plugin_path", cls.plugin_path])
cls.logger.info("vpp_cmdline: %s" % cls.vpp_cmdline)