aboutsummaryrefslogtreecommitdiff
path: root/test/common_plat/performance/odp_l2fwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/common_plat/performance/odp_l2fwd.c')
-rw-r--r--test/common_plat/performance/odp_l2fwd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/common_plat/performance/odp_l2fwd.c b/test/common_plat/performance/odp_l2fwd.c
index 651ed1019..82c3a251f 100644
--- a/test/common_plat/performance/odp_l2fwd.c
+++ b/test/common_plat/performance/odp_l2fwd.c
@@ -20,6 +20,7 @@
#include <unistd.h>
#include <errno.h>
#include <inttypes.h>
+#include <assert.h>
#include <test_debug.h>
@@ -353,6 +354,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);
dst_idx = gbl_args->dst_port_from_idx[src_idx];
fill_eth_addrs(pkt_tbl, pkts, dst_idx);
@@ -1507,6 +1509,11 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
+ if (odp_shm_free(shm)) {
+ LOG_ERR("Error: shm free\n");
+ exit(EXIT_FAILURE);
+ }
+
if (odp_term_local()) {
LOG_ERR("Error: term local\n");
exit(EXIT_FAILURE);