netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH v6 2/8] tun: add tun_is_little_endian() helper
       [not found] ` <20150424122435.19156.18985.stgit@bahia.local>
@ 2015-06-01 10:29   ` Michael S. Tsirkin
  2015-06-01 23:38     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2015-06-01 10:29 UTC (permalink / raw)
  To: Greg Kurz
  Cc: Thomas Huth, kvm, linux-api, linux-kernel, virtualization, netdev,
	David Miller

On Fri, Apr 24, 2015 at 02:24:38PM +0200, Greg Kurz wrote:
> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>

Dave, could you please ack merging this through
the virtio tree?

> ---
>  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 __virtio16 cpu_to_tun16(struct tun_struct *tun, u16 val)
>  {
> -	return __cpu_to_virtio16(tun->flags & TUN_VNET_LE, val);
> +	return __cpu_to_virtio16(tun_is_little_endian(tun), val);
>  }
>  
>  static inline u32 tun_hashfn(u32 rxhash)
> 
> _______________________________________________
> Virtualization mailing list
> Virtualization@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v6 3/8] macvtap: introduce macvtap_is_little_endian() helper
       [not found] ` <20150424122446.19156.93123.stgit@bahia.local>
@ 2015-06-01 10:30   ` Michael S. Tsirkin
  2015-06-01 23:38     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2015-06-01 10:30 UTC (permalink / raw)
  To: Greg Kurz
  Cc: Thomas Huth, kvm, linux-api, linux-kernel, virtualization, netdev,
	David Miller

On Fri, Apr 24, 2015 at 02:24:48PM +0200, Greg Kurz wrote:
> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>

Dave, could you pls ack merging this through the virtio tree?

> ---
>  drivers/net/macvtap.c |    9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
> index 27ecc5c..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 & MACVTAP_VNET_LE, val);
> +	return __cpu_to_virtio16(macvtap_is_little_endian(q), val);
>  }
>  
>  static struct proto macvtap_proto = {
> 
> _______________________________________________
> Virtualization mailing list
> Virtualization@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v6 2/8] tun: add tun_is_little_endian() helper
  2015-06-01 10:29   ` [PATCH v6 2/8] tun: add tun_is_little_endian() helper Michael S. Tsirkin
@ 2015-06-01 23:38     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-06-01 23:38 UTC (permalink / raw)
  To: mst; +Cc: thuth, kvm, linux-api, linux-kernel, virtualization, netdev

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Mon, 1 Jun 2015 12:29:43 +0200

> On Fri, Apr 24, 2015 at 02:24:38PM +0200, Greg Kurz wrote:
>> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
> 
> Dave, could you please ack merging this through
> the virtio tree?

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v6 3/8] macvtap: introduce macvtap_is_little_endian() helper
  2015-06-01 10:30   ` [PATCH v6 3/8] macvtap: introduce macvtap_is_little_endian() helper Michael S. Tsirkin
@ 2015-06-01 23:38     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2015-06-01 23:38 UTC (permalink / raw)
  To: mst; +Cc: thuth, kvm, linux-api, linux-kernel, virtualization, netdev

From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Mon, 1 Jun 2015 12:30:16 +0200

> On Fri, Apr 24, 2015 at 02:24:48PM +0200, Greg Kurz wrote:
>> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
> 
> Dave, could you pls ack merging this through the virtio tree?

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-06-01 23:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20150424122211.19156.97626.stgit@bahia.local>
     [not found] ` <20150424122435.19156.18985.stgit@bahia.local>
2015-06-01 10:29   ` [PATCH v6 2/8] tun: add tun_is_little_endian() helper Michael S. Tsirkin
2015-06-01 23:38     ` David Miller
     [not found] ` <20150424122446.19156.93123.stgit@bahia.local>
2015-06-01 10:30   ` [PATCH v6 3/8] macvtap: introduce macvtap_is_little_endian() helper Michael S. Tsirkin
2015-06-01 23:38     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).