DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rmody@marvell.com>
To: Jerin Jacob <jerinjacobk@gmail.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>, <dev@dpdk.org>
Cc: <stable@dpdk.org>, Igor Russkikh <irusskikh@marvell.com>,
	GR-Everest-DPDK-Dev <GR-Everest-DPDK-Dev@marvell.com>,
	Rasesh Mody <rmody@marvell.com>
Subject: [dpdk-dev] [PATCH v2] net/qede: fix get link details
Date: Fri, 2 Oct 2020 12:59:45 -0700	[thread overview]
Message-ID: <20201002195945.20343-1-rmody@marvell.com> (raw)
In-Reply-To: <20201001224128.15222-1-rmody@marvell.com>

This patch fixes get current link details, without this change the link
details can be inaccurate if proper lock is not acquired.

Fixes: 739a5b2f2b49 ("net/qede/base: use passed ptt handler")
Cc: stable@dpdk.org

Reported-by: Ferruh Yigit <ferruh.yigit@intel.com>
Signed-off-by: Rasesh Mody <rmody@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
 drivers/net/qede/qede_main.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index aecb98261..1ae10d99d 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -584,13 +584,12 @@ qed_get_current_link(struct ecore_dev *edev, struct qed_link_output *if_link)
 	hwfn = &edev->hwfns[0];
 	if (IS_PF(edev)) {
 		ptt = ecore_ptt_acquire(hwfn);
-		if (!ptt)
-			DP_NOTICE(hwfn, true, "Failed to fill link; No PTT\n");
+		if (ptt) {
 			qed_fill_link(hwfn, ptt, if_link);
-		if (ptt)
 			ecore_ptt_release(hwfn, ptt);
+		} else {
+			DP_NOTICE(hwfn, true, "Failed to fill link; No PTT\n");
+		}
 	} else {
 		qed_fill_link(hwfn, NULL, if_link);

  reply	other threads:[~2020-10-02 20:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 22:41 [dpdk-dev] [PATCH] " Rasesh Mody
2020-10-02 19:59 ` Rasesh Mody [this message]
2020-10-04  8:37   ` [dpdk-dev] [PATCH v2] " Jerin Jacob
2020-10-02 20:02 ` [dpdk-dev] [PATCH] " Rasesh Mody

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:

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

  git send-email \
    --in-reply-to=20201002195945.20343-1-rmody@marvell.com \
    --to=rmody@marvell.com \
    --cc=GR-Everest-DPDK-Dev@marvell.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=irusskikh@marvell.com \
    --cc=jerinjacobk@gmail.com \
    --cc=stable@dpdk.org \


* 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).