DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Mody, Rasesh" <Rasesh.Mody@cavium.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: "Mody, Rasesh" <Rasesh.Mody@cavium.com>,
	"ferruh.yigit@intel.com" <ferruh.yigit@intel.com>,
	Dept-Eng DPDK Dev <Dept-EngDPDKDev@cavium.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: [dpdk-dev] [PATCH 4/5] net/bnx2x: fix call to link handling periodic function
Date: Wed, 19 Sep 2018 21:59:43 +0000	[thread overview]
Message-ID: <1537394318-17682-4-git-send-email-rasesh.mody@cavium.com> (raw)
In-Reply-To: <1537394318-17682-1-git-send-email-rasesh.mody@cavium.com>

If link handling periodic function is allowed to be called in interrupt
context, the periodic function can get called too frequently and exhaust
the retry credits to check link status.

This change makes sure link handling periodic function is not called in
interrupt context.

Fixes: 540a211084a7 ("bnx2x: driver core")
Cc: stable@dpdk.org

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index ae2e60a..0057843 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -131,7 +131,9 @@ struct rte_bnx2x_xstats_name_off {
 
 	PMD_DEBUG_PERIODIC_LOG(INFO, sc, "Interrupt handled");
 
+	atomic_store_rel_long(&sc->periodic_flags, PERIODIC_STOP);
 	bnx2x_interrupt_action(dev);
+	atomic_store_rel_long(&sc->periodic_flags, PERIODIC_GO);
 	rte_intr_enable(&sc->pci_dev->intr_handle);
 }
 
-- 
1.7.10.3

  parent reply	other threads:[~2018-09-19 21:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19 21:59 [dpdk-dev] [PATCH 1/5] net/bnx2x: fix logging to include dev name Mody, Rasesh
2018-09-19 21:59 ` [dpdk-dev] [PATCH 2/5] net/bnx2x: update link/PHY management Mody, Rasesh
2018-09-21 18:10   ` Ferruh Yigit
2018-09-22  1:37     ` Mody, Rasesh
2018-09-19 21:59 ` [dpdk-dev] [PATCH 3/5] net/bnx2x: fix to disable further interrupts Mody, Rasesh
2018-09-19 21:59 ` Mody, Rasesh [this message]
2018-09-19 21:59 ` [dpdk-dev] [PATCH 5/5] net/bnx2x: fix to add phy lock Mody, Rasesh
2018-09-29  5:42 ` [dpdk-dev] [PATCH v2 1/5] net/bnx2x: fix logging to include dev name Mody, Rasesh
2018-10-02 12:40   ` Ferruh Yigit
2018-09-29  5:42 ` [dpdk-dev] [PATCH v2 2/5] net/bnx2x: update link/PHY management Mody, Rasesh
2018-09-29  5:42 ` [dpdk-dev] [PATCH v2 3/5] net/bnx2x: fix to disable further interrupts Mody, Rasesh
2018-09-29  5:42 ` [dpdk-dev] [PATCH v2 4/5] net/bnx2x: fix call to link handling periodic function Mody, Rasesh
2018-09-29  5:42 ` [dpdk-dev] [PATCH v2 5/5] net/bnx2x: fix to add phy lock Mody, Rasesh

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=1537394318-17682-4-git-send-email-rasesh.mody@cavium.com \
    --to=rasesh.mody@cavium.com \
    --cc=Dept-EngDPDKDev@cavium.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stable@dpdk.org \
    /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).