Skip to content

Commit

Permalink
net/kni: warn on stop failure
Browse files Browse the repository at this point in the history
[ upstream commit b752fb4 ]

Return value of function 'eth_kni_dev_stop' passed to 'ret' is
rewritten later, and this is unreasonable.

This patch fixes it.

Fixes: 62024eb ("ethdev: change stop operation callback to return int")

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  • Loading branch information
hushenggitcount authored and steevenlee committed Jun 8, 2021
1 parent 3caffc5 commit 9874e06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/kni/rte_eth_kni.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9874e06

Please sign in to comment.