]> git.karo-electronics.de Git - karo-tx-linux.git/commit
virtio_net: do not reschedule rx refill forever
authorMichael S. Tsirkin <mst@redhat.com>
Fri, 2 Jul 2010 16:32:55 +0000 (16:32 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:29:17 +0000 (10:29 -0700)
commit5b5b5f08f32661973c8880c3aaeb916c735a2e8c
tree480fcec7a4ca64c15f8fd350fe842693f50c94c2
parente61dcd092ff55415060b37bb4a6cf855385768b9
virtio_net: do not reschedule rx refill forever

commit 1788f49548860fa1c861ee3454d47b466c877e43 upstream.

We currently fill all of RX ring, then add_buf
returns ENOSPC, which gets mis-detected as an out of
memory condition and causes us to reschedule the work,
and so on forever. Fix this by oom = err == -ENOMEM;

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/virtio_net.c