From: Ivan Ilchenko Date: Thu, 15 Oct 2020 13:30:44 +0000 (+0100) Subject: net/failsafe: check stop call status X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=97742c7b0ab3634a4d5e6215eae5f897a00d3296;p=dpdk.git net/failsafe: check stop call status rte_eth_dev_stop() return value was changed from void to int, so this patch modify usage of this function across net/failsafe according to new return type. Signed-off-by: Ivan Ilchenko Signed-off-by: Andrew Rybchenko --- diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c index c6066c76a3..10b90fd837 100644 --- a/drivers/net/failsafe/failsafe_ether.c +++ b/drivers/net/failsafe/failsafe_ether.c @@ -282,7 +282,9 @@ fs_dev_remove(struct sub_device *sdev) switch (sdev->state) { case DEV_STARTED: failsafe_rx_intr_uninstall_subdevice(sdev); - rte_eth_dev_stop(PORT_ID(sdev)); + ret = rte_eth_dev_stop(PORT_ID(sdev)); + if (ret < 0) + ERROR("Failed to stop sub-device %u", SUB_ID(sdev)); sdev->state = DEV_ACTIVE; /* fallthrough */ case DEV_ACTIVE: diff --git a/drivers/net/failsafe/failsafe_ops.c b/drivers/net/failsafe/failsafe_ops.c index 5c606ff077..632f2b276f 100644 --- a/drivers/net/failsafe/failsafe_ops.c +++ b/drivers/net/failsafe/failsafe_ops.c @@ -147,7 +147,9 @@ fs_dev_start(struct rte_eth_dev *dev) if (ret) { if (!fs_err(sdev, ret)) continue; - rte_eth_dev_stop(PORT_ID(sdev)); + if (fs_err(sdev, rte_eth_dev_stop(PORT_ID(sdev))) < 0) + ERROR("Failed to stop sub-device %u", + SUB_ID(sdev)); fs_unlock(dev, 0); return ret; }