Compare commits

...

4 Commits

Author SHA1 Message Date
Dave Wallace
61bae8a54d build: retain dpdk_mlx_default setting for ci script
- tell git to ignore all build/external generated files

Type: make

Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Change-Id: I4af26a76a0248939366cd09b577d422af801c0c3
(cherry picked from commit 14b118b4c7f5bd3927af48010092c5313884fbb2)
2022-10-07 18:54:15 +00:00
Mohammed Hawari
582c81e686 rdma: unhackish build of rdma-core
Change-Id: I2040b560b2a00f8bd176ae6ad46035678a2b249e
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
(cherry picked from commit 45e4e9444d961351178ee108b20525a9c929902d)
2022-10-05 02:19:30 +00:00
Mohammed Hawari
9aae8a4a9e build: mlx dpdk-rdma compatibility matrix
- Verify mlx_rdma_dpdk_matrix.txt versions,
  build MLX drivers in dpdk if the versions match.
  Also output version comparison results to a file
  for CI job to send notification email when the
  versions do not match.

Change-Id: Id1384ba4ea4b1f855f4d77d1d8e2c38683abfe1f
Type: improvement
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
(cherry picked from commit 4e939ced65143fcfe9342dcccf3418a1018c8b0f)
2022-10-05 00:58:06 +00:00
Yacan Liu
569763f948 vcl: repatch "align the RST behaviour with kernel"
The previous patch[37164] was a bit flawed.

Type: fix
Signed-off-by: Yacan Liu <liuyacan@corp.netease.com>
Change-Id: Ia9d8b9c7853e8f4b960ce7de26d0384243deb667
(cherry picked from commit ab15770ec63367498dd277c83a577a52594953e8)
2022-09-27 06:09:28 +00:00
11 changed files with 30 additions and 33 deletions

4
.gitignore vendored
View File

@ -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/

View File

@ -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 ]

View File

@ -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

View File

@ -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/

View File

@ -0,0 +1 @@
rdma=41.0 dpdk=22.07

View File

@ -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

View File

@ -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 && \

View File

@ -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))

View File

@ -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()

View File

@ -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}
)

View File

@ -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))
{