diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2014-03-14 21:08:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-14 22:52:48 -0400 |
commit | d110ec4533261e7f9d89bfeeae80cc50fd9e7468 (patch) | |
tree | e58fb56f740773da45bb2ee41999e1aea29dc6f8 /drivers/net/ethernet/tile | |
parent | 99a09c26a8f353bc35087ffa8cc47ffdd6d5d5bc (diff) |
tilegx: 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>
Diffstat (limited to 'drivers/net/ethernet/tile')
-rw-r--r-- | drivers/net/ethernet/tile/tilegx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c index 17503da9f7a5..b43f1b3b9632 100644 --- a/drivers/net/ethernet/tile/tilegx.c +++ b/drivers/net/ethernet/tile/tilegx.c | |||
@@ -659,6 +659,9 @@ static int tile_net_poll(struct napi_struct *napi, int budget) | |||
659 | struct info_mpipe *info_mpipe = | 659 | struct info_mpipe *info_mpipe = |
660 | container_of(napi, struct info_mpipe, napi); | 660 | container_of(napi, struct info_mpipe, napi); |
661 | 661 | ||
662 | if (budget <= 0) | ||
663 | goto done; | ||
664 | |||
662 | instance = info_mpipe->instance; | 665 | instance = info_mpipe->instance; |
663 | while ((n = gxio_mpipe_iqueue_try_peek( | 666 | while ((n = gxio_mpipe_iqueue_try_peek( |
664 | &info_mpipe->iqueue, | 667 | &info_mpipe->iqueue, |