DPDK patches and discussions
 help / color / mirror / Atom feed
From: root <corezeng@gmail.com>
To: dev@dpdk.org
Cc: corezeng@gmail.com, jbehrens@vmware.com
Subject: [PATCH] drivers: fix vmxnet3 return wrong error code in initializing
Date: Sun, 28 May 2023 10:37:34 -0400	[thread overview]
Message-ID: <20230528143734.145326-1-user@sklga> (raw)

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


             reply	other threads:[~2023-05-30 15:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-28 14:37 root [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230528143734.145326-1-user@sklga \
    --to=corezeng@gmail.com \
    --cc=dev@dpdk.org \
    --cc=jbehrens@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).