diff mbox series

[10/11] net/failsafe: check eth dev stop status

Message ID 1602682146-4722-11-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Superseded, archived
Delegated to: Ferruh Yigit
Headers show
Series ethdev: change device stop to return status | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Andrew Rybchenko Oct. 14, 2020, 1:29 p.m. UTC
From: Ivan Ilchenko <Ivan.Ilchenko@oktetlabs.ru>

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 <Ivan.Ilchenko@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/failsafe/failsafe_ether.c | 4 +++-
 drivers/net/failsafe/failsafe_ops.c   | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index f18935a7e2..f259755806 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 device %u", PORT_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 0ce7dfc8a6..4fbb7e1da0 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 (rte_eth_dev_stop(PORT_ID(sdev)) < 0)
+				ERROR("Failed to stop device %u",
+				      PORT_ID(sdev));
 			fs_unlock(dev, 0);
 			return ret;
 		}