]> git.baikalelectronics.ru Git - kernel.git/commit
vhost: handle wrap around in # of bufs math
authorShirley Ma <mashirle@us.ibm.com>
Wed, 20 Jul 2011 17:23:12 +0000 (10:23 -0700)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 21 Jul 2011 07:48:27 +0000 (10:48 +0300)
commit6daa2c180c255752f853499cdc9f04182018d7f9
tree4fdf3f2609da5ee3222103682f3ce10c976353d0
parent8db9bed7b5d240faf6a134603b3b8e1edfab0ecb
vhost: handle wrap around in # of bufs math

The meth for calculating the # of outstanding buffers gives
incorrect results when vq->upend_idx wraps around zero.
Fix that.

Signed-off-by: Shirley Ma <xma@us.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/net.c