aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2017-03-09 20:38:15 +0100
committerDave Barach <openvpp@barachs.net>2017-03-10 19:35:49 +0000
commit374e2c5fc30a5bfabfd2eb6c2d3ca5797402af16 (patch)
treef7ad7280f4f917bec47d5708b3a0a84cffcc9ace /src
parente9d52d54361296af520e1ece0c25307a2d86c018 (diff)
Retire vpp_lite
vpp_lite platform is not needed anymore as same efect can be achieved with following startup.conf config: plugins { plugin dpdk_plugin.so { disable } } Change-Id: I690ea8ceb1c6e1fe32e01e7da54e9958019a93bf Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src')
-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
14 files changed, 57 insertions, 27 deletions
diff --git a/src/configure.ac b/src/configure.ac
index c22d152e..d90740d9 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 7b36049e..255e644f 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 00000000..7e61344b
--- /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 d4c4c6b7..4eebc457 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 a8e652dc..779603b3 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 6ba82584..a517a597 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 ca24c9c5..bc9655cc 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 9e9c008d..624740e3 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 a1ac7997..a1ac7997 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 8e5a0b4b..c7231b90 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 b3a24d7d..4a27af53 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 ec9c3d3e..b1270757 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 8b84989f..85425caf 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 a566d956..d6a12325 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