From: Min Hu (Connor) Date: Tue, 27 Apr 2021 02:08:45 +0000 (+0800) Subject: net/kni: warn on stop failure X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b752fb4d626c4a0f4a90f04df3684cb5318c376f;p=dpdk.git net/kni: warn on stop failure Return value of function 'eth_kni_dev_stop' passed to 'ret' is rewritten later, and this is unreasonable. This patch fixes it. Fixes: 62024eb82756 ("ethdev: change stop operation callback to return int") Cc: stable@dpdk.org Signed-off-by: Min Hu (Connor) Reviewed-by: Ferruh Yigit --- diff --git a/drivers/net/kni/rte_eth_kni.c b/drivers/net/kni/rte_eth_kni.c index 4d2a42ddab..51daf08591 100644 --- a/drivers/net/kni/rte_eth_kni.c +++ b/drivers/net/kni/rte_eth_kni.c @@ -211,6 +211,9 @@ eth_kni_close(struct rte_eth_dev *eth_dev) return 0; ret = eth_kni_dev_stop(eth_dev); + if (ret) + PMD_LOG(WARNING, "Not able to stop kni for %s", + eth_dev->data->name); /* mac_addrs must not be freed alone because part of dev_private */ eth_dev->data->mac_addrs = NULL;