diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2014-03-14 21:03:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-14 22:52:47 -0400 |
commit | cb013ea12cf71fe5ec2f7939909cec4491409724 (patch) | |
tree | 3ac4ccf0b78811d448844c5a3bbb9a3dbcb5d52f | |
parent | 9b2c05713edb56a338536ab26541e155763c0961 (diff) |
ibmveth: Don't receive packets when the napi budget == 0
Processing any incoming packets with a with a napi budget of 0
is incorrect driver behavior.
This matters as netpoll will shortly call drivers with a budget of 0
to avoid receive packet processing happening in hard irq context.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/ibm/ibmveth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c index 1fc8334fc181..e75bdfcd1374 100644 --- a/drivers/net/ethernet/ibm/ibmveth.c +++ b/drivers/net/ethernet/ibm/ibmveth.c | |||
@@ -1072,7 +1072,7 @@ static int ibmveth_poll(struct napi_struct *napi, int budget) | |||
1072 | unsigned long lpar_rc; | 1072 | unsigned long lpar_rc; |
1073 | 1073 | ||
1074 | restart_poll: | 1074 | restart_poll: |
1075 | do { | 1075 | while (frames_processed < budget) { |
1076 | if (!ibmveth_rxq_pending_buffer(adapter)) | 1076 | if (!ibmveth_rxq_pending_buffer(adapter)) |
1077 | break; | 1077 | break; |
1078 | 1078 | ||
@@ -1121,7 +1121,7 @@ restart_poll: | |||
1121 | netdev->stats.rx_bytes += length; | 1121 | netdev->stats.rx_bytes += length; |
1122 | frames_processed++; | 1122 | frames_processed++; |
1123 | } | 1123 | } |
1124 | } while (frames_processed < budget); | 1124 | } |
1125 | 1125 | ||
1126 | ibmveth_replenish_task(adapter); | 1126 | ibmveth_replenish_task(adapter); |
1127 | 1127 | ||