i40e/i40evf: napi_poll must return the work done
authorAlexander Duyck <[email protected]>
Tue, 8 Nov 2016 21:05:16 +0000 (13:05 -0800)
committerJeff Kirsher <[email protected]>
Wed, 7 Dec 2016 04:46:13 +0000 (20:46 -0800)
commit6beb84a73ec5dbd051005068c130195f77e78cfc
treeccaa4613a5cf407d5b2a9c0a43849d6592203f66
parent1596b5ddbf25c3dd05aed208ea0bb57eac1c5524
i40e/i40evf: napi_poll must return the work done

Currently the function i40e_napi-poll() returns 0 when it clean completely
the Rx rings, but this foul budget accounting in core code.

Fix this by returning the actual work done, capped to budget - 1, since
the core doesn't allow to return the full budget when the driver modifies
the NAPI status

This is based on a similar change that was made for the ixgbe driver by
Paolo Abeni.

Change-ID: Ic3d93ad2fa2fc8ce3164bc461e69367da0f9173b
Signed-off-by: Alexander Duyck <[email protected]>
Tested-by: Andrew Bowers <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
drivers/net/ethernet/intel/i40e/i40e_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c