search for: tun_is_little_endian

Displaying 20 results from an estimated 52 matches for "tun_is_little_endian".

2015 Apr 23
0
[PATCH v5 2/8] tun: add tun_is_little_endian() helper
...drivers/net/tun.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 857dca4..3c3d6c0 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -206,14 +206,19 @@ struct tun_struct { u32 flow_count; }; +static inline bool tun_is_little_endian(struct tun_struct *tun) +{ + return tun->flags & TUN_VNET_LE; +} + static inline u16 tun16_to_cpu(struct tun_struct *tun, __virtio16 val) { - return __virtio16_to_cpu(tun->flags & TUN_VNET_LE, val); + return __virtio16_to_cpu(tun_is_little_endian(tun), val); } static inline __vi...
2015 Apr 24
0
[PATCH v6 2/8] tun: add tun_is_little_endian() helper
...drivers/net/tun.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 857dca4..3c3d6c0 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -206,14 +206,19 @@ struct tun_struct { u32 flow_count; }; +static inline bool tun_is_little_endian(struct tun_struct *tun) +{ + return tun->flags & TUN_VNET_LE; +} + static inline u16 tun16_to_cpu(struct tun_struct *tun, __virtio16 val) { - return __virtio16_to_cpu(tun->flags & TUN_VNET_LE, val); + return __virtio16_to_cpu(tun_is_little_endian(tun), val); } static inline __vi...
2015 Jun 01
1
[PATCH v6 2/8] tun: add tun_is_little_endian() helper
..., 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/tun.c b/drivers/net/tun.c > index 857dca4..3c3d6c0 100644 > --- a/drivers/net/tun.c > +++ b/drivers/net/tun.c > @@ -206,14 +206,19 @@ struct tun_struct { > u32 flow_count; > }; > > +static inline bool tun_is_little_endian(struct tun_struct *tun) > +{ > + return tun->flags & TUN_VNET_LE; > +} > + > static inline u16 tun16_to_cpu(struct tun_struct *tun, __virtio16 val) > { > - return __virtio16_to_cpu(tun->flags & TUN_VNET_LE, val); > + return __virtio16_to_cpu(tun_is_little_end...
2015 Jun 01
1
[PATCH v6 2/8] tun: add tun_is_little_endian() helper
..., 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/tun.c b/drivers/net/tun.c > index 857dca4..3c3d6c0 100644 > --- a/drivers/net/tun.c > +++ b/drivers/net/tun.c > @@ -206,14 +206,19 @@ struct tun_struct { > u32 flow_count; > }; > > +static inline bool tun_is_little_endian(struct tun_struct *tun) > +{ > + return tun->flags & TUN_VNET_LE; > +} > + > static inline u16 tun16_to_cpu(struct tun_struct *tun, __virtio16 val) > { > - return __virtio16_to_cpu(tun->flags & TUN_VNET_LE, val); > + return __virtio16_to_cpu(tun_is_little_end...
2017 Jan 20
4
[PATCH net] virtio-net: restore VIRTIO_HDR_F_DATA_VALID on receiving
...net_hdr), iter) != diff --git a/drivers/net/tun.c b/drivers/net/tun.c index cd8e02c..2cd10b2 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1360,7 +1360,7 @@ static ssize_t tun_put_user(struct tun_struct *tun, return -EINVAL; if (virtio_net_hdr_from_skb(skb, &gso, - tun_is_little_endian(tun))) { + tun_is_little_endian(tun), true)) { struct skb_shared_info *sinfo = skb_shinfo(skb); pr_err("unexpected GSO type: " "0x%x, gso_size %d, hdr_len %d\n", diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 4a10500..3474243 10...
2017 Jan 20
4
[PATCH net] virtio-net: restore VIRTIO_HDR_F_DATA_VALID on receiving
...net_hdr), iter) != diff --git a/drivers/net/tun.c b/drivers/net/tun.c index cd8e02c..2cd10b2 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -1360,7 +1360,7 @@ static ssize_t tun_put_user(struct tun_struct *tun, return -EINVAL; if (virtio_net_hdr_from_skb(skb, &gso, - tun_is_little_endian(tun))) { + tun_is_little_endian(tun), true)) { struct skb_shared_info *sinfo = skb_shinfo(skb); pr_err("unexpected GSO type: " "0x%x, gso_size %d, hdr_len %d\n", diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 4a10500..3474243 10...
2017 Jan 22
2
[PATCH net] virtio-net: restore VIRTIO_HDR_F_DATA_VALID on receiving
...gt; index cd8e02c..2cd10b2 100644 >> --- a/drivers/net/tun.c >> +++ b/drivers/net/tun.c >> @@ -1360,7 +1360,7 @@ static ssize_t tun_put_user(struct tun_struct *tun, >> return -EINVAL; >> >> if (virtio_net_hdr_from_skb(skb, &gso, >> - tun_is_little_endian(tun))) { >> + tun_is_little_endian(tun), true)) { >> struct skb_shared_info *sinfo = skb_shinfo(skb); >> pr_err("unexpected GSO type: " >> "0x%x, gso_size %d, hdr_len %d\n", >> diff --git a/drivers/net/virtio_net.c b/dr...
2017 Jan 22
2
[PATCH net] virtio-net: restore VIRTIO_HDR_F_DATA_VALID on receiving
...gt; index cd8e02c..2cd10b2 100644 >> --- a/drivers/net/tun.c >> +++ b/drivers/net/tun.c >> @@ -1360,7 +1360,7 @@ static ssize_t tun_put_user(struct tun_struct *tun, >> return -EINVAL; >> >> if (virtio_net_hdr_from_skb(skb, &gso, >> - tun_is_little_endian(tun))) { >> + tun_is_little_endian(tun), true)) { >> struct skb_shared_info *sinfo = skb_shinfo(skb); >> pr_err("unexpected GSO type: " >> "0x%x, gso_size %d, hdr_len %d\n", >> diff --git a/drivers/net/virtio_net.c b/dr...
2015 May 12
2
[PATCH v6 0/8] vhost: support for cross endian guests
...Hi Michael, I realize you just got back and have tons of things to do... Do you still plan to apply shortly ? Would you also have time to comment the QEMU part ? Thanks. -- Greg > > Greg Kurz (8): > > virtio: introduce virtio_is_little_endian() helper > > tun: add tun_is_little_endian() helper > > macvtap: introduce macvtap_is_little_endian() helper > > vringh: introduce vringh_is_little_endian() helper > > vhost: introduce vhost_is_little_endian() helper > > virtio: add explicit big-endian support to memory accessors > >...
2015 May 12
2
[PATCH v6 0/8] vhost: support for cross endian guests
...Hi Michael, I realize you just got back and have tons of things to do... Do you still plan to apply shortly ? Would you also have time to comment the QEMU part ? Thanks. -- Greg > > Greg Kurz (8): > > virtio: introduce virtio_is_little_endian() helper > > tun: add tun_is_little_endian() helper > > macvtap: introduce macvtap_is_little_endian() helper > > vringh: introduce vringh_is_little_endian() helper > > vhost: introduce vhost_is_little_endian() helper > > virtio: add explicit big-endian support to memory accessors > >...
2015 Apr 24
27
[PATCH v6 0/8] vhost: support for cross endian guests
Only cosmetic and documentation changes since v5. --- Greg Kurz (8): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian() helper vringh: introduce vringh_is_little_endian() helper vhost: introduce vhost_is_little_endian() helper virtio: add explicit big-endian support to memory accessors vhost: cross-endian support for legacy devices...
2015 Apr 24
27
[PATCH v6 0/8] vhost: support for cross endian guests
Only cosmetic and documentation changes since v5. --- Greg Kurz (8): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian() helper vringh: introduce vringh_is_little_endian() helper vhost: introduce vhost_is_little_endian() helper virtio: add explicit big-endian support to memory accessors vhost: cross-endian support for legacy devices...
2017 Jan 22
0
[PATCH net] virtio-net: restore VIRTIO_HDR_F_DATA_VALID on receiving
...b2 100644 > > > --- a/drivers/net/tun.c > > > +++ b/drivers/net/tun.c > > > @@ -1360,7 +1360,7 @@ static ssize_t tun_put_user(struct tun_struct *tun, > > > return -EINVAL; > > > if (virtio_net_hdr_from_skb(skb, &gso, > > > - tun_is_little_endian(tun))) { > > > + tun_is_little_endian(tun), true)) { > > > struct skb_shared_info *sinfo = skb_shinfo(skb); > > > pr_err("unexpected GSO type: " > > > "0x%x, gso_size %d, hdr_len %d\n", > > > diff --git a...
2015 Apr 10
16
[PATCH v4 0/8] vhost: support for cross endian guests
...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 vice-versa on ppc64 and ppc64le hosts. --- Greg Kurz (8): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian() helper vringh: introduce vringh_is_little_endian() helper vhost: introduce vhost_is_little_endian() helper virtio: add explicit big-endian support to memory accessors vhost: feature to set the vring endianness...
2015 Apr 10
16
[PATCH v4 0/8] vhost: support for cross endian guests
...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 vice-versa on ppc64 and ppc64le hosts. --- Greg Kurz (8): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian() helper vringh: introduce vringh_is_little_endian() helper vhost: introduce vhost_is_little_endian() helper virtio: add explicit big-endian support to memory accessors vhost: feature to set the vring endianness...
2015 Apr 23
16
[PATCH v5 0/8] vhost: support for cross endian guests
...64le host and back. No regressions on x86 as expected. My experimental QEMU tree is here: https://github.com/gkurz/qemu.git vhost/cross-endian I'd be glad if this series could make it to 4.1. Cheers. --- Greg Kurz (8): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian() helper vringh: introduce vringh_is_little_endian() helper vhost: introduce vhost_is_little_endian() helper virtio: add explicit big-endian support to memory accessors vhost: cross-endian support for legacy devices...
2015 Apr 23
16
[PATCH v5 0/8] vhost: support for cross endian guests
...64le host and back. No regressions on x86 as expected. My experimental QEMU tree is here: https://github.com/gkurz/qemu.git vhost/cross-endian I'd be glad if this series could make it to 4.1. Cheers. --- Greg Kurz (8): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian() helper vringh: introduce vringh_is_little_endian() helper vhost: introduce vhost_is_little_endian() helper virtio: add explicit big-endian support to memory accessors vhost: cross-endian support for legacy devices...
2017 Jan 20
0
[PATCH net] virtio-net: restore VIRTIO_HDR_F_DATA_VALID on receiving
...net/tun.c b/drivers/net/tun.c > index cd8e02c..2cd10b2 100644 > --- a/drivers/net/tun.c > +++ b/drivers/net/tun.c > @@ -1360,7 +1360,7 @@ static ssize_t tun_put_user(struct tun_struct *tun, > return -EINVAL; > > if (virtio_net_hdr_from_skb(skb, &gso, > - tun_is_little_endian(tun))) { > + tun_is_little_endian(tun), true)) { > struct skb_shared_info *sinfo = skb_shinfo(skb); > pr_err("unexpected GSO type: " > "0x%x, gso_size %d, hdr_len %d\n", > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c...
2015 Apr 07
13
[PATCH v3 0/7] vhost: support for cross endian guests
...et allows vhost to be used with legacy virtio when guest and host have a different endianness. Patches 1-6 remain the same as the previous post. Patch 7 was heavily changed according to MST's comments. --- Greg Kurz (7): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian() helper vringh: introduce vringh_is_little_endian() helper vhost: introduce vhost_is_little_endian() helper virtio: add explicit big-endian support to memory accessors vhost: feature to set the vring endianness d...
2015 Apr 07
13
[PATCH v3 0/7] vhost: support for cross endian guests
...et allows vhost to be used with legacy virtio when guest and host have a different endianness. Patches 1-6 remain the same as the previous post. Patch 7 was heavily changed according to MST's comments. --- Greg Kurz (7): virtio: introduce virtio_is_little_endian() helper tun: add tun_is_little_endian() helper macvtap: introduce macvtap_is_little_endian() helper vringh: introduce vringh_is_little_endian() helper vhost: introduce vhost_is_little_endian() helper virtio: add explicit big-endian support to memory accessors vhost: feature to set the vring endianness d...