DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] drivers: fix vmxnet3 return wrong error code in initializing
@ 2023-05-28 14:37 root
  2023-06-01 15:12 ` Ferruh Yigit
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: root @ 2023-05-28 14:37 UTC (permalink / raw)
  To: dev; +Cc: corezeng, jbehrens

From: Kaijun Zeng <corezeng@gmail.com>

In vmxnet3_dev_rxtx_init(), a wrong error code may be thrown after it invokes
vmxnet3_post_rx_bufs() because it negates the error code before returning it.
It causes rte_eth_dev_start() to give a positive number to the invoker, but it
should be a negative number, as described in the comments.

Bugzilla ID: 1239

Signed-off-by: Kaijun Zeng <corezeng@gmail.com>
---
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index a875ffec07..73ec1e4727 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -1315,7 +1315,7 @@ vmxnet3_dev_rxtx_init(struct rte_eth_dev *dev)
 				PMD_INIT_LOG(ERR,
 					     "ERROR: Posting Rxq: %d buffers ring: %d",
 					     i, j);
-				return -ret;
+				return ret;
 			}
 			/*
 			 * Updating device with the index:next2fill to fill the
-- 
2.30.2


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

end of thread, other threads:[~2023-06-09 18:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-28 14:37 [PATCH] drivers: fix vmxnet3 return wrong error code in initializing root
2023-06-01 15:12 ` Ferruh Yigit
2023-06-02 16:44 ` [PATCH v2] net/vmxnet3: fix return " Kaijun Zeng
2023-06-06  9:08   ` Ferruh Yigit
2023-06-06 15:36   ` Stephen Hemminger
2023-06-07 15:49     ` Ferruh Yigit
2023-06-07 17:57   ` [PATCH v3] " Kaijun Zeng
2023-06-09 18:08     ` Ferruh Yigit
2023-06-07 16:54 ` [PATCH] " Kaijun Zeng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).