Compare commits
4 Commits
v22.10-rc1
...
v22.10-rc2
Author | SHA1 | Date | |
---|---|---|---|
|
61bae8a54d | ||
|
582c81e686 | ||
|
9aae8a4a9e | ||
|
569763f948 |
4
.gitignore
vendored
4
.gitignore
vendored
@ -27,8 +27,8 @@
|
||||
/build-config.mk
|
||||
/build/external/*.tar.gz
|
||||
/build/external/*.tar.xz
|
||||
/build/external/vpp-*.deb
|
||||
/build/external/vpp-*.changes
|
||||
/build/external/vpp-*
|
||||
/build/external/dpdk_mlx_default.sh
|
||||
/build/external/downloads/
|
||||
/path_setup
|
||||
/tools/
|
||||
|
4
Makefile
4
Makefile
@ -760,3 +760,7 @@ ifeq ($(OS_ID)-$(OS_VERSION_ID),$(MAKE_VERIFY_GATE_OS))
|
||||
else
|
||||
$(call banner,"Skipping tests. Tests under 'make verify' supported on $(MAKE_VERIFY_GATE_OS)")
|
||||
endif
|
||||
|
||||
.PHONY: check-dpdk-mlx
|
||||
check-dpdk-mlx:
|
||||
@[ $$(make -sC build/external dpdk-show-DPDK_MLX_DEFAULT) = y ]
|
2
build/external/Makefile
vendored
2
build/external/Makefile
vendored
@ -38,8 +38,8 @@ ARCH_X86_64=$(filter x86_64,$(shell uname -m))
|
||||
include packages.mk
|
||||
include packages/ipsec-mb.mk
|
||||
include packages/quicly.mk
|
||||
include packages/dpdk.mk
|
||||
include packages/rdma-core.mk
|
||||
include packages/dpdk.mk
|
||||
include packages/libbpf.mk
|
||||
|
||||
.PHONY: clean
|
||||
|
2
build/external/deb/debian/rules
vendored
2
build/external/deb/debian/rules
vendored
@ -28,3 +28,5 @@ override_dh_install:
|
||||
make $(MAKE_ARGS) install
|
||||
dh_install -p$(PKG) --autodest /opt
|
||||
|
||||
override_dh_shlibdeps:
|
||||
dh_shlibdeps -l$(INSTALL_DIR)lib/
|
||||
|
1
build/external/mlx_rdma_dpdk_matrix.txt
vendored
Normal file
1
build/external/mlx_rdma_dpdk_matrix.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
rdma=41.0 dpdk=22.07
|
4
build/external/packages.mk
vendored
4
build/external/packages.mk
vendored
@ -146,5 +146,9 @@ $(B)/.$1.install.ok: $(B)/.$1.build.ok
|
||||
.PHONY: $1-install
|
||||
$1-install: $(B)/.$1.install.ok
|
||||
|
||||
.PHONY: $1-show-%
|
||||
$1-show-%:
|
||||
@echo $$($$*)
|
||||
|
||||
ALL_TARGETS += $1-install
|
||||
endef
|
||||
|
9
build/external/packages/dpdk.mk
vendored
9
build/external/packages/dpdk.mk
vendored
@ -14,9 +14,6 @@
|
||||
DPDK_PKTMBUF_HEADROOM ?= 128
|
||||
DPDK_USE_LIBBSD ?= n
|
||||
DPDK_DEBUG ?= n
|
||||
DPDK_MLX4_PMD ?= n
|
||||
DPDK_MLX5_PMD ?= n
|
||||
DPDK_MLX5_COMMON_PMD ?= n
|
||||
DPDK_TAP_PMD ?= n
|
||||
DPDK_FAILSAFE_PMD ?= n
|
||||
DPDK_MACHINE ?= default
|
||||
@ -34,6 +31,11 @@ dpdk_tarball_md5sum := $(dpdk_tarball_md5sum_$(dpdk_version))
|
||||
dpdk_url := $(dpdk_base_url)/$(dpdk_tarball)
|
||||
dpdk_tarball_strip_dirs := 1
|
||||
dpdk_depends := rdma-core $(if $(ARCH_X86_64), ipsec-mb)
|
||||
|
||||
DPDK_MLX_DEFAULT := $(shell if grep -q "rdma=$(rdma-core_version) dpdk=$(dpdk_version)" mlx_rdma_dpdk_matrix.txt; then echo 'y'; else echo 'n'; fi)
|
||||
DPDK_MLX4_PMD ?= $(DPDK_MLX_DEFAULT)
|
||||
DPDK_MLX5_PMD ?= $(DPDK_MLX_DEFAULT)
|
||||
DPDK_MLX5_COMMON_PMD ?= $(DPDK_MLX_DEFAULT)
|
||||
# Debug or release
|
||||
|
||||
DPDK_BUILD_TYPE:=release
|
||||
@ -173,6 +175,7 @@ PIP_DOWNLOAD_DIR = $(CURDIR)/downloads/
|
||||
|
||||
define dpdk_config_cmds
|
||||
cd $(dpdk_build_dir) && \
|
||||
echo "DPDK_MLX_DEFAULT=$(DPDK_MLX_DEFAULT)" > ../../../dpdk_mlx_default.sh && \
|
||||
rm -rf ../dpdk-meson-venv && \
|
||||
mkdir -p ../dpdk-meson-venv && \
|
||||
python3 -m venv ../dpdk-meson-venv && \
|
||||
|
19
build/external/packages/rdma-core.mk
vendored
19
build/external/packages/rdma-core.mk
vendored
@ -32,27 +32,16 @@ define rdma-core_config_cmds
|
||||
-DENABLE_STATIC=1 -DENABLE_RESOLVE_NEIGH=0 -DNO_PYVERBS=1 -DENABLE_VALGRIND=0\
|
||||
-DCMAKE_BUILD_TYPE=$(RDMA_BUILD_TYPE) -DCMAKE_INSTALL_PREFIX=$(rdma-core_install_dir) \
|
||||
-DCMAKE_INSTALL_LIBDIR=lib \
|
||||
-DCMAKE_C_FLAGS='-fPIC -fvisibility=hidden' > $(rdma-core_config_log)
|
||||
-DCMAKE_INSTALL_RUNDIR:PATH=/run \
|
||||
-DCMAKE_C_FLAGS='-fPIC' -DNO_MAN_PAGES=ON | tee $(rdma-core_config_log)
|
||||
endef
|
||||
|
||||
define rdma-core_build_cmds
|
||||
$(CMAKE) --build $(rdma-core_build_dir) -- libccan.a libibverbs.a librdma_util.a libmlx5.a libmlx4.a > $(rdma-core_build_log)
|
||||
sed 's/^Libs.private:.*/Libs.private: -lmlx4 -lmlx5 -libverbs -lrdma_util -lccan -lpthread/' -i $(rdma-core_build_dir)/lib/pkgconfig/libibverbs.pc >> $(rdma-core_build_log)
|
||||
$(CMAKE) --build $(rdma-core_build_dir) | tee $(rdma-core_build_log)
|
||||
endef
|
||||
|
||||
define rdma-core_install_cmds
|
||||
mkdir -p $(rdma-core_install_dir)/lib/pkgconfig
|
||||
cp -avL $(rdma-core_build_dir)/include $(rdma-core_install_dir) > $(rdma-core_install_log)
|
||||
cp -avL $(rdma-core_build_dir)/lib/pkgconfig/libibverbs.pc \
|
||||
$(rdma-core_build_dir)/lib/pkgconfig/libmlx5.pc \
|
||||
$(rdma-core_build_dir)/lib/pkgconfig/libmlx4.pc \
|
||||
$(rdma-core_install_dir)/lib/pkgconfig >> $(rdma-core_install_log)
|
||||
cp -avL $(rdma-core_build_dir)/lib/statics/libibverbs.a \
|
||||
$(rdma-core_build_dir)/lib/statics/libmlx5.a \
|
||||
$(rdma-core_build_dir)/lib/statics/libmlx4.a \
|
||||
$(rdma-core_build_dir)/util/librdma_util.a \
|
||||
$(rdma-core_build_dir)/ccan/libccan.a \
|
||||
$(rdma-core_install_dir)/lib >> $(rdma-core_install_log)
|
||||
$(CMAKE) --install $(rdma-core_build_dir) | tee $(rdma-core_install_log)
|
||||
endef
|
||||
|
||||
$(eval $(call package,rdma-core))
|
||||
|
@ -103,12 +103,8 @@ else()
|
||||
list(APPEND DPDK_LINK_LIBRARIES "${MNL_LIB}")
|
||||
else()
|
||||
message(WARNING "EXPERIMENTAL: DPDK plugin without dlopen mode")
|
||||
vpp_plugin_find_library(dpdk IBVERBS_LIB "libibverbs.a")
|
||||
vpp_plugin_find_library(dpdk MLX5_LIB "libmlx5.a")
|
||||
vpp_plugin_find_library(dpdk MLX4_LIB "libmlx4.a")
|
||||
vpp_plugin_find_library(dpdk CCAN_LIB "libccan.a")
|
||||
vpp_plugin_find_library(dpdk RDMA_UTIL_LIB "rdma_util")
|
||||
string_append(DPDK_LINK_FLAGS "-Wl,--whole-archive,${IBVERBS_LIB},${MLX5_LIB},${MLX4_LIB},${CCAN_LIB},${RDMA_UTIL_LIB},--no-whole-archive")
|
||||
vpp_plugin_find_library(dpdk IBVERBS_LIB "libibverbs.a")
|
||||
string_append(DPDK_LINK_FLAGS "${IBVERBS_LIB} -Wl,--exclude-libs,ALL")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@ -19,17 +19,16 @@ if (NOT IBVERBS_INCLUDE_DIR)
|
||||
endif()
|
||||
|
||||
vpp_plugin_find_library(rdma IBVERBS_LIB libibverbs.a)
|
||||
vpp_plugin_find_library(rdma RDMA_UTIL_LIB librdma_util.a)
|
||||
vpp_plugin_find_library(rdma MLX5_LIB libmlx5.a)
|
||||
|
||||
if (NOT IBVERBS_LIB OR NOT RDMA_UTIL_LIB OR NOT MLX5_LIB)
|
||||
if (NOT IBVERBS_LIB OR NOT MLX5_LIB)
|
||||
message(WARNING "rdma plugin - ibverbs not found - rdma plugin disabled")
|
||||
return()
|
||||
endif()
|
||||
|
||||
string_append(RDMA_LINK_FLAGS "-Wl,--whole-archive,${MLX5_LIB},--no-whole-archive")
|
||||
string_append(RDMA_LINK_FLAGS "-Wl,--whole-archive,${MLX5_LIB},--no-whole-archive -Wl,--exclude-libs,ALL")
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS "-fPIC -shared -pthread -Wno-unused-command-line-argument ${RDMA_LINK_FLAGS} ${IBVERBS_LIB} ${RDMA_UTIL_LIB}")
|
||||
set(CMAKE_REQUIRED_FLAGS "-fPIC -shared -pthread -Wno-unused-command-line-argument ${RDMA_LINK_FLAGS} ${IBVERBS_LIB}")
|
||||
set(CMAKE_REQUIRED_INCLUDES "${IBVERBS_INCLUDE_DIR}")
|
||||
set(CMAKE_REQUIRED_LIBRARIES "c") # force linkage by including libc explicitely
|
||||
CHECK_C_SOURCE_COMPILES("
|
||||
@ -73,5 +72,4 @@ add_vpp_plugin(rdma
|
||||
|
||||
LINK_LIBRARIES
|
||||
${IBVERBS_LIB}
|
||||
${RDMA_UTIL_LIB}
|
||||
)
|
||||
|
@ -3125,7 +3125,7 @@ vcl_epoll_wait_handle_mq_event (vcl_worker_t * wrk, session_event_t * e,
|
||||
if ((EPOLLRDHUP & session_events) &&
|
||||
(s->flags & VCL_SESSION_F_RD_SHUTDOWN))
|
||||
{
|
||||
events[*num_ev].events = EPOLLRDHUP;
|
||||
events[*num_ev].events |= EPOLLRDHUP;
|
||||
}
|
||||
if ((EPOLLIN & session_events) && (s->flags & VCL_SESSION_F_RD_SHUTDOWN))
|
||||
{
|
||||
|
Reference in New Issue
Block a user