s2io: Don't receive packets when the napi budget == 0
authorEric W. Biederman <ebiederm@xmission.com>
Sat, 15 Mar 2014 01:06:26 +0000 (18:06 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 15 Mar 2014 02:52:48 +0000 (22:52 -0400)
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>
drivers/net/ethernet/neterion/s2io.c

index 56e3a9d..d44fdb9 100644 (file)
@@ -2914,6 +2914,9 @@ static int rx_intr_handler(struct ring_info *ring_data, int budget)
        struct RxD1 *rxdp1;
        struct RxD3 *rxdp3;
 
+       if (budget <= 0)
+               return napi_pkts;
+
        get_info = ring_data->rx_curr_get_info;
        get_block = get_info.block_index;
        memcpy(&put_info, &ring_data->rx_curr_put_info, sizeof(put_info));