Re: [PATCH for-next] RDMA/efa: Properly handle unexpected AQ completions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux