]> git.baikalelectronics.ru Git - kernel.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)
commit361ee25f5d1f6a0b8b85f5ea6cd2cebc97e7e66b
tree733f7f0efc83317cb6448986f0142c8c6e0b0d91
parent134718e2c765cea06f291e7df09ee51a2cd3cf90
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