lkml.org 
[lkml]   [2015]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH net-next,1/1] hv_netvsc: call dump_rndis_message() only in netvsc debug mode
Date

> -----Original Message-----
> From: David Miller [mailto:davem@davemloft.net]
> Sent: Tuesday, April 21, 2015 2:49 PM
> To: Simon Xiao
> Cc: KY Srinivasan; Haiyang Zhang; devel@linuxdriverproject.org;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH net-next,1/1] hv_netvsc: call dump_rndis_message() only in
> netvsc debug mode
>
> From: sixiao@microsoft.com
> Date: Tue, 21 Apr 2015 15:58:05 -0700
>
> > From: Simon Xiao <sixiao@microsoft.com>
> >
> > Signed-off-by: Simon Xiao <sixiao@microsoft.com>
> > Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
> > Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
>
> I just gave you feedback on this patch in response to your original submission,
> do not ignore it.

Thanks for your feedback, David.

In current netvsc driver, for each packet received, it will call dump_rndis_message()
to try to dump the rndis packet information by netdev_dbg().
In non-debug mode, dump_rndis_message() will not dump anything
but it still initialize some local variables and process the switch logic in the function
of dump_rndis_message(), which is unnecessary, especially in high network throughput situation.

My change is to have a run-time config flag to control the execution of dump_rndis_message()
and avoid above unnecessary cost in non-debug mode.
In the default case, it will be non-debug mode,
and rndis_filter_receive() will not call dump_rndis_message()
which saves the above extra cost for each packet received.


\
 
 \ /
  Last update: 2015-04-22 00:21    [W:0.049 / U:6.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site