aarch64 CPU arch / ThunderX platform initial support
Change-Id: Ia2edd3cee2c25c26c7c47a9023744b97226434c7 Signed-off-by: Dave Barach <dave@barachs.net>
This commit is contained in:
55
build-data/packages/cavium-dpdk.mk
Normal file
55
build-data/packages/cavium-dpdk.mk
Normal file
@ -0,0 +1,55 @@
|
||||
# Temporary until Cavium upstreams their work
|
||||
|
||||
cavium-dpdk_configure = \
|
||||
src_dir=$(call find_source_fn,$(PACKAGE_SOURCE)) ; \
|
||||
dst_dir=$(PACKAGE_BUILD_DIR) ; \
|
||||
tar -C $${src_dir} -cf - . | tar -C $${dst_dir} -xf - ; \
|
||||
cd $${dst_dir} ; \
|
||||
: colossal hemorrhoid to configure headroom ; \
|
||||
if [ x$($(PACKAGE)_configure_args_$(PLATFORM)) = "x" ] ; then \
|
||||
HR=256 ; \
|
||||
else \
|
||||
dpdk_configure_args=$($(PACKAGE)_configure_args_$(PLATFORM)) ; \
|
||||
if [ $$dpdk_configure_args = "--with-headroom=256" ] ; then \
|
||||
HR=256 ; \
|
||||
elif [ $$dpdk_configure_args = "--with-headroom=384" ] ; then \
|
||||
HR=384 ; \
|
||||
else \
|
||||
HR=256 ; \
|
||||
fi ; \
|
||||
fi ; \
|
||||
env HR=$$HR \
|
||||
spp -o \
|
||||
$(PACKAGE_BUILD_DIR)/config/common_linuxapp \
|
||||
$(PACKAGE_BUILD_DIR)/config/common_linuxapp.spp \
|
||||
; \
|
||||
env $(CONFIGURE_ENV) \
|
||||
make config T=arm64-thunderx-linuxapp-gcc RTE_ARCH=arm64 \
|
||||
CC=aarch64-thunderx-linux-gnu-gcc V=0 \
|
||||
RTE_SDK=$(PACKAGE_BUILD_DIR) \
|
||||
RTE_TARGET=arm-default-linuxapp-gcc
|
||||
|
||||
# Note: add e.g. "-O0" to EXTRA_CFLAGS if desired: EXTRA_CFLAGS='-g -O0'
|
||||
|
||||
cavium-dpdk_make_args = install T=arm64-thunderx-linuxapp-gcc RTE_ARCH=arm64 \
|
||||
CC=aarch64-thunderx-linux-gnu-gcc V=0 \
|
||||
RTE_SDK=$(PACKAGE_BUILD_DIR) \
|
||||
RTE_TARGET=arm-default-linuxapp-gcc
|
||||
|
||||
cavium-dpdk_install = \
|
||||
src_dir=$(PACKAGE_BUILD_DIR) ; \
|
||||
dst_dir=$(PACKAGE_INSTALL_DIR) ; \
|
||||
tar -h -C $${src_dir}/arm64-thunderx-linuxapp-gcc -cf - . \
|
||||
| tar -C $${dst_dir} -xf -
|
||||
|
||||
# dpdk libraries end up in .../lib not .../lib64. Fix it.
|
||||
cavium-dpdk_post_install = \
|
||||
if [ "$(arch_lib_dir)" != "lib" ] ; then \
|
||||
mkdir -p $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir) ; \
|
||||
cd $(PACKAGE_INSTALL_DIR)/lib ; \
|
||||
tar cf - . | ( cd $(PACKAGE_INSTALL_DIR)/$(arch_lib_dir); tar xf - ) ; \
|
||||
fi
|
||||
|
||||
# nothing to install, all static libraries
|
||||
cavium-dpdk_image_include = echo
|
||||
|
@ -9,7 +9,7 @@ sample-plugin_configure_depend = \
|
||||
vpp-api-test-install
|
||||
|
||||
#
|
||||
sample-plugin_configure_args = --with-q-platform=$(PLATFORM) --with-dpdk
|
||||
sample-plugin_configure_args = --with-dpdk
|
||||
|
||||
sample-plugin_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
|
6
build-data/packages/vlib-api-cavium-dpdk.mk
Normal file
6
build-data/packages/vlib-api-cavium-dpdk.mk
Normal file
@ -0,0 +1,6 @@
|
||||
vlib-api-cavium-dpdk_source = vlib-api
|
||||
|
||||
vlib-api-cavium-dpdk_configure_depend = vppinfra-install svm-install vlib-cavium-dpdk-install
|
||||
|
||||
vlib-api-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, vppinfra svm vlib-cavium-dpdk)
|
||||
vlib-api-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, vppinfra svm vlib-cavium-dpdk)
|
@ -2,5 +2,3 @@ vlib-api_configure_depend = vppinfra-install svm-install vlib-install
|
||||
|
||||
vlib-api_CPPFLAGS = $(call installed_includes_fn, vppinfra svm vlib)
|
||||
vlib-api_LDFLAGS = $(call installed_libs_fn, vppinfra svm vlib)
|
||||
|
||||
vlib-api_top_srcdir = $(call find_source_fn,vlib-api)
|
||||
|
7
build-data/packages/vlib-cavium-dpdk.mk
Normal file
7
build-data/packages/vlib-cavium-dpdk.mk
Normal file
@ -0,0 +1,7 @@
|
||||
vlib-cavium-dpdk_source = vlib
|
||||
vlib-cavium-dpdk_configure_depend = vppinfra-install cavium-dpdk-install
|
||||
|
||||
vlib-cavium-dpdk_configure_args += --with-dpdk
|
||||
|
||||
vlib-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, vppinfra cavium-dpdk)
|
||||
vlib-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, vppinfra cavium-dpdk)
|
29
build-data/packages/vnet-cavium-dpdk.mk
Normal file
29
build-data/packages/vnet-cavium-dpdk.mk
Normal file
@ -0,0 +1,29 @@
|
||||
vnet-cavium-dpdk_source = vnet
|
||||
|
||||
vnet-cavium-dpdk_configure_depend = \
|
||||
vppinfra-install \
|
||||
cavium-dpdk-install \
|
||||
svm-install \
|
||||
vlib-api-cavium-dpdk-install \
|
||||
vlib-cavium-dpdk-install
|
||||
|
||||
|
||||
vnet-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
cavium-dpdk \
|
||||
openssl \
|
||||
svm \
|
||||
vlib-cavium-dpdk \
|
||||
vlib-api-cavium-dpdk)
|
||||
|
||||
vnet-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
cavium-dpdk \
|
||||
openssl \
|
||||
svm \
|
||||
vlib-cavium-dpdk \
|
||||
vlib-api-cavium-dpdk)
|
||||
|
||||
# Platform dependent configure flags
|
||||
vnet-cavium-dpdk_configure_args += $(vnet-cavium-dpdk_configure_args_$(PLATFORM))
|
||||
|
32
build-data/packages/vpp-api-test-cavium-dpdk.mk
Normal file
32
build-data/packages/vpp-api-test-cavium-dpdk.mk
Normal file
@ -0,0 +1,32 @@
|
||||
vpp-api-test-cavium-dpdk_source = vpp-api-test
|
||||
|
||||
vpp-api-test-cavium-dpdk_configure_depend = \
|
||||
vppinfra-install \
|
||||
cavium-dpdk-install \
|
||||
svm-install \
|
||||
vlib-api-cavium-dpdk-install \
|
||||
vlib-cavium-dpdk-install \
|
||||
vnet-cavium-dpdk-install \
|
||||
vpp-cavium-dpdk-install
|
||||
|
||||
#
|
||||
vpp-api-test-cavium-dpdk_configure_args = --with-dpdk
|
||||
|
||||
vpp-api-test-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
cavium-dpdk \
|
||||
svm \
|
||||
vlib-cavium-dpdk \
|
||||
vlib-api-cavium-dpdk \
|
||||
vnet-cavium-dpdk \
|
||||
vpp-cavium-dpdk)
|
||||
|
||||
vpp-api-test-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
cavium-dpdk \
|
||||
svm \
|
||||
vlib-cavium-dpdk \
|
||||
vlib-api-cavium-dpdk \
|
||||
vnet-cavium-dpdk \
|
||||
vpp-cavium-dpdk)
|
||||
|
@ -9,8 +9,7 @@ vpp-api-test-no-dpdk_configure_depend = \
|
||||
vpp-no-dpdk-install
|
||||
|
||||
#
|
||||
vpp-api-test-no-dpdk_configure_args = --with-q-platform=$(PLATFORM) \
|
||||
--with-q-plugin-prefix=$(MU_BUILD_ROOT_DIR)/packages-$(PLATFORM)
|
||||
vpp-api-test-no-dpdk_configure_args =
|
||||
|
||||
vpp-api-test-no-dpdk_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
|
@ -8,24 +8,23 @@ vpp-api-test_configure_depend = \
|
||||
vpp-install
|
||||
|
||||
#
|
||||
vpp-api-test_configure_args = --with-q-platform=$(PLATFORM) --with-dpdk \
|
||||
--with-q-plugin-prefix=$(MU_BUILD_ROOT_DIR)/packages-$(PLATFORM)
|
||||
vpp-api-test_configure_args = --with-dpdk
|
||||
|
||||
vpp-api-test_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
dpdk \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vppinfra \
|
||||
dpdk \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp)
|
||||
|
||||
vpp-api-test_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
dpdk \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vppinfra \
|
||||
dpdk \
|
||||
svm \
|
||||
vlib \
|
||||
vlib-api \
|
||||
vnet \
|
||||
vpp)
|
||||
|
||||
|
30
build-data/packages/vpp-cavium-dpdk.mk
Normal file
30
build-data/packages/vpp-cavium-dpdk.mk
Normal file
@ -0,0 +1,30 @@
|
||||
vpp-cavium-dpdk_source = vpp
|
||||
|
||||
vpp-cavium-dpdk_configure_depend = \
|
||||
vppinfra-install \
|
||||
cavium-dpdk-install \
|
||||
svm-install \
|
||||
vlib-api-cavium-dpdk-install \
|
||||
vlib-cavium-dpdk-install \
|
||||
vnet-cavium-dpdk-install
|
||||
|
||||
# Platform dependent configure flags
|
||||
vpp-cavium-dpdk_configure_args += $(vpp-cavium-dpdk_configure_args_$(PLATFORM))
|
||||
|
||||
vpp-cavium-dpdk_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
cavium-dpdk \
|
||||
openssl \
|
||||
svm \
|
||||
vlib-cavium-dpdk \
|
||||
vlib-api-cavium-dpdk \
|
||||
vnet-cavium-dpdk)
|
||||
|
||||
vpp-cavium-dpdk_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
cavium-dpdk \
|
||||
openssl \
|
||||
svm \
|
||||
vlib-cavium-dpdk \
|
||||
vlib-api-cavium-dpdk \
|
||||
vnet-cavium-dpdk)
|
@ -1,33 +1,32 @@
|
||||
vpp-no-dpdk_source = vpp
|
||||
|
||||
vpp-no-dpdk_configure_depend = \
|
||||
vpp-no-dpdk_configure_depend = \
|
||||
vppinfra-install \
|
||||
openssl-install \
|
||||
openssl-install \
|
||||
svm-install \
|
||||
vlib-api-no-dpdk-install \
|
||||
vlib-no-dpdk-install \
|
||||
vnet-no-dpdk-install \
|
||||
vlib-api-no-dpdk-install \
|
||||
vlib-no-dpdk-install \
|
||||
vnet-no-dpdk-install
|
||||
|
||||
#
|
||||
vpp-no-dpdk_configure_args = --with-q-platform=$(PLATFORM) \
|
||||
--with-q-plugin-prefix=$(MU_BUILD_ROOT_DIR)/packages-$(PLATFORM)
|
||||
vpp-no-dpdk_configure_args =
|
||||
|
||||
# Platform dependent configure flags
|
||||
vpp-no-dpdk_configure_args += $(vpp-no-dpdk_configure_args_$(PLATFORM))
|
||||
|
||||
|
||||
vpp-no-dpdk_CPPFLAGS = $(call installed_includes_fn, \
|
||||
vppinfra \
|
||||
openssl \
|
||||
svm \
|
||||
vppinfra \
|
||||
openssl \
|
||||
svm \
|
||||
vlib-no-dpdk \
|
||||
vlib-api-no-dpdk \
|
||||
vnet-no-dpdk)
|
||||
|
||||
vpp-no-dpdk_LDFLAGS = $(call installed_libs_fn, \
|
||||
vpp-no-dpdk_LDFLAGS = $(call installed_libs_fn, \
|
||||
vppinfra \
|
||||
openssl \
|
||||
svm \
|
||||
vlib-no-dpdk \
|
||||
vlib-api-no-dpdk \
|
||||
vlib-no-dpdk \
|
||||
vlib-api-no-dpdk \
|
||||
vnet-no-dpdk)
|
||||
|
@ -7,8 +7,7 @@ vpp_configure_depend = \
|
||||
vnet-install \
|
||||
|
||||
#
|
||||
vpp_configure_args = --with-q-platform=$(PLATFORM) \
|
||||
--with-q-plugin-prefix=$(MU_BUILD_ROOT_DIR)/packages-$(PLATFORM)
|
||||
vpp_configure_args =
|
||||
|
||||
# Platform dependent configure flags
|
||||
vpp_configure_args += $(vpp_configure_args_$(PLATFORM))
|
||||
|
36
build-data/platforms/thunder.mk
Normal file
36
build-data/platforms/thunder.mk
Normal file
@ -0,0 +1,36 @@
|
||||
# Override OS so we can use the sdk toolchain instead of building one
|
||||
thunder_os = thunderx-linux-gnu
|
||||
|
||||
# Override CROSS_LDFLAGS so we can use
|
||||
# /lib/aarch64-linux-gnu/ld-linux-aarch64.so.1 instead of building glibc
|
||||
thunder_cross_ldflags = \
|
||||
-Wl,--dynamic-linker=/lib/aarch64-linux-gnu/ld-linux-aarch64.so.1 \
|
||||
-Wl,-rpath -Wl,$(lots_of_slashes_to_pad_names)$(TOOL_INSTALL_LIB_DIR)
|
||||
|
||||
thunder_arch = aarch64
|
||||
# suppress -march=foo, the cross compiler doesn't understand it
|
||||
thunder_march = " "
|
||||
|
||||
thunder_root_packages = vppinfra vlib-cavium-dpdk vnet-cavium-dpdk cavium-dpdk \
|
||||
vpp-cavium-dpdk vpp-api-test-cavium-dpdk
|
||||
|
||||
vnet-cavium-dpdk_configure_args_thunder = \
|
||||
--with-dpdk --without-ipsec --without-vcgn --without-ipv6sr
|
||||
|
||||
vpp-cavium-dpdk_configure_args_thunder = \
|
||||
--with-dpdk --without-ipsec --without-vcgn --without-ipv6sr
|
||||
|
||||
cavium-dpdk_configure_args_thunder = --with-headroom=256
|
||||
|
||||
vlib-cavium-dpdk_configure_args_thunder = --with-pre-data=128
|
||||
|
||||
# native tool chain additions for this platform
|
||||
thunder_native_tools = vppapigen
|
||||
|
||||
thunder_debug_TAG_CFLAGS = -g -O0 -DCLIB_DEBUG
|
||||
thunder_debug_TAG_LDFLAGS = -g -O0 -DCLIB_DEBUG
|
||||
|
||||
thunder_TAG_CFLAGS = -g -O2
|
||||
thunder_TAG_LDFLAGS = -g -O2
|
||||
|
||||
|
@ -172,7 +172,12 @@ native_libdir = $($(NATIVE_ARCH)_libdir)
|
||||
arch_lib_dir = lib$($(BASIC_ARCH)_libdir)
|
||||
|
||||
# OS to configure for. configure --host will be set to $(ARCH)-$(OS)
|
||||
OS = mu-linux
|
||||
# Allow per-platform overrides
|
||||
|
||||
OS = $(strip $($(PLATFORM)_os))
|
||||
ifeq ($(OS),)
|
||||
OS = mu-linux
|
||||
endif
|
||||
|
||||
spu_target = spu
|
||||
native_target =
|
||||
@ -506,9 +511,13 @@ DYNAMIC_LINKER=${shell cd $(TOOL_INSTALL_LIB_DIR); echo ld*.so.*}
|
||||
lots_of_slashes_to_pad_names = "/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////"
|
||||
|
||||
# When PLATFORM != native we *always* use our own versions of GLIBC and dynamic linker
|
||||
CROSS_LDFLAGS = \
|
||||
-Wl,--dynamic-linker=$(lots_of_slashes_to_pad_names)$(TOOL_INSTALL_LIB_DIR)/$(DYNAMIC_LINKER) \
|
||||
-Wl,-rpath -Wl,$(lots_of_slashes_to_pad_names)$(TOOL_INSTALL_LIB_DIR)
|
||||
# Allow per-platform overrides
|
||||
CROSS_LDFLAGS = $(strip $($(PLATFORM)_cross_ldflags))
|
||||
ifeq ($(CROSS_LDFLAGS),)
|
||||
CROSS_LDFLAGS = \
|
||||
-Wl,--dynamic-linker=$(lots_of_slashes_to_pad_names)$(TOOL_INSTALL_LIB_DIR)/$(DYNAMIC_LINKER) \
|
||||
-Wl,-rpath -Wl,$(lots_of_slashes_to_pad_names)$(TOOL_INSTALL_LIB_DIR)
|
||||
endif
|
||||
|
||||
cross_ldflags = $(if $(is_native)$(is_build_tool),,$(CROSS_LDFLAGS) )
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign subdir-objects
|
||||
|
||||
AM_CFLAGS = -Wall @DPDK@ @VIRL@
|
||||
AM_CFLAGS = -Wall @DPDK@ @VIRL@ @IPSEC@ @VCGN@ @IPV6SR@
|
||||
|
||||
libvnet_la_SOURCES =
|
||||
libvnetplugin_la_SOURCES =
|
||||
@ -278,7 +278,7 @@ nobase_include_HEADERS += \
|
||||
########################################
|
||||
# Layer 3 protocol: IPSec
|
||||
########################################
|
||||
if WITH_DPDK
|
||||
if WITH_IPSEC
|
||||
libvnet_la_SOURCES += \
|
||||
vnet/ipsec/ipsec.c \
|
||||
vnet/ipsec/ipsec_cli.c \
|
||||
@ -295,13 +295,13 @@ libvnet_la_SOURCES += \
|
||||
vnet/ipsec/ikev2_cli.c \
|
||||
vnet/ipsec/ikev2_payload.c \
|
||||
vnet/ipsec/ikev2_format.c
|
||||
endif
|
||||
|
||||
nobase_include_HEADERS += \
|
||||
vnet/ipsec/ipsec.h \
|
||||
vnet/ipsec/esp.h \
|
||||
vnet/ipsec/ikev2.h \
|
||||
vnet/ipsec/ikev2_priv.h
|
||||
endif
|
||||
|
||||
########################################
|
||||
# Layer 3 protocol: osi
|
||||
@ -441,8 +441,11 @@ nobase_include_HEADERS += \
|
||||
########################################
|
||||
# ipv6 segment routing
|
||||
########################################
|
||||
|
||||
if WITH_IPV6SR
|
||||
libvnet_la_SOURCES += \
|
||||
vnet/sr/sr.c
|
||||
endif
|
||||
|
||||
nobase_include_HEADERS += \
|
||||
vnet/sr/sr_packet.h \
|
||||
@ -452,6 +455,8 @@ nobase_include_HEADERS += \
|
||||
########################################
|
||||
# CGN
|
||||
#########################################
|
||||
|
||||
if WITH_VCGN
|
||||
libvnet_la_SOURCES += \
|
||||
vnet/vcgn/cnat_bulk_port.c \
|
||||
vnet/vcgn/cnat_config.c \
|
||||
@ -480,6 +485,7 @@ libvnet_la_SOURCES += \
|
||||
vnet/vcgn/index_list.c \
|
||||
vnet/vcgn/spp_platform_trace_log.c \
|
||||
vnet/vcgn/vcgn_classify.c
|
||||
endif
|
||||
|
||||
########################################
|
||||
# DHCPv6 proxy
|
||||
|
@ -17,10 +17,34 @@ AC_ARG_WITH(virl,
|
||||
[with_virl=1],
|
||||
[with_virl=0])
|
||||
|
||||
AC_ARG_WITH(ipsec,
|
||||
AC_HELP_STRING([--without-ipsec],[Disable ipsec]),
|
||||
[with_ipsec=0],
|
||||
[with_ipsec=1])
|
||||
|
||||
AC_ARG_WITH(vcgn,
|
||||
AC_HELP_STRING([--without-vcgn],[Disable vcgn]),
|
||||
[with_vcgn=0],
|
||||
[with_vcgn=1])
|
||||
|
||||
AC_ARG_WITH(ipv6sr,
|
||||
AC_HELP_STRING([--without-ipv6sr],[Disable ipv6sr]),
|
||||
[with_ipv6sr=0],
|
||||
[with_ipv6sr=1])
|
||||
|
||||
AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1")
|
||||
AC_SUBST(DPDK,[-DDPDK=${with_dpdk}])
|
||||
|
||||
AM_CONDITIONAL(WITH_VIRL, test "$with_virl" = "1")
|
||||
AC_SUBST(VIRL,[-DVIRL=${with_virl}])
|
||||
|
||||
AM_CONDITIONAL(WITH_IPSEC, test "$with_ipsec" = "1")
|
||||
AC_SUBST(IPSEC,[-DIPSEC=${with_ipsec}])
|
||||
|
||||
AM_CONDITIONAL(WITH_VCGN, test "$with_vcgn" = "1")
|
||||
AC_SUBST(VCGN,[-DVCGN=${with_vcgn}])
|
||||
|
||||
AM_CONDITIONAL(WITH_IPV6SR, test "$with_ipv6sr" = "1")
|
||||
AC_SUBST(IPV6SR,[-DIPV6SR=${with_ipv6sr}])
|
||||
|
||||
AC_OUTPUT([Makefile])
|
||||
|
@ -294,7 +294,9 @@ vnet_classify_find_entry_inline (vnet_classify_table_t * t,
|
||||
u32x4 result __attribute__((aligned(sizeof(u32x4))));
|
||||
vnet_classify_bucket_t * b;
|
||||
u32 value_index;
|
||||
#ifndef __aarch64__
|
||||
u32 result_mask;
|
||||
#endif
|
||||
u32 bucket_index;
|
||||
int i;
|
||||
|
||||
@ -357,6 +359,7 @@ vnet_classify_find_entry_inline (vnet_classify_table_t * t,
|
||||
abort();
|
||||
}
|
||||
|
||||
#ifndef __aarch64__
|
||||
result_mask = u32x4_zero_byte_mask (result);
|
||||
if (result_mask == 0xffff)
|
||||
{
|
||||
@ -367,6 +370,24 @@ vnet_classify_find_entry_inline (vnet_classify_table_t * t,
|
||||
}
|
||||
return (v);
|
||||
}
|
||||
#else
|
||||
{
|
||||
typedef union {u32x4 as_u32x4; u64 as_u64[2];} u64u_t;
|
||||
u64u_t u;
|
||||
u.as_u32x4 = result;
|
||||
|
||||
if (u.as_u64[0] == 0 && u.as_u64[1] == 0)
|
||||
{
|
||||
if (PREDICT_TRUE(now))
|
||||
{
|
||||
v->hits++;
|
||||
v->last_heard = now;
|
||||
}
|
||||
return (v);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
v = vnet_classify_entry_at_index (t, v, 1);
|
||||
}
|
||||
return 0;
|
||||
|
@ -75,6 +75,7 @@ typedef enum {
|
||||
} dpdk_device_type_t;
|
||||
|
||||
#define foreach_dpdk_pmd \
|
||||
_ ("rte_nicvf_pmd", THUNDERX) \
|
||||
_ ("rte_em_pmd", E1000EM) \
|
||||
_ ("rte_igb_pmd", IGB) \
|
||||
_ ("rte_igbvf_pmd", IGBVF) \
|
||||
|
@ -341,6 +341,7 @@ dpdk_lib_init (dpdk_main_t * dm)
|
||||
/* 10G adapters */
|
||||
case VNET_DPDK_PMD_IXGBE:
|
||||
case VNET_DPDK_PMD_IXGBEVF:
|
||||
case VNET_DPDK_PMD_THUNDERX:
|
||||
xd->port_type = VNET_DPDK_PORT_TYPE_ETH_10G;
|
||||
xd->nb_rx_desc = DPDK_NB_RX_DESC_10GE;
|
||||
xd->nb_tx_desc = DPDK_NB_TX_DESC_10GE;
|
||||
@ -1684,6 +1685,22 @@ do { \
|
||||
_(pmd_af_packet_drv)
|
||||
#endif
|
||||
|
||||
#undef _
|
||||
|
||||
/*
|
||||
* At the moment, the ThunderX NIC driver doesn't have
|
||||
* an entry point named "devinitfn_rte_xxx_driver"
|
||||
*/
|
||||
#define _(d) \
|
||||
do { \
|
||||
void d(void); \
|
||||
__attribute__((unused)) void (* volatile pf)(void); \
|
||||
pf = d; \
|
||||
} while(0);
|
||||
|
||||
#ifdef RTE_LIBRTE_THUNDERVNIC_PMD
|
||||
_(rte_nicvf_pmd_init)
|
||||
#endif
|
||||
#undef _
|
||||
|
||||
dm->vlib_main = vm;
|
||||
|
@ -541,6 +541,7 @@ static inline u32 dpdk_device_input ( dpdk_main_t * dm,
|
||||
u32 n_trace, trace_cnt __attribute__((unused));
|
||||
vlib_buffer_free_list_t * fl;
|
||||
u8 efd_discard_burst = 0;
|
||||
u16 ip_align_offset = 0;
|
||||
|
||||
if (xd->admin_up == 0)
|
||||
return 0;
|
||||
@ -559,6 +560,9 @@ static inline u32 dpdk_device_input ( dpdk_main_t * dm,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (xd->pmd == VNET_DPDK_PMD_THUNDERX)
|
||||
ip_align_offset = 6;
|
||||
|
||||
vec_reset_length (xd->d_trace_buffers);
|
||||
trace_cnt = n_trace = vlib_get_trace_count (vm, node);
|
||||
|
||||
@ -706,6 +710,14 @@ static inline u32 dpdk_device_input ( dpdk_main_t * dm,
|
||||
|
||||
b0->current_data = l3_offset0;
|
||||
b0->current_length = mb->data_len - l3_offset0;
|
||||
|
||||
if (PREDICT_FALSE (ip_align_offset != 0))
|
||||
{
|
||||
if (next0 == DPDK_RX_NEXT_IP4_INPUT ||
|
||||
next0 == DPDK_RX_NEXT_IP6_INPUT)
|
||||
b0->current_data += ip_align_offset;
|
||||
}
|
||||
|
||||
b0->flags = VLIB_BUFFER_TOTAL_LENGTH_VALID;
|
||||
|
||||
if (VMWARE_LENGTH_BUG_WORKAROUND)
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include "map.h"
|
||||
|
||||
#ifdef __powerpc64__
|
||||
#if defined(__powerpc64__) || defined(__aarch64__)
|
||||
#include <vppinfra/xxhash.h>
|
||||
|
||||
static inline u32
|
||||
|
@ -51,8 +51,6 @@ _(format_ip6_address_and_length) \
|
||||
_(udp_register_dst_port) \
|
||||
_(ethernet_register_input_type) \
|
||||
_(ethernet_set_flags) \
|
||||
_(vnet_register_sr_app_callback) \
|
||||
_(format_ip6_sr_header) \
|
||||
_(format_ip6_address) \
|
||||
_(unformat_ip6_address) \
|
||||
_(ip6_main) \
|
||||
@ -101,9 +99,18 @@ _(efd_config)
|
||||
#define foreach_dpdk_plugin_reference
|
||||
#endif
|
||||
|
||||
#if IPV6SR > 0
|
||||
#define foreach_ip6_sr_plugin_reference \
|
||||
_(vnet_register_sr_app_callback) \
|
||||
_(format_ip6_sr_header)
|
||||
#else
|
||||
#define foreach_ip6_sr_plugin_reference
|
||||
#endif
|
||||
|
||||
#define _(a) void a (void);
|
||||
foreach_plugin_reference
|
||||
foreach_dpdk_plugin_reference
|
||||
foreach_ip6_sr_plugin_reference
|
||||
#undef _
|
||||
|
||||
void *vnet_library_plugin_references[] =
|
||||
@ -111,6 +118,7 @@ void *vnet_library_plugin_references[] =
|
||||
#define _(a) &a,
|
||||
foreach_plugin_reference
|
||||
foreach_dpdk_plugin_reference
|
||||
foreach_ip6_sr_plugin_reference
|
||||
#undef _
|
||||
};
|
||||
|
||||
|
79
vpp-japi/m4/libtool.m4
vendored
79
vpp-japi/m4/libtool.m4
vendored
@ -1312,7 +1312,7 @@ ia64-*-hpux*)
|
||||
rm -rf conftest*
|
||||
;;
|
||||
|
||||
x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
|
||||
x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
|
||||
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
# Find out which ABI we are using.
|
||||
echo 'int i;' > conftest.$ac_ext
|
||||
@ -1324,9 +1324,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
LD="${LD-ld} -m elf_i386_fbsd"
|
||||
;;
|
||||
x86_64-*linux*)
|
||||
LD="${LD-ld} -m elf_i386"
|
||||
case `/usr/bin/file conftest.o` in
|
||||
*x86-64*)
|
||||
LD="${LD-ld} -m elf32_x86_64"
|
||||
;;
|
||||
*)
|
||||
LD="${LD-ld} -m elf_i386"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
ppc64-*linux*|powerpc64-*linux*)
|
||||
powerpc64le-*)
|
||||
LD="${LD-ld} -m elf32lppclinux"
|
||||
;;
|
||||
powerpc64-*)
|
||||
LD="${LD-ld} -m elf32ppclinux"
|
||||
;;
|
||||
s390x-*linux*)
|
||||
@ -1345,7 +1355,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
|
||||
x86_64-*linux*)
|
||||
LD="${LD-ld} -m elf_x86_64"
|
||||
;;
|
||||
ppc*-*linux*|powerpc*-*linux*)
|
||||
powerpcle-*)
|
||||
LD="${LD-ld} -m elf64lppc"
|
||||
;;
|
||||
powerpc-*)
|
||||
LD="${LD-ld} -m elf64ppc"
|
||||
;;
|
||||
s390*-*linux*|s390*-*tpf*)
|
||||
@ -1688,7 +1701,8 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
|
||||
;;
|
||||
*)
|
||||
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
|
||||
if test -n "$lt_cv_sys_max_cmd_len"; then
|
||||
if test -n "$lt_cv_sys_max_cmd_len" && \
|
||||
test undefined != "$lt_cv_sys_max_cmd_len"; then
|
||||
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
|
||||
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
|
||||
else
|
||||
@ -2512,17 +2526,6 @@ freebsd* | dragonfly*)
|
||||
esac
|
||||
;;
|
||||
|
||||
gnu*)
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
shlibpath_overrides_runpath=no
|
||||
hardcode_into_libs=yes
|
||||
;;
|
||||
|
||||
haiku*)
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
@ -2639,7 +2642,7 @@ linux*oldld* | linux*aout* | linux*coff*)
|
||||
;;
|
||||
|
||||
# This must be glibc/ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
version_type=linux # correct to gnu/linux during the next big refactor
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
@ -2684,6 +2687,18 @@ linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
dynamic_linker='GNU/Linux ld.so'
|
||||
;;
|
||||
|
||||
netbsdelf*-gnu)
|
||||
version_type=linux
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
|
||||
soname_spec='${libname}${release}${shared_ext}$major'
|
||||
shlibpath_var=LD_LIBRARY_PATH
|
||||
shlibpath_overrides_runpath=no
|
||||
hardcode_into_libs=yes
|
||||
dynamic_linker='NetBSD ld.elf_so'
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
version_type=sunos
|
||||
need_lib_prefix=no
|
||||
@ -3243,10 +3258,6 @@ freebsd* | dragonfly*)
|
||||
fi
|
||||
;;
|
||||
|
||||
gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
haiku*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
@ -3285,11 +3296,11 @@ irix5* | irix6* | nonstopux*)
|
||||
;;
|
||||
|
||||
# This must be glibc/ELF.
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
lt_cv_deplibs_check_method=pass_all
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
|
||||
lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
|
||||
else
|
||||
@ -4037,7 +4048,7 @@ m4_if([$1], [CXX], [
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
case $cc_basename in
|
||||
KCC*)
|
||||
# KAI C++ Compiler
|
||||
@ -4101,7 +4112,7 @@ m4_if([$1], [CXX], [
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
;;
|
||||
*qnx* | *nto*)
|
||||
# QNX uses GNU C++, but need to define -shared option too, otherwise
|
||||
@ -4336,7 +4347,7 @@ m4_if([$1], [CXX], [
|
||||
_LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
|
||||
;;
|
||||
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
case $cc_basename in
|
||||
# old Intel for x86_64 which still supported -KPIC.
|
||||
ecc*)
|
||||
@ -4578,6 +4589,9 @@ m4_if([$1], [CXX], [
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux* | k*bsd*-gnu | gnu*)
|
||||
_LT_TAGVAR(link_all_deplibs, $1)=no
|
||||
;;
|
||||
*)
|
||||
_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
|
||||
;;
|
||||
@ -4640,6 +4654,9 @@ dnl Note also adjust exclude_expsyms for C++ above.
|
||||
openbsd*)
|
||||
with_gnu_ld=no
|
||||
;;
|
||||
linux* | k*bsd*-gnu | gnu*)
|
||||
_LT_TAGVAR(link_all_deplibs, $1)=no
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_TAGVAR(ld_shlibs, $1)=yes
|
||||
@ -4861,7 +4878,7 @@ _LT_EOF
|
||||
fi
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
|
||||
wlarc=
|
||||
@ -5038,6 +5055,7 @@ _LT_EOF
|
||||
if test "$aix_use_runtimelinking" = yes; then
|
||||
shared_flag="$shared_flag "'${wl}-G'
|
||||
fi
|
||||
_LT_TAGVAR(link_all_deplibs, $1)=no
|
||||
else
|
||||
# not using gcc
|
||||
if test "$host_cpu" = ia64; then
|
||||
@ -5342,7 +5360,7 @@ _LT_EOF
|
||||
_LT_TAGVAR(link_all_deplibs, $1)=yes
|
||||
;;
|
||||
|
||||
netbsd*)
|
||||
netbsd* | netbsdelf*-gnu)
|
||||
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
|
||||
_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
|
||||
else
|
||||
@ -6222,9 +6240,6 @@ if test "$_lt_caught_CXX_error" != yes; then
|
||||
_LT_TAGVAR(ld_shlibs, $1)=yes
|
||||
;;
|
||||
|
||||
gnu*)
|
||||
;;
|
||||
|
||||
haiku*)
|
||||
_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
|
||||
_LT_TAGVAR(link_all_deplibs, $1)=yes
|
||||
@ -6386,7 +6401,7 @@ if test "$_lt_caught_CXX_error" != yes; then
|
||||
_LT_TAGVAR(inherit_rpath, $1)=yes
|
||||
;;
|
||||
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
|
||||
case $cc_basename in
|
||||
KCC*)
|
||||
# Kuck and Associates, Inc. (KAI) C++ Compiler
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
AUTOMAKE_OPTIONS = foreign subdir-objects
|
||||
|
||||
AM_CFLAGS = -Wall @Q_PLATFORM_DEFINE@ @Q_PLATFORM_PLUGPATH@ @DPDK@
|
||||
AM_CFLAGS = -Wall @DPDK@ @IPSEC@ @VCGN@ @IPV6SR@
|
||||
|
||||
noinst_PROGRAMS =
|
||||
BUILT_SOURCES =
|
||||
@ -75,9 +75,11 @@ if WITH_DPDK
|
||||
vpp_LDADD += -l:libdpdk.a
|
||||
endif
|
||||
|
||||
# These go last
|
||||
vpp_LDADD += -lvppinfra -lm -lpthread -ldl
|
||||
|
||||
vpp_LDADD += -lvppinfra -lm -lpthread -lcrypto -ldl
|
||||
if WITH_IPV6SR
|
||||
vpp_LDADD += -lcrypto
|
||||
endif
|
||||
|
||||
SUFFIXES = .api.h .api
|
||||
|
||||
|
@ -52,7 +52,9 @@
|
||||
#include <vnet/mpls-gre/mpls.h>
|
||||
#include <vnet/dhcp/proxy.h>
|
||||
#include <vnet/dhcp/client.h>
|
||||
#if IPV6SR > 0
|
||||
#include <vnet/sr/sr.h>
|
||||
#endif
|
||||
#include <vnet/dhcpv6/proxy.h>
|
||||
#include <vlib/vlib.h>
|
||||
#include <vlib/unix/unix.h>
|
||||
@ -73,7 +75,9 @@
|
||||
#include <vnet/l2/l2_fib.h>
|
||||
|
||||
#if DPDK > 0
|
||||
#if IPSEC > 0
|
||||
#include <vnet/ipsec/ipsec.h>
|
||||
#endif /* IPSEC */
|
||||
#include <vnet/devices/virtio/vhost-user.h>
|
||||
#endif
|
||||
|
||||
@ -3276,6 +3280,9 @@ static void vl_api_set_arp_neighbor_limit_t_handler (vl_api_set_arp_neighbor_lim
|
||||
static void vl_api_sr_tunnel_add_del_t_handler
|
||||
(vl_api_sr_tunnel_add_del_t *mp)
|
||||
{
|
||||
#if IPV6SR == 0
|
||||
clib_warning ("unimplemented");
|
||||
#else
|
||||
ip6_sr_add_del_tunnel_args_t _a, *a=&_a;
|
||||
int rv = 0;
|
||||
vl_api_sr_tunnel_add_del_reply_t * rmp;
|
||||
@ -3319,6 +3326,7 @@ static void vl_api_sr_tunnel_add_del_t_handler
|
||||
out:
|
||||
|
||||
REPLY_MACRO(VL_API_SR_TUNNEL_ADD_DEL_REPLY);
|
||||
#endif
|
||||
}
|
||||
|
||||
#define foreach_classify_add_del_table_field \
|
||||
@ -4509,6 +4517,10 @@ static void vl_api_input_acl_set_interface_t_handler
|
||||
static void vl_api_ipsec_spd_add_del_t_handler
|
||||
(vl_api_ipsec_spd_add_del_t * mp)
|
||||
{
|
||||
#if IPSEC == 0
|
||||
clib_warning ("unimplemented");
|
||||
#else
|
||||
|
||||
vlib_main_t *vm __attribute__((unused)) = vlib_get_main();
|
||||
vl_api_ipsec_spd_add_del_reply_t * rmp;
|
||||
int rv;
|
||||
@ -4520,6 +4532,7 @@ static void vl_api_ipsec_spd_add_del_t_handler
|
||||
#endif
|
||||
|
||||
REPLY_MACRO(VL_API_IPSEC_SPD_ADD_DEL_REPLY);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void vl_api_ipsec_interface_add_del_spd_t_handler
|
||||
@ -4536,7 +4549,7 @@ static void vl_api_ipsec_interface_add_del_spd_t_handler
|
||||
|
||||
VALIDATE_SW_IF_INDEX(mp);
|
||||
|
||||
#if DPDK > 0
|
||||
#if IPSEC > 0
|
||||
rv = ipsec_set_interface_spd(vm, sw_if_index, spd_id, mp->is_add);
|
||||
#else
|
||||
rv = VNET_API_ERROR_UNIMPLEMENTED;
|
||||
@ -4554,7 +4567,7 @@ static void vl_api_ipsec_spd_add_del_entry_t_handler
|
||||
vl_api_ipsec_spd_add_del_entry_reply_t * rmp;
|
||||
int rv;
|
||||
|
||||
#if DPDK > 0
|
||||
#if IPSEC > 0
|
||||
ipsec_policy_t p;
|
||||
|
||||
p.id = ntohl(mp->spd_id);
|
||||
@ -4604,7 +4617,7 @@ static void vl_api_ipsec_sad_add_del_entry_t_handler
|
||||
vlib_main_t *vm __attribute__((unused)) = vlib_get_main();
|
||||
vl_api_ipsec_sad_add_del_entry_reply_t * rmp;
|
||||
int rv;
|
||||
#if DPDK > 0
|
||||
#if IPSEC > 0
|
||||
ipsec_sa_t sa;
|
||||
|
||||
sa.id = ntohl(mp->sad_id);
|
||||
@ -4830,7 +4843,7 @@ static void vl_api_ipsec_sa_set_key_t_handler
|
||||
vlib_main_t *vm __attribute__((unused)) = vlib_get_main();
|
||||
vl_api_ipsec_sa_set_key_reply_t *rmp;
|
||||
int rv;
|
||||
#if DPDK > 0
|
||||
#if IPSEC > 0
|
||||
ipsec_sa_t sa;
|
||||
sa.id = ntohl(mp->sa_id);
|
||||
sa.crypto_key_len = mp->crypto_key_length;
|
||||
|
@ -42,7 +42,6 @@
|
||||
#include <vppinfra/error.h>
|
||||
|
||||
#include <vnet/vnet.h>
|
||||
#include <vnet/sr/sr.h>
|
||||
#include <vlib/vlib.h>
|
||||
#include <vlib/unix/unix.h>
|
||||
#include <vlibapi/api.h>
|
||||
|
@ -7,27 +7,36 @@ AM_PROG_AS
|
||||
AC_PROG_CC
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
AC_ARG_WITH(q-plugin-prefix,
|
||||
AC_HELP_STRING([--with-q-plugin-prefix],[vlib plugin prefix]),
|
||||
[case $with_q_plugin_prefix in
|
||||
*) ;;
|
||||
esac])
|
||||
|
||||
AC_ARG_WITH(q-platform,
|
||||
AC_HELP_STRING([--with-q-platform],[Build version for given platform (qnative)]),
|
||||
[case $with_q_platform in
|
||||
qnative) ;;
|
||||
*) with_q_platform=qnative;;
|
||||
esac])
|
||||
|
||||
AC_ARG_WITH(dpdk,
|
||||
AC_HELP_STRING([--with-dpdk],[Use the Intel dpdk]),
|
||||
[with_dpdk=1],
|
||||
[with_dpdk=0])
|
||||
|
||||
AC_ARG_WITH(ipsec,
|
||||
AC_HELP_STRING([--without-ipsec],[Disable ipsec]),
|
||||
[with_ipsec=0],
|
||||
[with_ipsec=1])
|
||||
|
||||
AC_ARG_WITH(vcgn,
|
||||
AC_HELP_STRING([--without-vcgn],[Disable vcgn]),
|
||||
[with_vcgn=0],
|
||||
[with_vcgn=1])
|
||||
|
||||
AC_ARG_WITH(ipv6sr,
|
||||
AC_HELP_STRING([--without-ipv6sr],[Disable ipv6sr]),
|
||||
[with_ipv6sr=0],
|
||||
[with_ipv6sr=1])
|
||||
|
||||
AM_CONDITIONAL(WITH_DPDK, test "$with_dpdk" = "1")
|
||||
AC_SUBST(Q_PLATFORM_DEFINE,[-DQ_PLATFORM_${with_q_platform}])
|
||||
AC_SUBST(Q_PLATFORM_PLUGPATH,[-DQ_PLUGIN_PREFIX=${with_q_plugin_prefix}])
|
||||
AC_SUBST(DPDK,[-DDPDK=${with_dpdk}])
|
||||
|
||||
AM_CONDITIONAL(WITH_IPSEC, test "$with_ipsec" = "1")
|
||||
AC_SUBST(IPSEC,[-DIPSEC=${with_ipsec}])
|
||||
|
||||
AM_CONDITIONAL(WITH_VCGN, test "$with_vcgn" = "1")
|
||||
AC_SUBST(VCGN,[-DVCGN=${with_vcgn}])
|
||||
|
||||
AM_CONDITIONAL(WITH_IPV6SR, test "$with_ipv6sr" = "1")
|
||||
AC_SUBST(IPV6SR,[-DIPV6SR=${with_ipv6sr}])
|
||||
|
||||
AC_OUTPUT([Makefile])
|
||||
|
@ -52,8 +52,6 @@ vpe_main_init (vlib_main_t * vm)
|
||||
return error;
|
||||
if ((error = vlib_call_init_function (vm, ethernet_arp_init)))
|
||||
return error;
|
||||
if ((error = vlib_call_init_function (vm, sr_init)))
|
||||
return error;
|
||||
if ((error = vlib_call_init_function (vm, map_init)))
|
||||
return error;
|
||||
if ((error = vlib_call_init_function (vm, sixrd_init)))
|
||||
@ -72,8 +70,10 @@ vpe_main_init (vlib_main_t * vm)
|
||||
return error;
|
||||
if ((error = vlib_call_init_function (vm, vhost_user_init)))
|
||||
return error;
|
||||
#if IPSEC > 0
|
||||
if ((error = vlib_call_init_function (vm, ipsec_init)))
|
||||
return error;
|
||||
#endif /* IPSEC */
|
||||
#endif
|
||||
if ((error = vlib_call_init_function (vm, vlibmemory_init)))
|
||||
return error;
|
||||
@ -102,16 +102,20 @@ vpe_main_init (vlib_main_t * vm)
|
||||
return error;
|
||||
if ((error = vlib_call_init_function (vm, tuntap_init)))
|
||||
return error;
|
||||
#if IPV6SR > 0
|
||||
if ((error = vlib_call_init_function (vm, sr_init)))
|
||||
return error;
|
||||
#endif
|
||||
if ((error = vlib_call_init_function (vm, l2_classify_init)))
|
||||
return error;
|
||||
if ((error = vlib_call_init_function (vm, policer_init)))
|
||||
return error;
|
||||
if ((error = vlib_call_init_function (vm, vxlan_init)))
|
||||
return error;
|
||||
#if VCGN > 0
|
||||
if ((error = vlib_call_init_function (vm, vcgn_init)))
|
||||
return error;
|
||||
#endif
|
||||
if ((error = vlib_call_init_function (vm, li_init)))
|
||||
return error;
|
||||
|
||||
@ -339,6 +343,39 @@ u32 vlib_app_num_thread_stacks_needed (void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Depending on the configuration selected above,
|
||||
* it may be necessary to generate stub graph nodes.
|
||||
* It is never OK to ignore "node 'x' refers to unknown node 'y'
|
||||
* messages!
|
||||
*/
|
||||
|
||||
#if IPV6SR == 0
|
||||
#define foreach_ipv6_sr_stub_node \
|
||||
_(ipsec-output, ipsec_output)
|
||||
#else
|
||||
#define foreach_ipv6_sr_stub_node
|
||||
#endif
|
||||
|
||||
#define _(n,m) \
|
||||
static uword \
|
||||
m##_node_fn (vlib_main_t *vm, \
|
||||
vlib_node_runtime_t *node, \
|
||||
vlib_frame_t *frame) \
|
||||
{ \
|
||||
clib_warning("unimplemented, leaking buffers..."); \
|
||||
return 0; \
|
||||
} \
|
||||
\
|
||||
VLIB_REGISTER_NODE(m##_node) = { \
|
||||
.function = m##_node_fn, \
|
||||
.name = #n, \
|
||||
.vector_size = sizeof(u32), \
|
||||
.type = VLIB_NODE_TYPE_INTERNAL, \
|
||||
};
|
||||
foreach_ipv6_sr_stub_node;
|
||||
#undef _
|
||||
|
||||
#if CLIB_DEBUG > 0
|
||||
|
||||
static clib_error_t *
|
||||
|
@ -50,14 +50,6 @@ crc_u32(u32 data, u32 value)
|
||||
|
||||
static inline u64 clib_bihash_hash_24_8 (clib_bihash_kv_24_8_t *v)
|
||||
{
|
||||
#if 0
|
||||
u64 * dp = (u64 *) &v->key[0];
|
||||
u64 value = 0;
|
||||
|
||||
value __builtin_ia32_crc32di (dp[0], value);
|
||||
value __builtin_ia32_crc32di (dp[1], value);
|
||||
value __builtin_ia32_crc32di (dp[2], value);
|
||||
#endif
|
||||
u32 * dp = (u32 *) &v->key[0];
|
||||
u32 value = 0;
|
||||
|
||||
@ -70,8 +62,7 @@ static inline u64 clib_bihash_hash_24_8 (clib_bihash_kv_24_8_t *v)
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
#else
|
||||
#else
|
||||
static inline u64 clib_bihash_hash_24_8 (clib_bihash_kv_24_8_t *v)
|
||||
{
|
||||
u64 tmp = v->key[0] ^ v->key[1] ^ v->key[2];
|
||||
|
@ -40,7 +40,7 @@
|
||||
|
||||
#include <vppinfra/clib.h>
|
||||
|
||||
#if defined(__x86_64__) || defined(i386)
|
||||
#if defined(__x86_64__) || defined(i386) || defined(__aarch64__)
|
||||
#define CLIB_ARCH_IS_BIG_ENDIAN (0)
|
||||
#define CLIB_ARCH_IS_LITTLE_ENDIAN (1)
|
||||
#else
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user