]> git.baikalelectronics.ru Git - kernel.git/commit
vmxnet3: fix starving rx ring whenoc_skb kb fails
authorShreyas Bhatewara <sbhatewara@vmware.com>
Tue, 5 Jul 2011 14:34:05 +0000 (14:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jul 2011 01:39:40 +0000 (18:39 -0700)
commit201035c08d1230c5f242a03eade0eeff1cd1a3f2
tree2e676330331419d9bb2e3d17f2f97462df7ce548
parentb74834ae1359cb08b920d4d1c86d591c8f9119b8
vmxnet3: fix starving rx ring whenoc_skb kb fails

If the rx ring is completely empty, then the device may never fire an rx
interrupt. Unfortunately, the rx interrupt is what triggers populating the
rx ring with fresh buffers, so this will cause networking to lock up.

This patch replenishes the skb in recv descriptor as soon as it is
peeled off while processing rx completions. If the skb/buffer
allocation fails, existing one is recycled and the packet in hand is
dropped. This way none of the RX desc is ever left empty, thus avoiding
starvation

Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vmxnet3/vmxnet3_drv.c
drivers/net/vmxnet3/vmxnet3_int.h