]> git.baikalelectronics.ru Git - kernel.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)
commit080bc0cd52b7be2c43a0e7ea32d148971cbb3fb7
treea759ede2153e54e53bb6965df242858a805c7dc7
parentdc66aa9c45799dab5cf8cc86198559ebc1c0fd45
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: de4826a7cfe2 ("virtio_net: migrate mergeable rx buffers to page frag allocators")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/net/virtio_net.c