Commit 99a09c26 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by David S. Miller

s2io: 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: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 38be0a34
...@@ -2914,6 +2914,9 @@ static int rx_intr_handler(struct ring_info *ring_data, int budget) ...@@ -2914,6 +2914,9 @@ static int rx_intr_handler(struct ring_info *ring_data, int budget)
struct RxD1 *rxdp1; struct RxD1 *rxdp1;
struct RxD3 *rxdp3; struct RxD3 *rxdp3;
if (budget <= 0)
return napi_pkts;
get_info = ring_data->rx_curr_get_info; get_info = ring_data->rx_curr_get_info;
get_block = get_info.block_index; get_block = get_info.block_index;
memcpy(&put_info, &ring_data->rx_curr_put_info, sizeof(put_info)); memcpy(&put_info, &ring_data->rx_curr_put_info, sizeof(put_info));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment