vhost-net: tell tap backend about the vnet endianness
commit5be7d9f1b1452613b95c6ba70b8d7ad3d0797991
authorGreg Kurz <gkurz@linux.vnet.ibm.com>
Wed, 17 Jun 2015 13:23:49 +0000 (17 15:23 +0200)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 19 Jun 2015 10:17:49 +0000 (19 12:17 +0200)
tree2d2269a330f8fccbbc3e4c818f536d002911c47d
parent4ee9b43be9a6e4ae161a1e6322bfef90818589f6
vhost-net: tell tap backend about the vnet endianness

The default behaviour for TAP/MACVTAP is to consider vnet as native endian.

This patch handles the cases when this is not true:
- virtio 1.0: always little-endian
- legacy cross-endian

Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/net/vhost_net.c