From: "Nikhil P. Rao" <nikhil.rao@amd.com>
To: Brett Creeley <brett.creeley@amd.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Abhijit Gangurde <abhijit.gangurde@amd.com>,
Allen Hubbe <allen.hubbe@amd.com>, Jason Gunthorpe <jgg@ziepe.ca>,
Leon Romanovsky <leon@kernel.org>, Jiri Pirko <jiri@resnulli.us>,
Simon Horman <horms@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
Randy Dunlap <rdunlap@infradead.org>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-rdma@vger.kernel.org>, <linux-doc@vger.kernel.org>,
Arun Kumar Prakash <ArunKumar.Prakash@amd.com>,
"Nikhil P. Rao" <nikhil.rao@amd.com>
Subject: [PATCH net-next 2/3] RDMA/ionic: Use the ionic command timeout for the admin queue
Date: Mon, 2 Nov 2026 22:27:40 +0000 [thread overview]
Message-ID: <20261102-b4-ionic-cmd-timeout-v1-2-2f75c2d0a0c7@amd.com> (raw)
In-Reply-To: <20261102-b4-ionic-cmd-timeout-v1-0-2f75c2d0a0c7@amd.com>
From: Arun Kumar Prakash <ArunKumar.Prakash@amd.com>
Commit ec8ee714736e ("ionic: stretch heartbeat detection") notes that
firmware can take more than 2 seconds to service a device or admin
queue request, and is only expected to complete it within the ionic
command timeout. The RDMA admin queue watchdog still uses 2 seconds,
and when it fires it resets the RDMA LIF and every later verb fails
with -ENODEV. Use the ionic command timeout, 5 seconds, instead. The
AH create/destroy busy-wait keeps its fixed 2 second bound.
Signed-off-by: Arun Kumar Prakash <ArunKumar.Prakash@amd.com>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Acked-by: Allen Hubbe <allen.hubbe@amd.com>
Signed-off-by: Nikhil P. Rao <nikhil.rao@amd.com>
---
drivers/infiniband/hw/ionic/ionic_admin.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/ionic/ionic_admin.c b/drivers/infiniband/hw/ionic/ionic_admin.c
index 0ccd869ad8e6..b463ad8b4e80 100644
--- a/drivers/infiniband/hw/ionic/ionic_admin.c
+++ b/drivers/infiniband/hw/ionic/ionic_admin.c
@@ -18,8 +18,6 @@
#define IONIC_ADMIN_BUSY_RETRY_COUNT 2000
#define IONIC_ADMIN_BUSY_RETRY_MS 1
-/* admin queue will be considered failed if a command takes longer */
-#define IONIC_ADMIN_TIMEOUT (HZ * 2)
#define IONIC_ADMIN_WARN (HZ / 8)
/* will poll for admin cq to tolerate and report from missed event */
@@ -28,6 +26,11 @@
/* work queue for polling the event queue and admin cq */
struct workqueue_struct *ionic_evt_workq;
+static unsigned long ionic_admin_timeout(struct ionic_ibdev *dev)
+{
+ return HZ * ionic_cmd_timeout(dev->lif_cfg.lif);
+}
+
static void ionic_admin_timedout(struct ionic_aq *aq)
{
struct ionic_ibdev *dev = aq->dev;
@@ -294,7 +297,7 @@ static void ionic_admin_dwork(struct work_struct *ws)
}
if (time_is_after_eq_jiffies(aq->stamp +
- IONIC_ADMIN_TIMEOUT)) {
+ ionic_admin_timeout(dev))) {
/* Timeout threshold not met */
ibdev_dbg(&dev->ibdev, "no progress after %ums\n",
(u32)jiffies_to_msecs(jiffies - aq->stamp));
--
2.43.0
next prev parent reply other threads:[~2026-11-02 22:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 22:27 [PATCH net-next 0/3] ionic: make the device command timeout configurable Nikhil P. Rao
2026-11-02 22:27 ` [PATCH net-next 1/3] ionic: make the command timeout per device Nikhil P. Rao
2026-11-02 22:27 ` Nikhil P. Rao [this message]
2026-11-02 22:27 ` [PATCH net-next 3/3] ionic: add devlink param for command timeout Nikhil P. Rao
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=20261102-b4-ionic-cmd-timeout-v1-2-2f75c2d0a0c7@amd.com \
--to=nikhil.rao@amd.com \
--cc=ArunKumar.Prakash@amd.com \
--cc=abhijit.gangurde@amd.com \
--cc=allen.hubbe@amd.com \
--cc=andrew+netdev@lunn.ch \
--cc=brett.creeley@amd.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jgg@ziepe.ca \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.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