From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4B6DB42BE6; Tue, 30 May 2023 17:41:16 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BDFD427F2; Tue, 30 May 2023 17:41:12 +0200 (CEST) Received: from mail-qk1-f193.google.com (mail-qk1-f193.google.com [209.85.222.193]) by mails.dpdk.org (Postfix) with ESMTP id 06DCF40A81 for ; Sun, 28 May 2023 16:37:52 +0200 (CEST) Received: by mail-qk1-f193.google.com with SMTP id af79cd13be357-75b2a2bf757so147555685a.2 for ; Sun, 28 May 2023 07:37:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685284671; x=1687876671; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jIalYn11NwRwUEjz8zBIoxHRP0cbLJKpmQu/FOdWCPg=; b=p226XTLWoaP0PYdC2UyZVXMoV3xjLsHz8/sga5pbWTATrskXbaS7w7PFAKVJgv4gp4 54gbMYnB5pXlnxZ/eVC0wmBgfrwE/XxHUHig7h/Tk9N8HVtgiS7Gu6TY3p5sBL9goPbu lGifjB1oXjJMmjhLI3Bk1UiqZo9Ul6P0CgtNfsvwiQ/1ErFTPYu1Fyuol8+QzApyU2LT dKuCjSw3ollyqQ5DmzHZVjyOdGEqH+UefhOpJcmvIeF7wTB5x2eZCY3U9UFBIRVqVB90 NKlOMAQKn9yDIQnJIXaX3r3D16blhCenKl2pnBMccbZPgdiC85XiIgXWeJD4qQD4GQV/ ENxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685284671; x=1687876671; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jIalYn11NwRwUEjz8zBIoxHRP0cbLJKpmQu/FOdWCPg=; b=a/a3eLsSrJQGucY/TZkns5uf0wi+QPqyifvkMwYLnbEXj8GKqW3rPlTyWLTfG1FLd3 hT6mcLZj2PvewRaZBJUcXks1gCrEo+3+IwFBTcC30IJ1/UcPjDvkSDgtP8odHMQelOrk u8psbMRClumaoRK473VVdFPz9XcqDHxJDj9vUUpJpGAWdlu6z2Kea8FQYL1rYJRtBIV0 sGB6y+o+y+YfGkkFY/xt0pX2WRprqndaYvjUbB+Zu1B3SFgSJYWqCg/Cqfen89Cr+OEU X+DKNx++Suf+b0VF1IndfKSZnmx8hlxo61FmrtZHewvlf+7Z73rrZeHf4s2kCH5pFoXb s6ww== X-Gm-Message-State: AC+VfDzAyOiZjxZD3dJX0Ziv3IMiByWdJ3ptH65UyfFchhZK4OQ4ew3E BRHug7tOJl2oNkktBg6Iokc/6Bh9yuQ1hK0vL8UGLg== X-Google-Smtp-Source: ACHHUZ4bWfsCE1KbbWVQ41rQ26Ff/YikCYwXQtYZysdO0HUZDXY1iTHh5phDBebXXJlhfoeRWDIm1g== X-Received: by 2002:a37:a91:0:b0:75b:23a1:3665 with SMTP id 139-20020a370a91000000b0075b23a13665mr4472730qkk.38.1685284671285; Sun, 28 May 2023 07:37:51 -0700 (PDT) Received: from localhost.localdomain ([2001:19f0:5:3fd8:5400:3ff:fe7e:6d40]) by smtp.gmail.com with ESMTPSA id p9-20020a05620a112900b0075ca4cd03d4sm2570205qkk.64.2023.05.28.07.37.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 May 2023 07:37:51 -0700 (PDT) From: root X-Google-Original-From: root 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 Message-Id: <20230528143734.145326-1-user@sklga> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Tue, 30 May 2023 17:41:09 +0200 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Kaijun Zeng 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 --- 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