From: Gal Pressman <gal.pressman@linux.dev>
To: Michael Margolin <mrgolin@amazon.com>,
jgg@nvidia.com, leon@kernel.org, linux-rdma@vger.kernel.org
Cc: sleybo@amazon.com, matua@amazon.com,
Firas Jahjah <firasj@amazon.com>,
Yehuda Yitschak <yehuday@amazon.com>
Subject: Re: [PATCH for-next] RDMA/efa: Properly handle unexpected AQ completions
Date: Thu, 16 May 2024 13:54:26 +0300 [thread overview]
Message-ID: <5f2f0165-c148-4bba-8af9-ded7665ba373@linux.dev> (raw)
In-Reply-To: <20240513064630.6247-1-mrgolin@amazon.com>
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@amazon.com>
> Reviewed-by: Yehuda Yitschak <yehuday@amazon.com>
> Signed-off-by: Michael Margolin <mrgolin@amazon.com>
> ---
> 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@linux.dev>
next prev parent reply other threads:[~2024-05-16 10:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-13 6:46 [PATCH for-next] RDMA/efa: Properly handle unexpected AQ completions Michael Margolin
2024-05-16 10:54 ` Gal Pressman [this message]
2024-05-22 11:02 ` Margolin, Michael
2024-05-30 12:49 ` Leon Romanovsky
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=5f2f0165-c148-4bba-8af9-ded7665ba373@linux.dev \
--to=gal.pressman@linux.dev \
--cc=firasj@amazon.com \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=matua@amazon.com \
--cc=mrgolin@amazon.com \
--cc=sleybo@amazon.com \
--cc=yehuday@amazon.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