vhost: generalize adding used elem
authorJason Wang <jasowang@redhat.com>
Fri, 24 May 2019 08:12:13 +0000 (04:12 -0400)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 5 Jun 2019 20:23:52 +0000 (16:23 -0400)
commit1ab5d1385af40272ca44a5cd38af7e13da6ed847
tree266251dade0c6ed9ae0fdae4efd48354918d2608
parentc1ea02f15ab5efb3e93fc3144d895410bf79fcf2
vhost: generalize adding used elem

Use one generic vhost_copy_to_user() instead of two dedicated
accessor. This will simplify the conversion to fine grain
accessors. About 2% improvement of PPS were seen during vitio-user
txonly test.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/vhost/vhost.c