lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c3f81cb3-2a1c-89e5-b2f0-a67e220fb5ca@ti.com>
Date:	Tue, 9 Aug 2016 14:29:58 +0300
From:	Grygorii Strashko <grygorii.strashko@...com>
To:	Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>,
	<netdev@...r.kernel.org>, <mugunthanvnm@...com>
CC:	<linux-omap@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<dlide@...com>
Subject: Re: [PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check
 in napi poll

On 08/06/2016 01:48 PM, Ivan Khoronzhuk wrote:
> No need to check number of handled packets, when in most cases (> 99%)
> it's not 0. It can be 0 only in rare cases, even in this case
> it's not bad to print just 0.
> 
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>
> ---
>  drivers/net/ethernet/ti/cpsw.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
> index 8972bf6..85ee9f5 100644
> --- a/drivers/net/ethernet/ti/cpsw.c
> +++ b/drivers/net/ethernet/ti/cpsw.c
> @@ -793,9 +793,7 @@ static int cpsw_tx_poll(struct napi_struct *napi_tx, int budget)
>  		}
>  	}
>  
> -	if (num_tx)
> -		cpsw_dbg(priv, intr, "poll %d tx pkts\n", num_tx);
> -
> +	cpsw_dbg(priv, intr, "poll %d tx pkts\n", num_tx);

I think, this dbg log can be just dropped as it seems not very useful.
This also will allow to drop patch [PATCH v2 12/14] net: ethernet: ti: cpsw: fix int dbg message

>  	return num_tx;
>  }
>  
> @@ -814,9 +812,7 @@ static int cpsw_rx_poll(struct napi_struct *napi_rx, int budget)
>  		}
>  	}
>  
> -	if (num_rx)
> -		cpsw_dbg(priv, intr, "poll %d rx pkts\n", num_rx);
> -
> +	cpsw_dbg(priv, intr, "poll %d rx pkts\n", num_rx);

Same here.

>  	return num_rx;
>  }
>  
> 


-- 
regards,
-grygorii

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ