From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Gora Subject: [PATCH 08/10] kni: add rte_kni_free to KNI example app Date: Thu, 28 Jun 2018 15:54:26 -0700 Message-ID: <20180628225426.21309-1-dg@adax.com> Cc: dev@dpdk.org, Dan Gora To: Ferruh Yigit Return-path: Received: from mail-oi0-f48.google.com (mail-oi0-f48.google.com [209.85.218.48]) by dpdk.org (Postfix) with ESMTP id D985D1B063 for ; Fri, 29 Jun 2018 00:54:33 +0200 (CEST) Received: by mail-oi0-f48.google.com with SMTP id c6-v6so6768502oiy.0 for ; Thu, 28 Jun 2018 15:54:33 -0700 (PDT) List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add rte_kni_free to the KNI example application. Signed-off-by: Dan Gora --- examples/kni/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/kni/main.c b/examples/kni/main.c index 4b162debb..75e23cd0f 100644 --- a/examples/kni/main.c +++ b/examples/kni/main.c @@ -883,7 +883,9 @@ kni_free_kni(uint16_t port_id) for (i = 0; i < p[port_id]->nb_kni; i++) { if (rte_kni_release(p[port_id]->kni[i])) - printf("Fail to release kni\n"); + printf("Failed to release kni\n"); + if (rte_kni_free(p[port_id]->kni[i])) + printf("Failed to free kni\n"); p[port_id]->kni[i] = NULL; } rte_eth_dev_stop(port_id); -- 2.18.0.rc1.1.g6f333ff2f