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 807a49cbdebcff68b5aec305513587c3827e77c5 (commit) via 8fb3ebc08684dc35eeb9632abccf1a11b4b512c3 (commit) via b9fdf74d3340ccd88a1bdeb1218f2a6ac4a3e840 (commit) via 0b9207d87fba558d0dd1dfcf192f4310d6bc9f93 (commit) via ca17284c6b3990d30c78900c9968d88feabe02fa (commit) via a891fc391967841e472d06437fa613a64ad3b08a (commit) via 667dbac196c3d015ed70780c793cd1854adf9d7f (commit) via 39387fc5e7acfa58e6478b237292c73c1f6540fd (commit) from 0c2a88257d645890774053261c37290653694cd3 (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 807a49cbdebcff68b5aec305513587c3827e77c5 Author: Petri Savolainen petri.savolainen@nokia.com Date: Fri Aug 16 17:47:46 2019 +0300
test: l2fwd: use ODPH_ASSERT instead of assert.h
Use ODPH_ASSERT macro instead of a call to a C library. This improves performance as the macro does not generate code when it is disabled.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Matias Elo matias.elo@nokia.com
diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index 2253862d..bfcd5c18 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -17,7 +17,6 @@ #include <unistd.h> #include <errno.h> #include <inttypes.h> -#include <assert.h> #include <signal.h>
#include <test_debug.h> @@ -380,7 +379,7 @@ static int run_worker_sched_mode(void *arg)
/* packets from the same queue are from the same interface */ src_idx = odp_packet_input_index(pkt_tbl[0]); - assert(src_idx >= 0); + ODPH_ASSERT(src_idx >= 0); dst_idx = gbl_args->dst_port_from_idx[src_idx]; fill_eth_addrs(pkt_tbl, pkts, dst_idx);
commit 8fb3ebc08684dc35eeb9632abccf1a11b4b512c3 Author: Petri Savolainen petri.savolainen@nokia.com Date: Fri Aug 16 18:04:15 2019 +0300
helper: increment helper version number
Increment helper version number to reflect addition of ODPH_ASSERT and other odph_debug.h content into helper API.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Matias Elo matias.elo@nokia.com
diff --git a/configure.ac b/configure.ac index 1e11b4ba..b7a981c2 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_SUBST(ODP_VERSION_API_MINOR) ########################################################################## m4_define([odph_version_generation], [1]) m4_define([odph_version_major], [0]) -m4_define([odph_version_minor], [1]) +m4_define([odph_version_minor], [2])
m4_define([odph_version], [odph_version_generation.odph_version_major.odph_version_minor])
commit b9fdf74d3340ccd88a1bdeb1218f2a6ac4a3e840 Author: Petri Savolainen petri.savolainen@nokia.com Date: Mon Aug 19 13:21:43 2019 +0300
helper: debug: add test application for helper debug
Test that macros are defined and use assert.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Matias Elo matias.elo@nokia.com
diff --git a/helper/test/.gitignore b/helper/test/.gitignore index 5a6c60bc..23fab7b3 100644 --- a/helper/test/.gitignore +++ b/helper/test/.gitignore @@ -10,3 +10,4 @@ table thread pthread version +debug diff --git a/helper/test/Makefile.am b/helper/test/Makefile.am index bf3aa862..b030ddf4 100644 --- a/helper/test/Makefile.am +++ b/helper/test/Makefile.am @@ -1,6 +1,7 @@ include $(top_srcdir)/test/Makefile.inc
EXECUTABLES = version \ + debug \ chksum \ cuckootable \ parse\ @@ -38,3 +39,4 @@ parse_SOURCES = parse.c table_SOURCES = table.c iplookuptable_SOURCES = iplookuptable.c version_SOURCES = version.c +debug_SOURCES = debug.c diff --git a/helper/test/debug.c b/helper/test/debug.c new file mode 100644 index 00000000..e20fd325 --- /dev/null +++ b/helper/test/debug.c @@ -0,0 +1,31 @@ +/* Copyright (c) 2019, Nokia + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "config.h" + +#include <odp_api.h> +#include <odp/helper/odph_api.h> + +#include <stdio.h> +#include <string.h> + +int main(void) +{ + printf("\nHelper library version is: %s\n\n", odph_version_str()); + + printf("Helper debugging:\n"); + printf(" ODPH_DEBUG: %i\n", ODPH_DEBUG); + printf(" ODPH_DEBUG_PRINT: %i\n\n", ODPH_DEBUG_PRINT); + + /* ASSERT(true) should work always */ + ODPH_ASSERT(1); + + /* ASSERT(false) should not abort when not debugging */ + if (ODPH_DEBUG == 0) + ODPH_ASSERT(0); + + return 0; +}
commit 0b9207d87fba558d0dd1dfcf192f4310d6bc9f93 Author: Petri Savolainen petri.savolainen@nokia.com Date: Fri Aug 16 17:43:48 2019 +0300
helper: debug: move odph_debug.h into helper API
Moved the debug header to be part of the helper API.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Matias Elo matias.elo@nokia.com
diff --git a/helper/Makefile.am b/helper/Makefile.am index a7d5132d..cfeeeeb4 100644 --- a/helper/Makefile.am +++ b/helper/Makefile.am @@ -13,6 +13,7 @@ AM_LDFLAGS = -version-number '$(ODPHELPER_LIBSO_VERSION)' helperincludedir = $(includedir)/odp/helper/ helperinclude_HEADERS = \ include/odp/helper/chksum.h\ + include/odp/helper/odph_debug.h \ include/odp/helper/eth.h\ include/odp/helper/icmp.h\ include/odp/helper/ip.h\ @@ -41,7 +42,6 @@ helperlinuxinclude_HEADERS = \ endif
noinst_HEADERS = \ - include/odph_debug.h \ include/odph_list_internal.h
__LIB__libodphelper_la_SOURCES = \ diff --git a/helper/cuckootable.c b/helper/cuckootable.c index febfa28e..5609e690 100644 --- a/helper/cuckootable.c +++ b/helper/cuckootable.c @@ -44,8 +44,8 @@ #include <errno.h> #include <stdio.h>
-#include "odp/helper/odph_cuckootable.h" -#include "odph_debug.h" +#include <odp/helper/odph_cuckootable.h> +#include <odp/helper/odph_debug.h> #include <odp_api.h>
/* More efficient access to a map of single ullong */ diff --git a/helper/hashtable.c b/helper/hashtable.c index 16f6c14c..496bca5e 100644 --- a/helper/hashtable.c +++ b/helper/hashtable.c @@ -10,9 +10,9 @@ #include <string.h> #include <malloc.h>
-#include "odp/helper/odph_hashtable.h" +#include <odp/helper/odph_hashtable.h> +#include <odp/helper/odph_debug.h> #include "odph_list_internal.h" -#include "odph_debug.h" #include <odp_api.h>
#define ODPH_SUCCESS 0 diff --git a/helper/include/odp/helper/odph_api.h b/helper/include/odp/helper/odph_api.h index 4bd10bf4..921914aa 100644 --- a/helper/include/odp/helper/odph_api.h +++ b/helper/include/odp/helper/odph_api.h @@ -18,6 +18,7 @@ extern "C" { #endif
+#include <odp/helper/odph_debug.h> #include <odp/helper/chksum.h> #include <odp/helper/odph_cuckootable.h> #include <odp/helper/eth.h> diff --git a/helper/include/odph_debug.h b/helper/include/odp/helper/odph_debug.h similarity index 100% rename from helper/include/odph_debug.h rename to helper/include/odp/helper/odph_debug.h diff --git a/helper/iplookuptable.c b/helper/iplookuptable.c index 84b4e2cb..1b5538ab 100644 --- a/helper/iplookuptable.c +++ b/helper/iplookuptable.c @@ -12,8 +12,8 @@ #include <stdio.h>
#include <odp/helper/odph_iplookuptable.h> +#include <odp/helper/odph_debug.h> #include "odph_list_internal.h" -#include "odph_debug.h" #include <odp_api.h>
/** @magic word, write to the first byte of the memory block diff --git a/helper/lineartable.c b/helper/lineartable.c index b27246cb..8479d2f1 100644 --- a/helper/lineartable.c +++ b/helper/lineartable.c @@ -10,8 +10,8 @@ #include <string.h> #include <malloc.h>
-#include "odp/helper/odph_lineartable.h" -#include "odph_debug.h" +#include <odp/helper/odph_lineartable.h> +#include <odp/helper/odph_debug.h> #include <odp_api.h>
#define ODPH_SUCCESS 0 diff --git a/helper/linux/thread.c b/helper/linux/thread.c index 6ed1bc8f..eecd6fed 100644 --- a/helper/linux/thread.c +++ b/helper/linux/thread.c @@ -24,7 +24,7 @@ #include <odp_api.h> #include <odp/helper/linux/pthread.h> #include <odp/helper/linux/process.h> -#include "odph_debug.h" +#include <odp/helper/odph_debug.h>
static void *_odph_run_start_routine(void *arg) { diff --git a/helper/test/chksum.c b/helper/test/chksum.c index 5c7c650e..9fa4ec18 100644 --- a/helper/test/chksum.c +++ b/helper/test/chksum.c @@ -6,7 +6,6 @@
#include "config.h"
-#include "odph_debug.h" #include <odp_api.h> #include <odp/helper/odph_api.h>
diff --git a/helper/test/cuckootable.c b/helper/test/cuckootable.c index 3afa490a..ee5f1d83 100644 --- a/helper/test/cuckootable.c +++ b/helper/test/cuckootable.c @@ -50,7 +50,6 @@ #include <time.h>
#include <odp_api.h> -#include <odph_debug.h> #include <odp/helper/odph_api.h>
/******************************************************************************* diff --git a/helper/test/iplookuptable.c b/helper/test/iplookuptable.c index 5e16e711..6637242d 100644 --- a/helper/test/iplookuptable.c +++ b/helper/test/iplookuptable.c @@ -13,9 +13,7 @@ #include <errno.h>
#include <odp_api.h> -#include <odph_debug.h> #include <odp/helper/odph_api.h> -#include <odp/helper/ip.h>
static void print_prefix_info( const char *msg, uint32_t ip, uint8_t cidr) diff --git a/helper/test/linux/process.c b/helper/test/linux/process.c index 92d779d9..26c9649d 100644 --- a/helper/test/linux/process.c +++ b/helper/test/linux/process.c @@ -6,8 +6,8 @@
#include "config.h"
-#include <odph_debug.h> #include <odp_api.h> +#include <odp/helper/odph_api.h> #include <odp/helper/linux/pthread.h> #include <odp/helper/linux/process.h>
diff --git a/helper/test/linux/pthread.c b/helper/test/linux/pthread.c index 8441805d..b0a57815 100644 --- a/helper/test/linux/pthread.c +++ b/helper/test/linux/pthread.c @@ -6,8 +6,8 @@
#include "config.h"
-#include <odph_debug.h> #include <odp_api.h> +#include <odp/helper/odph_api.h> #include <odp/helper/linux/pthread.h>
#include <string.h> diff --git a/helper/test/odpthreads.c b/helper/test/odpthreads.c index 55db37e0..dbff4294 100644 --- a/helper/test/odpthreads.c +++ b/helper/test/odpthreads.c @@ -15,7 +15,6 @@ #include <unistd.h> #include <stdlib.h>
-#include <odph_debug.h> #include <odp_api.h> #include <odp/helper/odph_api.h>
diff --git a/helper/test/parse.c b/helper/test/parse.c index f2f12cc0..5f8c5846 100644 --- a/helper/test/parse.c +++ b/helper/test/parse.c @@ -6,8 +6,6 @@
#include "config.h"
-#include <odph_debug.h> - #include <odp_api.h> #include <odp/helper/odph_api.h>
diff --git a/helper/test/table.c b/helper/test/table.c index 29d87cb2..2887bd59 100644 --- a/helper/test/table.c +++ b/helper/test/table.c @@ -6,9 +6,8 @@
#include "config.h"
-#include <odph_debug.h> -#include <odp/helper/odph_api.h> #include <odp_api.h> +#include <odp/helper/odph_api.h>
/** * Address Resolution Protocol (ARP) diff --git a/helper/test/version.c b/helper/test/version.c index bd817bb4..22ee2955 100644 --- a/helper/test/version.c +++ b/helper/test/version.c @@ -6,8 +6,6 @@
#include "config.h"
-#include <odph_debug.h> - #include <odp_api.h> #include <odp/helper/odph_api.h>
diff --git a/helper/threads.c b/helper/threads.c index e30c9f29..37a0c25d 100644 --- a/helper/threads.c +++ b/helper/threads.c @@ -20,7 +20,7 @@
#include <odp_api.h> #include <odp/helper/threads.h> -#include "odph_debug.h" +#include <odp/helper/odph_debug.h>
#define FAILED_CPU -1
commit ca17284c6b3990d30c78900c9968d88feabe02fa Author: Petri Savolainen petri.savolainen@nokia.com Date: Fri Aug 16 17:25:26 2019 +0300
helper: debug: add ODPH_ASSERT macro
Added assert macro to be used by test applications.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Matias Elo matias.elo@nokia.com
diff --git a/helper/include/odph_debug.h b/helper/include/odph_debug.h index d08918be..c99936f4 100644 --- a/helper/include/odph_debug.h +++ b/helper/include/odph_debug.h @@ -1,16 +1,19 @@ /* Copyright (c) 2015-2018, Linaro Limited + * Copyright (c) 2019, Nokia + * * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ + /** * @file * - * HELPER debug + * Helper debug */
-#ifndef HELPER_DEBUG_H_ -#define HELPER_DEBUG_H_ +#ifndef ODPH_DEBUG_H_ +#define ODPH_DEBUG_H_
#include <stdio.h> #include <stdlib.h> @@ -19,14 +22,29 @@ extern "C" { #endif
+/** + * Assert macro for applications and helper code + * + * No code is generated when ODPH_DEBUG=0. Prints error message and aborts when + * ODPH_DEBUG=1 and 'cond' is false. + */ +#define ODPH_ASSERT(cond) \ + do { \ + if ((ODPH_DEBUG == 1) && (!(cond))) { \ + fprintf(stderr, "%s:%d:%s(): %s\n", __FILE__, __LINE__,\ + __func__, #cond); \ + abort(); \ + } \ + } while (0) + /** * log level. */ -typedef enum HELPER_log_level { +typedef enum odph_log_level { ODPH_LOG_DBG, ODPH_LOG_ERR, ODPH_LOG_ABORT -} HELPER_log_level_e; +} odph_log_level_e;
/** * default LOG macro.
commit a891fc391967841e472d06437fa613a64ad3b08a Author: Petri Savolainen petri.savolainen@nokia.com Date: Fri Aug 16 17:00:38 2019 +0300
configure: add enable-helper-debug option
Test application code needs also debug code (asserts) that can be turned off/on. Added new preprocessor define (ODPH_DEBUG) and a configure option to control it. All debug options are enabled when --enable-debug=full is used.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Matias Elo matias.elo@nokia.com
diff --git a/configure.ac b/configure.ac index a90993e4..1e11b4ba 100644 --- a/configure.ac +++ b/configure.ac @@ -362,6 +362,14 @@ AS_IF([test "x$enable_debug" != "xno"], [ODP_DEBUG=1], AC_DEFINE_UNQUOTED([ODP_DEBUG], [$ODP_DEBUG], [Define to 1 to include additional debug code])
+AC_ARG_ENABLE([helper-debug], + [AS_HELP_STRING([--enable-helper-debug], [helpers include additional debugging code])], + [], [AS_IF([test "x$enable_debug" = "xfull"], [enable_helper_debug=yes], + [enable_helper_debug=no])]) +AS_IF([test "x$enable_helper_debug" != "xno"], [ODPH_DEBUG=1], [ODPH_DEBUG=0]) +AC_DEFINE_UNQUOTED([ODPH_DEBUG], [$ODPH_DEBUG], + [Define to 1 to include additional helper debug code]) + ########################################################################## # Enable/disable ODP_DEBUG_PRINT ########################################################################## @@ -383,6 +391,9 @@ AS_IF([test "x$enable_helper_debug_print" != "xno"], [ODPH_DEBUG_PRINT=1], AC_DEFINE_UNQUOTED([ODPH_DEBUG_PRINT], [$ODPH_DEBUG_PRINT], [Define to 1 to display helper debug information])
+debug_settings="ODP_DEBUG=${ODP_DEBUG}, ODP_DEBUG_PRINT=${ODP_DEBUG_PRINT}, \ +ODPH_DEBUG=${ODPH_DEBUG}, ODPH_DEBUG_PRINT=${ODPH_DEBUG_PRINT}" + ########################################################################## # Enable/disable deprecated API definitions ########################################################################## @@ -457,7 +468,7 @@ AC_MSG_RESULT([ ABI compatible: ${abi_compat} link time optimization: ${lto_enabled} deprecated APIs: ${deprecated} - debug: ${enable_debug} + debug: ${debug_settings} cunit: ${cunit_support} static tests linkage: ${enable_static_applications} with_examples: ${with_examples}
commit 667dbac196c3d015ed70780c793cd1854adf9d7f Author: Petri Savolainen petri.savolainen@nokia.com Date: Thu Aug 15 16:32:30 2019 +0300
test: l2fwd: added burst size option
Added -b option to control maximum packet receive burst size. It enables easy testing of various burst sizes. Typically, burst size affect significantly to maximum throughput.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Matias Elo matias.elo@nokia.com
diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index 2663b68a..2253862d 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -93,6 +93,7 @@ typedef struct { int chksum; /* Checksum offload */ int sched_mode; /* Scheduler mode */ int num_groups; /* Number of scheduling groups */ + int burst_rx; /* Receive burst size */ int verbose; /* Verbose output */ } appl_args_t;
@@ -296,6 +297,7 @@ static int run_worker_sched_mode(void *arg) int dst_idx; int i; int pktio, num_pktio; + uint16_t max_burst; odp_pktout_queue_t pktout[MAX_PKTIOS]; odp_queue_t tx_queue[MAX_PKTIOS]; thread_args_t *thr_args = arg; @@ -304,6 +306,7 @@ static int run_worker_sched_mode(void *arg) pktin_mode_t in_mode = gbl_args->appl.in_mode;
thr = odp_thread_id(); + max_burst = gbl_args->appl.burst_rx;
if (gbl_args->appl.num_groups) { odp_thrmask_t mask; @@ -348,7 +351,7 @@ static int run_worker_sched_mode(void *arg) unsigned tx_drops; int src_idx;
- pkts = odp_schedule_multi_no_wait(NULL, ev_tbl, MAX_PKT_BURST); + pkts = odp_schedule_multi_no_wait(NULL, ev_tbl, max_burst);
if (pkts <= 0) continue; @@ -432,6 +435,7 @@ static int run_worker_plain_queue_mode(void *arg) { int thr; int pkts; + uint16_t max_burst; odp_packet_t pkt_tbl[MAX_PKT_BURST]; int dst_idx, num_pktio; odp_queue_t queue; @@ -444,6 +448,7 @@ static int run_worker_plain_queue_mode(void *arg) int i;
thr = odp_thread_id(); + max_burst = gbl_args->appl.burst_rx;
num_pktio = thr_args->num_pktio; dst_idx = thr_args->pktio[pktio].tx_idx; @@ -474,7 +479,7 @@ static int run_worker_plain_queue_mode(void *arg) pktio = 0; }
- pkts = odp_queue_deq_multi(queue, event, MAX_PKT_BURST); + pkts = odp_queue_deq_multi(queue, event, max_burst); if (odp_unlikely(pkts <= 0)) continue;
@@ -559,6 +564,7 @@ static int run_worker_direct_mode(void *arg) { int thr; int pkts; + uint16_t max_burst; odp_packet_t pkt_tbl[MAX_PKT_BURST]; int dst_idx, num_pktio; odp_pktin_queue_t pktin; @@ -570,6 +576,7 @@ static int run_worker_direct_mode(void *arg) int use_event_queue = gbl_args->appl.out_mode;
thr = odp_thread_id(); + max_burst = gbl_args->appl.burst_rx;
num_pktio = thr_args->num_pktio; dst_idx = thr_args->pktio[pktio].tx_idx; @@ -599,7 +606,7 @@ static int run_worker_direct_mode(void *arg) pktio = 0; }
- pkts = odp_pktin_recv(pktin, pkt_tbl, MAX_PKT_BURST); + pkts = odp_pktin_recv(pktin, pkt_tbl, max_burst); if (odp_unlikely(pkts <= 0)) continue;
@@ -1147,6 +1154,8 @@ static void usage(char *progname) " -g, --groups <num> Number of groups to use: 0 ... num\n" " 0: SCHED_GROUP_ALL (default)\n" " num: must not exceed number of interfaces or workers\n" + " -b, --burst_rx <num> 0: Use max burst size (default)\n" + " num: Max number of packets per receive call\n" " -v, --verbose Verbose output.\n" " -h, --help Display help and exit.\n\n" "\n", NO_PATH(progname), NO_PATH(progname), MAX_PKTIOS @@ -1181,12 +1190,13 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) {"error_check", required_argument, NULL, 'e'}, {"chksum", required_argument, NULL, 'k'}, {"groups", required_argument, NULL, 'g'}, + {"burst_rx", required_argument, NULL, 'b'}, {"verbose", no_argument, NULL, 'v'}, {"help", no_argument, NULL, 'h'}, {NULL, 0, NULL, 0} };
- static const char *shortopts = "+c:+t:+a:i:m:o:r:d:s:e:k:g:vh"; + static const char *shortopts = "+c:t:a:i:m:o:r:d:s:e:k:g:b:vh";
appl_args->time = 0; /* loop forever if time to run is 0 */ appl_args->accuracy = 1; /* get and print pps stats second */ @@ -1195,6 +1205,7 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) appl_args->src_change = 1; /* change eth src address by default */ appl_args->num_groups = 0; /* use default group */ appl_args->error_check = 0; /* don't check packet errors by default */ + appl_args->burst_rx = 0; appl_args->verbose = 0; appl_args->chksum = 0; /* don't use checksum offload by default */
@@ -1325,6 +1336,9 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) case 'g': appl_args->num_groups = atoi(optarg); break; + case 'b': + appl_args->burst_rx = atoi(optarg); + break; case 'v': appl_args->verbose = 1; break; @@ -1349,6 +1363,15 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) exit(EXIT_FAILURE); }
+ if (appl_args->burst_rx > MAX_PKT_BURST) { + printf("Error: Burst size (%i) too large. Maximum is %i.\n", + appl_args->burst_rx, MAX_PKT_BURST); + exit(EXIT_FAILURE); + } + + if (appl_args->burst_rx == 0) + appl_args->burst_rx = MAX_PKT_BURST; + appl_args->extra_check = appl_args->error_check || appl_args->chksum;
optind = 1; /* reset 'extern optind' from the getopt lib */ @@ -1384,11 +1407,13 @@ static void print_info(char *progname, appl_args_t *appl_args) printf("PKTIN_SCHED_ORDERED, ");
if (appl_args->out_mode) - printf("PKTOUT_QUEUE"); + printf("PKTOUT_QUEUE\n"); else - printf("PKTOUT_DIRECT"); + printf("PKTOUT_DIRECT\n"); + + printf("Burst size: %i\n", appl_args->burst_rx);
- printf("\n\n"); + printf("\n"); fflush(NULL); }
commit 39387fc5e7acfa58e6478b237292c73c1f6540fd Author: Petri Savolainen petri.savolainen@nokia.com Date: Thu Aug 15 14:58:23 2019 +0300
test: l2fwd: use schedule_multi_no_wait
Use no_wait version of the schedule function. It may provide better performance than the basic function, which needs to check the wait parameter value on each call.
Signed-off-by: Petri Savolainen petri.savolainen@nokia.com Reviewed-by: Matias Elo matias.elo@nokia.com
diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index e8fa8690..2663b68a 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -348,8 +348,7 @@ static int run_worker_sched_mode(void *arg) unsigned tx_drops; int src_idx;
- pkts = odp_schedule_multi(NULL, ODP_SCHED_NO_WAIT, ev_tbl, - MAX_PKT_BURST); + pkts = odp_schedule_multi_no_wait(NULL, ev_tbl, MAX_PKT_BURST);
if (pkts <= 0) continue;
-----------------------------------------------------------------------
Summary of changes: configure.ac | 15 ++++++++-- helper/Makefile.am | 2 +- helper/cuckootable.c | 4 +-- helper/hashtable.c | 4 +-- helper/include/odp/helper/odph_api.h | 1 + helper/include/{ => odp/helper}/odph_debug.h | 28 ++++++++++++++---- helper/iplookuptable.c | 2 +- helper/lineartable.c | 4 +-- helper/linux/thread.c | 2 +- helper/test/.gitignore | 1 + helper/test/Makefile.am | 2 ++ helper/test/chksum.c | 1 - helper/test/cuckootable.c | 1 - helper/test/debug.c | 31 ++++++++++++++++++++ helper/test/iplookuptable.c | 2 -- helper/test/linux/process.c | 2 +- helper/test/linux/pthread.c | 2 +- helper/test/odpthreads.c | 1 - helper/test/parse.c | 2 -- helper/test/table.c | 3 +- helper/test/version.c | 2 -- helper/threads.c | 2 +- test/performance/odp_l2fwd.c | 43 +++++++++++++++++++++------- 23 files changed, 117 insertions(+), 40 deletions(-) rename helper/include/{ => odp/helper}/odph_debug.h (74%) create mode 100644 helper/test/debug.c
hooks/post-receive