From: Soumyadeep Hore <soumyadeep.hore@intel.com>
To: bruce.richardson@intel.com, manoj.kumar.subbarao@intel.com,
aman.deep.singh@intel.com, dev@dpdk.org
Cc: Pawel Sobczyk <pawel.sobczyk@intel.com>
Subject: [PATCH v1 5/6] net/ice/base: add pending admin queue events API
Date: Tue, 10 Mar 2026 05:52:17 -0400 [thread overview]
Message-ID: <20260310095218.703423-15-soumyadeep.hore@intel.com> (raw)
In-Reply-To: <20260310095218.703423-1-soumyadeep.hore@intel.com>
From: Pawel Sobczyk <pawel.sobczyk@intel.com>
Adds a new API ice_ctrlq_pending() to check if there
are pending messages in the admin control queue. The
function is intended to be called after clearing the
ADMINQ_EVENT_PENDING flag to ensure all pending
messages are processed before re-enabling interrupts.
Signed-off-by: Pawel Sobczyk <pawel.sobczyk@intel.com>
Signed-off-by: Soumyadeep Hore <soumyadeep.hore@intel.com>
---
drivers/net/intel/ice/base/ice_common.h | 1 +
drivers/net/intel/ice/base/ice_controlq.c | 16 ++++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/drivers/net/intel/ice/base/ice_common.h b/drivers/net/intel/ice/base/ice_common.h
index 884b8f7834..3e9d3c2f80 100644
--- a/drivers/net/intel/ice/base/ice_common.h
+++ b/drivers/net/intel/ice/base/ice_common.h
@@ -148,6 +148,7 @@ ice_aq_ena_dis_txtimeq(struct ice_hw *hw, u16 txtimeq, u16 q_count, bool q_ena,
extern const struct ice_ctx_ele ice_txtime_ctx_info[];
bool ice_check_sq_alive(struct ice_hw *hw, struct ice_ctl_q_info *cq);
+bool ice_ctrlq_pending(struct ice_hw *hw, struct ice_ctl_q_info *cq);
int ice_aq_q_shutdown(struct ice_hw *hw, bool unloading);
void ice_fill_dflt_direct_cmd_desc(struct ice_aq_desc *desc, u16 opcode);
extern const struct ice_ctx_ele ice_tlan_ctx_info[];
diff --git a/drivers/net/intel/ice/base/ice_controlq.c b/drivers/net/intel/ice/base/ice_controlq.c
index b210495827..d68e603a8c 100644
--- a/drivers/net/intel/ice/base/ice_controlq.c
+++ b/drivers/net/intel/ice/base/ice_controlq.c
@@ -965,6 +965,22 @@ static bool ice_sq_done(struct ice_hw *hw, struct ice_ctl_q_info *cq)
return rd32(hw, cq->sq.head) == cq->sq.next_to_use;
}
+/**
+ * ice_ctrlq_pending - check if there are pending messages on the control queue
+ * @hw: pointer to the HW struct
+ * @cq: pointer to the specific Control queue
+ *
+ * Returns: true if there are pending messages in a queue (i.e. next_to_clean
+ * does not match the hardware head register), false otherwise
+ */
+bool ice_ctrlq_pending(struct ice_hw *hw, struct ice_ctl_q_info *cq)
+{
+ u16 ntu;
+
+ ntu = (u16)(rd32(hw, cq->rq.head) & cq->rq.head_mask);
+ return cq->rq.next_to_clean != ntu;
+}
+
/**
* ice_sq_send_cmd_nolock - send command to a control queue
* @hw: pointer to the HW struct
--
2.47.1
next prev parent reply other threads:[~2026-03-09 21:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-10 9:52 [PATCH v1 0/6] Update ICE Base Driver Soumyadeep Hore
2026-03-10 9:52 ` [PATCH v1 1/6] net/ice/base: update crash on invalid topology Soumyadeep Hore
2026-03-10 9:52 ` [PATCH v1 2/6] net/ice/base: resolve comparison-with-wider-type violations Soumyadeep Hore
2026-03-10 9:52 ` [PATCH v1 3/6] net/ice/base: enable LLDP filter control for E830 Soumyadeep Hore
2026-03-10 9:52 ` [PATCH v1 4/6] net/ice/base: support RDMA on 4+ ports of E830 Soumyadeep Hore
2026-03-10 9:52 ` Soumyadeep Hore [this message]
2026-03-10 9:52 ` [PATCH v1 6/6] net/ice/base: fix 'adjust' timer programming for E830 Soumyadeep Hore
2026-03-10 14:08 ` [PATCH v1 0/6] Update ICE Base Driver Bruce Richardson
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=20260310095218.703423-15-soumyadeep.hore@intel.com \
--to=soumyadeep.hore@intel.com \
--cc=aman.deep.singh@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=manoj.kumar.subbarao@intel.com \
--cc=pawel.sobczyk@intel.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