]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
amd-xgbe: Fix napi Rx budget accounting
authorLendacky, Thomas <Thomas.Lendacky@amd.com>
Wed, 22 Oct 2014 16:26:17 +0000 (11:26 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Oct 2014 21:50:31 +0000 (17:50 -0400)
commit55ca6bcd733b739d5667d48d7591899f376dcfb8
tree733f7f0efc83317cb6448986f0142c8c6e0b0d91
parent386f1c9650b7fe4849d2942bd42f41f0ca3aedfb
amd-xgbe: Fix napi Rx budget accounting

Currently the amd-xgbe driver increments the packets processed counter
each time a descriptor is processed.  Since a packet can be represented
by more than one descriptor incrementing the counter in this way is not
appropriate.  Also, since multiple descriptors cause the budget check
to be short circuited, sometimes the returned value from the poll
function would be larger than the budget value resulting in a WARN_ONCE
being triggered.

Update the polling logic to properly account for the number of packets
processed and exit when the budget value is reached.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/xgbe/xgbe-drv.c