Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1457386 > unrolled thread

[PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check in napi poll

Started byIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
First post2016-08-07 00:00 +0200
Last post2016-08-09 14:20 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check in napi poll Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2016-08-07 00:00 +0200
    Re: [PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check  in napi poll Grygorii Strashko <grygorii.strashko@ti.com> - 2016-08-09 13:40 +0200
      Re: [PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check  in napi poll Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> - 2016-08-09 14:20 +0200

#1457386 — [PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check in napi poll

FromIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Date2016-08-07 00:00 +0200
Subject[PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check in napi poll
Message-ID<s3hNo-2UZ-21@gated-at.bofh.it>
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@linaro.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);
 	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);
 	return num_rx;
 }
 
-- 
1.9.1

[toc] | [next] | [standalone]


#1458635 — Re: [PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check in napi poll

FromGrygorii Strashko <grygorii.strashko@ti.com>
Date2016-08-09 13:40 +0200
SubjectRe: [PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check in napi poll
Message-ID<s4dy2-6VH-41@gated-at.bofh.it>
In reply to#1457386
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@linaro.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

[toc] | [prev] | [next] | [standalone]


#1458662 — Re: [PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check in napi poll

FromIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Date2016-08-09 14:20 +0200
SubjectRe: [PATCH v2 02/14] net: ethernet: ti: cpsw: remove redundant check in napi poll
Message-ID<s4eaK-7rr-25@gated-at.bofh.it>
In reply to#1458635

On 09.08.16 14:29, Grygorii Strashko wrote:
> 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@linaro.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
That was my first thought, but I worried about someone can use it.
If no one has objection, I'll drop the patch 12 and delete "poll" print at all.

>
>>  	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,
Ivan Khoronzhuk

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web