DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/failsafe: check correct error code while handling sub-device add
@ 2020-10-03  0:01 Long Li
  2020-10-05  9:42 ` Gaëtan Rivet
  2020-10-15 10:11 ` Gaëtan Rivet
  0 siblings, 2 replies; 7+ messages in thread
From: Long Li @ 2020-10-03  0:01 UTC (permalink / raw)
  To: Gaetan Rivet; +Cc: dev, Long Li, stable

From: Long Li <longli@microsoft.com>

When adding a sub-device, it's possible that the sub-device is configured
successfully but later fails to start. This error should not be masked.
The driver needs to check the error status to prevent endless loop of
trying to start the sub-device.

fixes (ae80146c5a1b net/failsafe: fix removed device handling)

cc: stable@dpdk.org
Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/net/failsafe/failsafe_private.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/failsafe/failsafe_private.h b/drivers/net/failsafe/failsafe_private.h
index 651578a..c58c0de 100644
--- a/drivers/net/failsafe/failsafe_private.h
+++ b/drivers/net/failsafe/failsafe_private.h
@@ -497,7 +497,7 @@ int failsafe_eth_new_event_callback(uint16_t port_id,
 fs_err(struct sub_device *sdev, int err)
 {
 	/* A device removal shouldn't be reported as an error. */
-	if (sdev->remove == 1 || err == -EIO)
+	if (sdev->remove == 1 && err == -EIO)
 		return rte_errno = 0;
 	return err;
 }
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-10-15 10:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-03  0:01 [dpdk-dev] [PATCH] net/failsafe: check correct error code while handling sub-device add Long Li
2020-10-05  9:42 ` Gaëtan Rivet
2020-10-09 16:20   ` Gaëtan Rivet
2020-10-09 20:30     ` Long Li
2020-10-12 14:22       ` Gaëtan Rivet
2020-10-13 17:14         ` Long Li
2020-10-15 10:11 ` Gaëtan Rivet

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git