Thanks Gal, we indeed shouldn't see such errors on regular basis and the
print is sufficient to help tracking and debugging in case it appears.
Michael
On 5/16/2024 1:54 PM, Gal Pressman wrote:
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe.
On 13/05/2024 9:46, Michael Margolin wrote:
Do not try to handle admin command completion if it has an unexpected
command id and print a relevant error message.
Reviewed-by: Firas Jahjah <firasj@xxxxxxxxxx>
Reviewed-by: Yehuda Yitschak <yehuday@xxxxxxxxxx>
Signed-off-by: Michael Margolin <mrgolin@xxxxxxxxxx>
---
static void efa_com_handle_admin_completion(struct efa_com_admin_queue *aq)
{
struct efa_admin_acq_entry *cqe;
u16 queue_size_mask;
- u16 comp_num = 0;
+ u16 comp_cmds = 0;
u8 phase;
+ int err;
u16 ci;
queue_size_mask = aq->depth - 1;
@@ -453,10 +456,12 @@ static void efa_com_handle_admin_completion(struct efa_com_admin_queue *aq)
* phase bit was validated
*/
dma_rmb();
- efa_com_handle_single_admin_completion(aq, cqe);
+ err = efa_com_handle_single_admin_completion(aq, cqe);
+ if (!err)
+ comp_cmds++;
I would count the unexpected completions as well.
Regardless, I would definitely add a counter to track these (hopefully)
rare cases.
Whatever you decide:
Reviewed-by: Gal Pressman <gal.pressman@xxxxxxxxx>