]> git.karo-electronics.de Git - karo-tx-linux.git/commit
virtio_net: fix support for small rings
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 9 Mar 2017 00:21:21 +0000 (02:21 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 9 May 2017 13:43:21 +0000 (16:43 +0300)
commitd85b758f72b05a774045545f24d70980e3e9aac4
treea759ede2153e54e53bb6965df242858a805c7dc7
parente377fcc8486d40867c6c217077ad0fa40977e060
virtio_net: fix support for small rings

When ring size is small (<32 entries) making buffers smaller means a
full ring might not be able to hold enough buffers to fit a single large
packet.

Make sure a ring full of buffers is large enough to allow at least one
packet of max size.

Fixes: 2613af0ed18a ("virtio_net: migrate mergeable rx buffers to page frag allocators")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/net/virtio_net.c