aboutsummaryrefslogtreecommitdiffstats
path: root/examples/kni
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-07-06 09:22:35 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2016-07-06 16:09:40 +0200
commit8b25d1ad5d2264bdfc2818c7bda74ee2697df6db (patch)
tree8c3c769777f7e66a2d1ba7dd7651b563cfde370b /examples/kni
parent97f17497d162afdb82c8704bf097f0fee3724b2e (diff)
Imported Upstream version 16.07-rc1
Change-Id: I40a523e52f12e8496fdd69e902824b0226c303de Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'examples/kni')
-rw-r--r--examples/kni/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/examples/kni/main.c b/examples/kni/main.c
index a5297f28..f9fc61e0 100644
--- a/examples/kni/main.c
+++ b/examples/kni/main.c
@@ -318,8 +318,6 @@ main_loop(__rte_unused void *arg)
};
enum lcore_rxtx flag = LCORE_NONE;
- nb_ports = (uint8_t)(nb_ports < RTE_MAX_ETHPORTS ?
- nb_ports : RTE_MAX_ETHPORTS);
for (i = 0; i < nb_ports; i++) {
if (!kni_port_params_array[i])
continue;
@@ -831,7 +829,8 @@ kni_free_kni(uint8_t port_id)
return -1;
for (i = 0; i < p[port_id]->nb_kni; i++) {
- rte_kni_release(p[port_id]->kni[i]);
+ if (rte_kni_release(p[port_id]->kni[i]))
+ printf("Fail to release kni\n");
p[port_id]->kni[i] = NULL;
}
rte_eth_dev_stop(port_id);