]> git.baikalelectronics.ru Git - kernel.git/commit
vhost/net: fix up num_buffers endian-ness
authorMichael S. Tsirkin <mst@redhat.com>
Tue, 3 Feb 2015 09:07:06 +0000 (11:07 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 4 Feb 2015 21:59:31 +0000 (13:59 -0800)
commitce97a720acf017389bbd296652853d9a9da004db
treea7fab4ac90b4f820531e639a390998255b4fb2b1
parent35eeadab5365e870ac361d4f8a0aa33d8cadf16e
vhost/net: fix up num_buffers endian-ness

In virtio 1.0 mode, when mergeable buffers are enabled on a big-endian
host, num_buffers wasn't byte-swapped correctly, so large incoming
packets got corrupted.

To fix, fill it in within hdr - this also makes sure it gets
the correct type.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/vhost/net.c