Subject: Re: [net-next v2 11/16] i40e: remove chatty log messages

From: Sergei Shtylyov <[email-masked]>
Date: Fri, 20 Dec 2013 21:18:21 +0300

On 12/20/2013 07:46 PM, Jeff Kirsher wrote:

> From: Mitch Williams <[email-masked]>

> Don't complain when we disable queues that are already disable, or
> enable them when they're already enabled. This removes a bunch of bogus
> log messages that we see at every VF reset.

> Change-Id: Ia127be572abdccc48a53d8c43f8a07b8bb920de1
> Signed-off-by: Mitch Williams <[email-masked]>
> Signed-off-by: Jesse Brandeburg <[email-masked]>
> Tested-by: Kavindya Deegala <[email-masked]>
> Signed-off-by: Jeff Kirsher <[email-masked]>
> ---
>   drivers/net/ethernet/intel/i40e/i40e_main.c | 16 +++-------------
>   1 file changed, 3 insertions(+), 13 deletions(-)

> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index c0f78bc..38e07e6 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -2988,21 +2988,11 @@ static int i40e_vsi_control_tx(struct i40e_vsi *vsi, bool enable)
>   		} while (j-- && ((tx_reg >> I40E_QTX_ENA_QENA_REQ_SHIFT)
>   			       ^ (tx_reg >> I40E_QTX_ENA_QENA_STAT_SHIFT)) & 1);
>
> -		if (enable) {
> -			/* is STAT set ? */
> -			if ((tx_reg & I40E_QTX_ENA_QENA_STAT_MASK)) {
> -				dev_info(&pf->pdev->dev,
> -					 "Tx %d already enabled\n", i);
> +		/* Skip if the queue is already in the requested state */
> +		if (enable && (tx_reg & I40E_QTX_ENA_QENA_STAT_MASK))
>   				continue;

    This line seems over-indented now.

> -			}
> -		} else {
> -			/* is !STAT set ? */
> -			if (!(tx_reg & I40E_QTX_ENA_QENA_STAT_MASK)) {
> -				dev_info(&pf->pdev->dev,
> -					 "Tx %d already disabled\n", i);
> +		if (!enable && !(tx_reg & I40E_QTX_ENA_QENA_STAT_MASK))
>   				continue;

    This one too.

WBR, Sergei