search for: macvtap16_to_cpu

Displaying 20 results from an estimated 31 matches for "macvtap16_to_cpu".

2016 Jun 08
7
[PATCH 0/6] virtio_net: use common code for virtio_net_hdr and skb GSO conversion
Hi, This patches introduce virtio_net_hdr_{from,to}_skb functions for conversion of GSO information between skb and virtio_net_hdr. Mike Rapoport (6): virtio_net: add _UAPI prefix to virtio_net header guards virtio_net: introduce virtio_net_hdr_{from,to}_skb macvtap: use common code for virtio_net_hdr and skb GSO conversion tuntap: use common code for virtio_net_hdr and skb GSO
2016 Jun 08
7
[PATCH 0/6] virtio_net: use common code for virtio_net_hdr and skb GSO conversion
Hi, This patches introduce virtio_net_hdr_{from,to}_skb functions for conversion of GSO information between skb and virtio_net_hdr. Mike Rapoport (6): virtio_net: add _UAPI prefix to virtio_net header guards virtio_net: introduce virtio_net_hdr_{from,to}_skb macvtap: use common code for virtio_net_hdr and skb GSO conversion tuntap: use common code for virtio_net_hdr and skb GSO
2015 Apr 07
1
[PATCH v3 6/7] virtio: add explicit big-endian support to memory accessors
...ueue { > > static inline bool macvtap_is_little_endian(struct macvtap_queue *q) > { > - return q->flags & MACVTAP_VNET_LE; > + if (q->flags & MACVTAP_VNET_LE) > + return true; > + return virtio_legacy_is_little_endian(); > } > > static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) Hmm I'm not sure how well this will work once you actually make it dynamic. Remains to be seen. > diff --git a/drivers/net/tun.c b/drivers/net/tun.c > index 3c3d6c0..053f9b6 100644 > --- a/drivers/net/tun.c > +++ b/drivers/net/tun.c > @@...
2015 Apr 07
1
[PATCH v3 6/7] virtio: add explicit big-endian support to memory accessors
...ueue { > > static inline bool macvtap_is_little_endian(struct macvtap_queue *q) > { > - return q->flags & MACVTAP_VNET_LE; > + if (q->flags & MACVTAP_VNET_LE) > + return true; > + return virtio_legacy_is_little_endian(); > } > > static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) Hmm I'm not sure how well this will work once you actually make it dynamic. Remains to be seen. > diff --git a/drivers/net/tun.c b/drivers/net/tun.c > index 3c3d6c0..053f9b6 100644 > --- a/drivers/net/tun.c > +++ b/drivers/net/tun.c > @@...
2015 Apr 21
1
[PATCH v4 6/8] virtio: add explicit big-endian support to memory accessors
...CVTAP_VNET_LE) + return true; + else + return virtio_legacy_is_little_endian(); Or better just: return (q->flags & MACVTAP_VNET_LE) ? true : virtio_legacy_is_little_endian(); might make line long, but your follow-up patch makes it short again, so that's ok. > static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) > diff --git a/drivers/net/tun.c b/drivers/net/tun.c > index 3c3d6c0..053f9b6 100644 > --- a/drivers/net/tun.c > +++ b/drivers/net/tun.c > @@ -208,7 +208,9 @@ struct tun_struct { > > static inline bool tun_is_little_endian(struct tun_...
2015 Apr 21
1
[PATCH v4 6/8] virtio: add explicit big-endian support to memory accessors
...CVTAP_VNET_LE) + return true; + else + return virtio_legacy_is_little_endian(); Or better just: return (q->flags & MACVTAP_VNET_LE) ? true : virtio_legacy_is_little_endian(); might make line long, but your follow-up patch makes it short again, so that's ok. > static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) > diff --git a/drivers/net/tun.c b/drivers/net/tun.c > index 3c3d6c0..053f9b6 100644 > --- a/drivers/net/tun.c > +++ b/drivers/net/tun.c > @@ -208,7 +208,9 @@ struct tun_struct { > > static inline bool tun_is_little_endian(struct tun_...
2015 Apr 23
0
[PATCH v5 3/8] macvtap: introduce macvtap_is_little_endian() helper
...c5c..a2f2958 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -49,14 +49,19 @@ struct macvtap_queue { #define MACVTAP_VNET_LE 0x80000000 +static inline bool macvtap_is_little_endian(struct macvtap_queue *q) +{ + return q->flags & MACVTAP_VNET_LE; +} + static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) { - return __virtio16_to_cpu(q->flags & MACVTAP_VNET_LE, val); + return __virtio16_to_cpu(macvtap_is_little_endian(q), val); } static inline __virtio16 cpu_to_macvtap16(struct macvtap_queue *q, u16 val) { - return __cpu_to_virtio16(q->flags &...
2015 Apr 24
0
[PATCH v6 3/8] macvtap: introduce macvtap_is_little_endian() helper
...c5c..a2f2958 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -49,14 +49,19 @@ struct macvtap_queue { #define MACVTAP_VNET_LE 0x80000000 +static inline bool macvtap_is_little_endian(struct macvtap_queue *q) +{ + return q->flags & MACVTAP_VNET_LE; +} + static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) { - return __virtio16_to_cpu(q->flags & MACVTAP_VNET_LE, val); + return __virtio16_to_cpu(macvtap_is_little_endian(q), val); } static inline __virtio16 cpu_to_macvtap16(struct macvtap_queue *q, u16 val) { - return __cpu_to_virtio16(q->flags &...
2015 Jun 01
1
[PATCH v6 3/8] macvtap: introduce macvtap_is_little_endian() helper
...+ b/drivers/net/macvtap.c > @@ -49,14 +49,19 @@ struct macvtap_queue { > > #define MACVTAP_VNET_LE 0x80000000 > > +static inline bool macvtap_is_little_endian(struct macvtap_queue *q) > +{ > + return q->flags & MACVTAP_VNET_LE; > +} > + > static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) > { > - return __virtio16_to_cpu(q->flags & MACVTAP_VNET_LE, val); > + return __virtio16_to_cpu(macvtap_is_little_endian(q), val); > } > > static inline __virtio16 cpu_to_macvtap16(struct macvtap_queue *q, u16 val) > { >...
2015 Jun 01
1
[PATCH v6 3/8] macvtap: introduce macvtap_is_little_endian() helper
...+ b/drivers/net/macvtap.c > @@ -49,14 +49,19 @@ struct macvtap_queue { > > #define MACVTAP_VNET_LE 0x80000000 > > +static inline bool macvtap_is_little_endian(struct macvtap_queue *q) > +{ > + return q->flags & MACVTAP_VNET_LE; > +} > + > static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) > { > - return __virtio16_to_cpu(q->flags & MACVTAP_VNET_LE, val); > + return __virtio16_to_cpu(macvtap_is_little_endian(q), val); > } > > static inline __virtio16 cpu_to_macvtap16(struct macvtap_queue *q, u16 val) > { >...
2015 Apr 23
16
[PATCH v5 0/8] vhost: support for cross endian guests
Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. It is compatible with modern virtio and can be fully compiled out through kernel config. FWIW, I could flawlessly kexec/reboot guests from ppc64 to ppc64le and back. I could also migrate from a ppc64 to a ppc64le host and back. No regressions on x86 as expected. My experimental QEMU tree
2015 Apr 23
16
[PATCH v5 0/8] vhost: support for cross endian guests
Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. It is compatible with modern virtio and can be fully compiled out through kernel config. FWIW, I could flawlessly kexec/reboot guests from ppc64 to ppc64le and back. I could also migrate from a ppc64 to a ppc64le host and back. No regressions on x86 as expected. My experimental QEMU tree
2015 Apr 21
2
[PATCH v4 8/8] macvtap/tun: add VNET_BE flag
...endif > > static inline bool macvtap_is_little_endian(struct macvtap_queue *q) > { > if (q->flags & MACVTAP_VNET_LE) > return true; > - return virtio_legacy_is_little_endian(); > + return macvtap_legacy_is_little_endian(q); > } > > static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) > @@ -1000,6 +1015,43 @@ static int set_offload(struct macvtap_queue *q, unsigned long arg) > return 0; > } > > +#ifdef CONFIG_TUN_VNET_BE > +static long macvtap_get_vnet_be(struct macvtap_queue *q, int __user *sp) > +{ > + int s...
2015 Apr 21
2
[PATCH v4 8/8] macvtap/tun: add VNET_BE flag
...endif > > static inline bool macvtap_is_little_endian(struct macvtap_queue *q) > { > if (q->flags & MACVTAP_VNET_LE) > return true; > - return virtio_legacy_is_little_endian(); > + return macvtap_legacy_is_little_endian(q); > } > > static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) > @@ -1000,6 +1015,43 @@ static int set_offload(struct macvtap_queue *q, unsigned long arg) > return 0; > } > > +#ifdef CONFIG_TUN_VNET_BE > +static long macvtap_get_vnet_be(struct macvtap_queue *q, int __user *sp) > +{ > + int s...
2015 Apr 10
16
[PATCH v4 0/8] vhost: support for cross endian guests
Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. Patch 7 got rewritten according to Cornelia's and Michael's comments. I have also introduced patch 8 that brings BE vnet headers support to tun/macvtap. This series is enough to have vhost_net working flawlessly. I could succesfully reboot guests from ppc64 to ppc64le and
2015 Apr 10
16
[PATCH v4 0/8] vhost: support for cross endian guests
Hi, This patchset allows vhost to be used with legacy virtio when guest and host have a different endianness. Patch 7 got rewritten according to Cornelia's and Michael's comments. I have also introduced patch 8 that brings BE vnet headers support to tun/macvtap. This series is enough to have vhost_net working flawlessly. I could succesfully reboot guests from ppc64 to ppc64le and
2015 Apr 07
0
[PATCH v3 6/7] virtio: add explicit big-endian support to memory accessors
...s/net/macvtap.c @@ -51,7 +51,9 @@ struct macvtap_queue { static inline bool macvtap_is_little_endian(struct macvtap_queue *q) { - return q->flags & MACVTAP_VNET_LE; + if (q->flags & MACVTAP_VNET_LE) + return true; + return virtio_legacy_is_little_endian(); } static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 3c3d6c0..053f9b6 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -208,7 +208,9 @@ struct tun_struct { static inline bool tun_is_little_endian(struct tun_struct *tun) { - return tun->fl...
2015 Apr 10
0
[PATCH v4 6/8] virtio: add explicit big-endian support to memory accessors
...s/net/macvtap.c @@ -51,7 +51,9 @@ struct macvtap_queue { static inline bool macvtap_is_little_endian(struct macvtap_queue *q) { - return q->flags & MACVTAP_VNET_LE; + if (q->flags & MACVTAP_VNET_LE) + return true; + return virtio_legacy_is_little_endian(); } static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 3c3d6c0..053f9b6 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -208,7 +208,9 @@ struct tun_struct { static inline bool tun_is_little_endian(struct tun_struct *tun) { - return tun->fl...
2015 Apr 24
0
[PATCH v6 6/8] virtio: add explicit big-endian support to memory accessors
...ap.c +++ b/drivers/net/macvtap.c @@ -51,7 +51,8 @@ struct macvtap_queue { static inline bool macvtap_is_little_endian(struct macvtap_queue *q) { - return q->flags & MACVTAP_VNET_LE; + return q->flags & MACVTAP_VNET_LE || + virtio_legacy_is_little_endian(); } static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 3c3d6c0..7c4f6b6 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -208,7 +208,8 @@ struct tun_struct { static inline bool tun_is_little_endian(struct tun_struct *tun) { - return tun->fl...
2015 Apr 23
0
[PATCH v5 6/8] virtio: add explicit big-endian support to memory accessors
...vtap.c @@ -51,7 +51,10 @@ struct macvtap_queue { static inline bool macvtap_is_little_endian(struct macvtap_queue *q) { - return q->flags & MACVTAP_VNET_LE; + if (q->flags & MACVTAP_VNET_LE) + return true; + else + return virtio_legacy_is_little_endian(); } static inline u16 macvtap16_to_cpu(struct macvtap_queue *q, __virtio16 val) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 3c3d6c0..5b044d4 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -208,7 +208,10 @@ struct tun_struct { static inline bool tun_is_little_endian(struct tun_struct *tun) { - return tun->f...