From: Sowmini Varadhan Date: Thu, 6 Nov 2014 19:51:08 +0000 (-0500) Subject: sunvnet: Return from vnet_napi_event() if no packets to read X-Git-Tag: omap-for-v3.19/fixes-rc1~125^2~253^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c4ee3e70646d6bfdda55afe84016b914c7fdd0e;p=pandora-kernel.git sunvnet: Return from vnet_napi_event() if no packets to read vnet_event_napi() may be called as part of the NAPI ->poll, to resume reading descriptor rings. When no data is available, descriptor ring state (e.g., rcv_nxt) needs to be reset carefully to stay in lock-step with ldc_read(). In the interest of simplicity, the best way to do this is to return from vnet_event_napi() when there are no more packets to read. The next trip through ldc_rx will correctly set up the dring state. Signed-off-by: Sowmini Varadhan Tested-by: David Stevens Signed-off-by: David S. Miller --- Reading git-diff-tree failed