From: Greg Kurz Date: Fri, 24 Apr 2015 12:50:36 +0000 (+0200) Subject: macvtap/tun: cross-endian support for little-endian hosts X-Git-Tag: omap-for-v4.2/fixes-rc1^2~18^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b8e658b16336f0f50aba733f51db636ef121f50;p=pandora-kernel.git macvtap/tun: cross-endian support for little-endian hosts The VNET_LE flag was introduced to fix accesses to virtio 1.0 headers that are always little-endian. It can also be used to handle the special case of a legacy little-endian device implemented by a big-endian host. Let's add a flag and ioctls for big-endian devices as well. If both flags are set, little-endian wins. Since this is isn't a common usecase, the feature is controlled by a kernel config option (not set by default). Both macvtap and tun are covered by this patch since they share the same API with userland. Signed-off-by: Greg Kurz Signed-off-by: Michael S. Tsirkin Reviewed-by: David Gibson --- Reading git-diff-tree failed