Subject: Re: [net-next PATCH] octeontx2-pf: Add support for adaptive interrupt coalescing

From: Jakub Kicinski <[email-masked]>
Date: Thu, 12 May 2022 16:58:42 -0700

On Thu, 12 May 2022 12:49:12 +0530 Suman Ghosh wrote:
> Added support for adaptive IRQ coalescing. It uses net_dim
> algorithm to find the suitable delay/IRQ count based on the
> current packet rate.
> 
> Signed-off-by: Suman Ghosh <[email-masked]>
> Reviewed-by: Sunil Kovvuri Goutham <[email-masked]>

You still claim this is tested? How can it work if you're not changing
.supported_coalesce_params? Do we have a bug in the core?

> +	/* Check and update coalesce status */
> +	if ((pfvf->flags & OTX2_FLAG_ADPTV_INT_COAL_ENABLED) ==
> +			OTX2_FLAG_ADPTV_INT_COAL_ENABLED) {
> +		priv_coalesce_status = 1;
> +		if (!ec->use_adaptive_rx_coalesce || !ec->use_adaptive_tx_coalesce)
> +			pfvf->flags &= ~OTX2_FLAG_ADPTV_INT_COAL_ENABLED;
> +	} else {
> +		priv_coalesce_status = 0;
> +		if (ec->use_adaptive_rx_coalesce || ec->use_adaptive_tx_coalesce)
> +			pfvf->flags |= OTX2_FLAG_ADPTV_INT_COAL_ENABLED;
> +	}

Won't this flip-flop the flag? You should probably reject 
adaptive_rx != adaptive_tx.

>  		/* Re-enable interrupts */
>  		otx2_write64(pfvf, NIX_LF_CINTX_ENA_W1S(cq_poll->cint_idx),
> -			     BIT_ULL(0));
> +				BIT_ULL(0));

Unrelated and possibly misalinged?