This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "".
The branch, master has been updated via e0f627ebce7760a9c6f225285bea9aa6673bc330 (commit) via 8c5b85e0b4705415764d75981322c0c649dffff7 (commit) via 0416281a1a370c112f5ceffe6f1e29e6dec86453 (commit) from eec882c78e9ce4aefe1209cfc4da2130aea4cc83 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit e0f627ebce7760a9c6f225285bea9aa6673bc330 Author: Matias Elo matias.elo@nokia.com Date: Fri Aug 9 15:32:33 2019 +0300
linux-dpdk: improve dpdk linking
Link whole dpdk library with 'whole-archive' flags instead of linking each driver individually.
Adds missing mlx5 driver dependency.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com
diff --git a/m4/odp_dpdk.m4 b/m4/odp_dpdk.m4 index f381ee25e..07acb8fcf 100644 --- a/m4/odp_dpdk.m4 +++ b/m4/odp_dpdk.m4 @@ -1,9 +1,7 @@ # ODP_DPDK_PMDS(DPDK_DRIVER_PATH) # ------------------------------- -# Build a list of DPDK PMD drivers in DPDK_PMDS variable. -# Updated DPDK_LIBS to include dependencies. +# Update DPDK_LIBS to include dependencies. AC_DEFUN([ODP_DPDK_PMDS], [dnl -AS_VAR_SET([DPDK_PMDS], ["-Wl,--whole-archive,"]) AC_MSG_NOTICE([Looking for DPDK PMDs at $1]) for filename in "$1"/librte_pmd_*.a; do cur_driver=`basename "$filename" .a | sed -e 's/^lib//'` @@ -11,11 +9,10 @@ cur_driver=`basename "$filename" .a | sed -e 's/^lib//'` # Match pattern is filled to 'filename' once if no matches are found AS_IF([test "x$cur_driver" = "xrte_pmd_*"], [break])
-AS_VAR_APPEND([DPDK_PMDS], [-l$cur_driver,]) AS_CASE([$cur_driver], [rte_pmd_nfp], [AS_VAR_APPEND([DPDK_LIBS], [" -lm"])], [rte_pmd_mlx4], [AS_VAR_APPEND([DPDK_LIBS], [" -lmlx4 -libverbs"])], - [rte_pmd_mlx5], [AS_VAR_APPEND([DPDK_LIBS], [" -lmlx5 -libverbs"])], + [rte_pmd_mlx5], [AS_VAR_APPEND([DPDK_LIBS], [" -lmlx5 -libverbs -lmnl"])], [rte_pmd_pcap], [AS_VAR_APPEND([DPDK_LIBS], [" -lpcap"])], [rte_pmd_aesni_gcm], [AS_VAR_APPEND([DPDK_LIBS], [" -lIPSec_MB"])], [rte_pmd_aesni_mb], [AS_VAR_APPEND([DPDK_LIBS], [" -lIPSec_MB"])], @@ -25,7 +22,6 @@ AS_CASE([$cur_driver], [rte_pmd_qat], [AS_VAR_APPEND([DPDK_LIBS], [" -lcrypto"])], [rte_pmd_openssl], [AS_VAR_APPEND([DPDK_LIBS], [" -lcrypto"])]) done -AS_VAR_APPEND([DPDK_PMDS], [--no-whole-archive]) ])
# _ODP_DPDK_SET_LIBS @@ -33,11 +29,12 @@ AS_VAR_APPEND([DPDK_PMDS], [--no-whole-archive]) # Set DPDK_LIBS/DPDK_LIBS_LT/DPDK_LIBS_LIBODP depending on DPDK setup AC_DEFUN([_ODP_DPDK_SET_LIBS], [dnl ODP_DPDK_PMDS([$DPDK_PMD_PATH]) +DPDK_LIB="-Wl,--whole-archive,-ldpdk,--no-whole-archive" AS_IF([test "x$DPDK_SHARED" = "xyes"], [dnl # applications don't need to be linked to anything, just rpath DPDK_LIBS_LT="$DPDK_RPATH_LT" # static linking flags will need -ldpdk - DPDK_LIBS_LT_STATIC="$DPDK_LDFLAGS $DPDK_PMDS $DPDK_LIBS" + DPDK_LIBS_LT_STATIC="$DPDK_LDFLAGS $DPDK_LIB $DPDK_LIBS" DPDK_LIBS="-Wl,--no-as-needed,-ldpdk,--as-needed,`echo $DPDK_LIBS | sed -e 's/ /,/g'`" DPDK_LIBS="$DPDK_LDFLAGS $DPDK_RPATH $DPDK_LIBS" # link libodp-linux with -ldpdk @@ -46,10 +43,10 @@ AS_IF([test "x$DPDK_SHARED" = "xyes"], [dnl # build long list of libraries for applications, which should not be # rearranged by libtool DPDK_LIBS_LT="`echo $DPDK_LIBS | sed -e 's/^/-Wc,/' -e 's/ /,/g'`" - DPDK_LIBS_LT="$DPDK_LDFLAGS $DPDK_PMDS $DPDK_LIBS_LT $DPDK_LIBS" + DPDK_LIBS_LT="$DPDK_LDFLAGS $DPDK_LIB $DPDK_LIBS_LT $DPDK_LIBS" DPDK_LIBS_LT_STATIC="$DPDK_LIBS_LT" # static linking flags follow the suite - DPDK_LIBS="$DPDK_LDFLAGS $DPDK_PMDS $DPDK_LIBS" + DPDK_LIBS="$DPDK_LDFLAGS $DPDK_LIB $DPDK_LIBS" # link libodp-linux with libtool linking flags DPDK_LIBS_LIBODP="$DPDK_LIBS_LT" ]) @@ -83,7 +80,7 @@ LIBS="$LIBS -ldpdk $2" AC_MSG_CHECKING([for rte_eal_init in -ldpdk $2]) AC_LINK_IFELSE([AC_LANG_CALL([], [rte_eal_init])], [AC_MSG_RESULT([yes]) - DPDK_LIBS="-ldpdk $2"], + DPDK_LIBS="$2"], [AC_MSG_RESULT([no])])
########################################################################## diff --git a/platform/linux-generic/pktio/dpdk.c b/platform/linux-generic/pktio/dpdk.c index 3d15c6495..ef729c100 100644 --- a/platform/linux-generic/pktio/dpdk.c +++ b/platform/linux-generic/pktio/dpdk.c @@ -139,32 +139,6 @@ static inline pkt_dpdk_t *pkt_priv(pktio_entry_t *pktio_entry)
static int disable_pktio; /** !0 this pktio disabled, 0 enabled */
-#ifndef RTE_BUILD_SHARED_LIB -#define MEMPOOL_OPS(hdl) \ -extern void mp_hdlr_init_##hdl(void) - -MEMPOOL_OPS(ops_mp_mc); -MEMPOOL_OPS(ops_sp_sc); -MEMPOOL_OPS(ops_mp_sc); -MEMPOOL_OPS(ops_sp_mc); -MEMPOOL_OPS(ops_stack); - -/* - * This function is not called from anywhere, it's only purpose is to make sure - * that if ODP and DPDK are statically linked to an application, the GCC - * constructors of mempool handlers are linked as well. Otherwise the linker - * would omit them. It's not an issue with dynamic linking. */ -void refer_constructors(void); -void refer_constructors(void) -{ - mp_hdlr_init_ops_mp_mc(); - mp_hdlr_init_ops_sp_sc(); - mp_hdlr_init_ops_mp_sc(); - mp_hdlr_init_ops_sp_mc(); - mp_hdlr_init_ops_stack(); -} -#endif - static int dpdk_pktio_init(void);
static int pool_alloc(struct rte_mempool *mp);
commit 8c5b85e0b4705415764d75981322c0c649dffff7 Author: Matias Elo matias.elo@nokia.com Date: Fri Jun 7 15:20:17 2019 +0300
test: performance: use correct test application return value
Previously, the return value of 'tee' was used, which returned success even if the actual test application failed.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com
diff --git a/test/performance/odp_l2fwd_run.sh b/test/performance/odp_l2fwd_run.sh index 5745d3279..2d2321aa5 100755 --- a/test/performance/odp_l2fwd_run.sh +++ b/test/performance/odp_l2fwd_run.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Copyright (c) 2015-2018, Linaro Limited # All rights reserved. @@ -86,7 +86,7 @@ run_l2fwd()
# Max 2 workers $STDBUF odp_l2fwd${EXEEXT} -i $IF1,$IF2 -m 0 -t 30 -c 2 | tee $LOG - ret=$? + ret=${PIPESTATUS[0]}
kill -2 ${GEN_PID}
diff --git a/test/performance/odp_pktio_ordered_run.sh b/test/performance/odp_pktio_ordered_run.sh index 295b8803b..09dd2ab98 100755 --- a/test/performance/odp_pktio_ordered_run.sh +++ b/test/performance/odp_pktio_ordered_run.sh @@ -31,7 +31,7 @@ fi $STDBUF ${TEST_DIR}/odp_pktio_ordered${EXEEXT} \ -i pcap:in=${PCAP_IN}:loops=$LOOPS,pcap:out=${PCAP_OUT} \ -t $DURATION | tee $LOG -ret=$? +ret=${PIPESTATUS[0]}
if [ $ret -ne 0 ]; then echo "FAIL: no odp_pktio_ordered${EXEEXT}"
commit 0416281a1a370c112f5ceffe6f1e29e6dec86453 Author: Matias Elo matias.elo@nokia.com Date: Fri Jun 7 16:19:09 2019 +0300
test: l2fwd: allocate odph_thread_t data from shm
When using process mode and synchronized thread creation the odph_thread_t data has to be allocated from shared memory.
Signed-off-by: Matias Elo matias.elo@nokia.com Reviewed-by: Petri Savolainen petri.savolainen@nokia.com Reported-by: Carl Wallen carl.wallen@nokia.com
diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index 2cec9c90c..e8fa8690b 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -1,4 +1,5 @@ /* Copyright (c) 2014-2018, Linaro Limited + * Copyright (c) 2019, Nokia * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause @@ -136,8 +137,10 @@ typedef struct thread_args_t { * Grouping of all global data */ typedef struct { + /* Thread table */ + odph_thread_t thread_tbl[MAX_WORKERS]; /* Thread specific arguments */ - thread_args_t thread[MAX_WORKERS]; + thread_args_t thread_args[MAX_WORKERS]; /* Barriers to synchronize main and workers */ odp_barrier_t init_barrier; odp_barrier_t term_barrier; @@ -954,7 +957,7 @@ static void bind_workers(void) }
for (thr = 0; thr < num_workers; thr++) { - thr_args = &gbl_args->thread[thr]; + thr_args = &gbl_args->thread_args[thr]; thr_args->num_pktio = if_count;
/* In sched mode, pktios are not cross connected with @@ -975,7 +978,7 @@ static void bind_workers(void) thr = 0;
for (rx_idx = 0; rx_idx < if_count; rx_idx++) { - thr_args = &gbl_args->thread[thr]; + thr_args = &gbl_args->thread_args[thr]; pktio = thr_args->num_pktio; /* Cross connect rx to tx */ tx_idx = gbl_args->dst_port[rx_idx]; @@ -996,7 +999,7 @@ static void bind_workers(void) rx_idx = 0;
for (thr = 0; thr < num_workers; thr++) { - thr_args = &gbl_args->thread[thr]; + thr_args = &gbl_args->thread_args[thr]; pktio = thr_args->num_pktio; /* Cross connect rx to tx */ tx_idx = gbl_args->dst_port[rx_idx]; @@ -1029,7 +1032,7 @@ static void bind_queues(void)
for (thr = 0; thr < num_workers; thr++) { int rx_idx, tx_idx; - thread_args_t *thr_args = &gbl_args->thread[thr]; + thread_args_t *thr_args = &gbl_args->thread_args[thr]; int num = thr_args->num_pktio;
printf("worker %i\n", thr); @@ -1428,7 +1431,6 @@ static void create_groups(int num, odp_schedule_group_t *group) int main(int argc, char *argv[]) { odph_helper_options_t helper_options; - odph_thread_t thread_tbl[MAX_WORKERS]; odph_thread_param_t thr_param[MAX_WORKERS]; odph_thread_common_param_t thr_common; odp_pool_t pool; @@ -1521,7 +1523,7 @@ int main(int argc, char *argv[]) gbl_args->appl.num_workers = num_workers;
for (i = 0; i < num_workers; i++) - gbl_args->thread[i].thr_idx = i; + gbl_args->thread_args[i].thr_idx = i;
if_count = gbl_args->appl.if_count;
@@ -1651,7 +1653,6 @@ int main(int argc, char *argv[]) thr_run_func = run_worker_sched_mode;
/* Create worker threads */ - memset(thread_tbl, 0, sizeof(thread_tbl)); memset(thr_param, 0, sizeof(thr_param)); memset(&thr_common, 0, sizeof(thr_common));
@@ -1663,18 +1664,18 @@ int main(int argc, char *argv[])
for (i = 0; i < num_workers; ++i) { thr_param[i].start = thr_run_func; - thr_param[i].arg = &gbl_args->thread[i]; + thr_param[i].arg = &gbl_args->thread_args[i]; thr_param[i].thr_type = ODP_THREAD_WORKER;
/* Round robin threads to groups */ - gbl_args->thread[i].num_groups = 1; - gbl_args->thread[i].group[0] = group[i % num_groups]; + gbl_args->thread_args[i].num_groups = 1; + gbl_args->thread_args[i].group[0] = group[i % num_groups];
- stats[i] = &gbl_args->thread[i].stats; + stats[i] = &gbl_args->thread_args[i].stats; }
- num_thr = odph_thread_create(thread_tbl, &thr_common, thr_param, - num_workers); + num_thr = odph_thread_create(gbl_args->thread_tbl, &thr_common, + thr_param, num_workers);
if (num_thr != num_workers) { LOG_ERR("Error: worker create failed %i\n", num_thr); @@ -1710,7 +1711,7 @@ int main(int argc, char *argv[]) odp_barrier_wait(&gbl_args->term_barrier);
/* Master thread waits for other threads to exit */ - num_thr = odph_thread_join(thread_tbl, num_workers); + num_thr = odph_thread_join(gbl_args->thread_tbl, num_workers); if (num_thr != num_workers) { LOG_ERR("Error: worker join failed %i\n", num_thr); exit(EXIT_FAILURE);
-----------------------------------------------------------------------
Summary of changes: m4/odp_dpdk.m4 | 17 +++++++---------- platform/linux-generic/pktio/dpdk.c | 26 -------------------------- test/performance/odp_l2fwd.c | 31 ++++++++++++++++--------------- test/performance/odp_l2fwd_run.sh | 4 ++-- test/performance/odp_pktio_ordered_run.sh | 2 +- 5 files changed, 26 insertions(+), 54 deletions(-)
hooks/post-receive