Subject: Re: [PATCH net-next v5 6/8] net: wangxun: add coalesce options support

From: Jakub Kicinski <[email-masked]>
Date: Fri, 15 Dec 2023 18:38:26 -0800

On Thu, 14 Dec 2023 10:54:54 +0800 Jiawen Wu wrote:
> +	ec->tx_max_coalesced_frames_irq = wx->tx_work_limit;
> +	/* only valid if in constant ITR mode */
> +	if (wx->rx_itr_setting <= 1)
> +		ec->rx_coalesce_usecs = wx->rx_itr_setting;
> +	else
> +		ec->rx_coalesce_usecs = wx->rx_itr_setting >> 2;
> +
> +	/* if in mixed tx/rx queues per vector mode, report only rx settings */

What if there's only a Tx queue? You'll report both rx and tx 
coalescing params?

> +	if (wx->q_vector[0]->tx.count && wx->q_vector[0]->rx.count)
> +		return 0;
> +
> +	/* only valid if in constant ITR mode */
> +	if (wx->tx_itr_setting <= 1)
> +		ec->tx_coalesce_usecs = wx->tx_itr_setting;
> +	else
> +		ec->tx_coalesce_usecs = wx->tx_itr_setting >> 2;