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
@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
@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))","")
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
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
+++ /dev/null
-# 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
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])
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}])
# 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)
include acl.am
endif
-if WITH_DPDK
+if ENABLE_DPDK_PLUGIN
include dpdk.am
endif
include ioam.am
endif
+if ENABLE_IXGE_PLUGIN
+include ixge.am
+endif
+
if ENABLE_LB_PLUGIN
include lb.am
endif
--- /dev/null
+# 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
#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
}
#endif
+/* *INDENT-OFF* */
+VLIB_PLUGIN_REGISTER () = {
+ .version = VPP_BUILD_VER,
+ .default_disabled = 1,
+};
+
+/* *INDENT-ON* */
/*
* fd.io coding-style-patch-verification: ON
*
#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>
*/
#include <vlib/vlib.h>
+#include <vlib/unix/unix.h>
uword
vlib_buffer_length_in_chain_slow_path (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;
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
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
########################################
* 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)
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
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")
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")
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")
{
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
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)