linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] hyper-v: Remove internal types from UAPI header
@ 2020-04-22 13:18 Andy Shevchenko
  2020-04-22 13:41 ` Wei Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2020-04-22 13:18 UTC (permalink / raw)
  To: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu,
	linux-hyperv
  Cc: Andy Shevchenko

The uuid_le mistakenly comes to be an UAPI type. Since it's luckily not used by
Hyper-V APIs, we may replace with POD types, i.e. __u8 array.

Note, previously shared uuid_be had been removed from UAPI few releases ago.
This is a continuation of that process towards removing uuid_le one.

Note, there is no ABI change!

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/uapi/linux/hyperv.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/uapi/linux/hyperv.h b/include/uapi/linux/hyperv.h
index 991b2b7ada7a3..8f24404ad04f1 100644
--- a/include/uapi/linux/hyperv.h
+++ b/include/uapi/linux/hyperv.h
@@ -119,8 +119,8 @@ enum hv_fcopy_op {
 
 struct hv_fcopy_hdr {
 	__u32 operation;
-	uuid_le service_id0; /* currently unused */
-	uuid_le service_id1; /* currently unused */
+	__u8 service_id0[16]; /* currently unused */
+	__u8 service_id1[16]; /* currently unused */
 } __attribute__((packed));
 
 #define OVER_WRITE	0x1
-- 
2.26.1


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

* Re: [PATCH v1] hyper-v: Remove internal types from UAPI header
  2020-04-22 13:18 [PATCH v1] hyper-v: Remove internal types from UAPI header Andy Shevchenko
@ 2020-04-22 13:41 ` Wei Liu
  2020-04-22 14:15   ` Andy Shevchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Liu @ 2020-04-22 13:41 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, Wei Liu,
	linux-hyperv

On Wed, Apr 22, 2020 at 04:18:18PM +0300, Andy Shevchenko wrote:
> The uuid_le mistakenly comes to be an UAPI type. Since it's luckily not used by
> Hyper-V APIs, we may replace with POD types, i.e. __u8 array.
> 
> Note, previously shared uuid_be had been removed from UAPI few releases ago.
> This is a continuation of that process towards removing uuid_le one.
> 
> Note, there is no ABI change!
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Can you clarify why guid_t is not used instead? Is the plan to remove it
from UAPI as well?

Wei.

> ---
>  include/uapi/linux/hyperv.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/uapi/linux/hyperv.h b/include/uapi/linux/hyperv.h
> index 991b2b7ada7a3..8f24404ad04f1 100644
> --- a/include/uapi/linux/hyperv.h
> +++ b/include/uapi/linux/hyperv.h
> @@ -119,8 +119,8 @@ enum hv_fcopy_op {
>  
>  struct hv_fcopy_hdr {
>  	__u32 operation;
> -	uuid_le service_id0; /* currently unused */
> -	uuid_le service_id1; /* currently unused */
> +	__u8 service_id0[16]; /* currently unused */
> +	__u8 service_id1[16]; /* currently unused */
>  } __attribute__((packed));
>  
>  #define OVER_WRITE	0x1
> -- 
> 2.26.1
> 

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

* Re: [PATCH v1] hyper-v: Remove internal types from UAPI header
  2020-04-22 13:41 ` Wei Liu
@ 2020-04-22 14:15   ` Andy Shevchenko
  2020-04-22 19:38     ` Wei Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2020-04-22 14:15 UTC (permalink / raw)
  To: Wei Liu; +Cc: K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger, linux-hyperv

On Wed, Apr 22, 2020 at 02:41:27PM +0100, Wei Liu wrote:
> On Wed, Apr 22, 2020 at 04:18:18PM +0300, Andy Shevchenko wrote:
> > The uuid_le mistakenly comes to be an UAPI type. Since it's luckily not used by
> > Hyper-V APIs, we may replace with POD types, i.e. __u8 array.
> > 
> > Note, previously shared uuid_be had been removed from UAPI few releases ago.
> > This is a continuation of that process towards removing uuid_le one.
> > 
> > Note, there is no ABI change!
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Can you clarify why guid_t is not used instead?

It's internal type to the kernel. The libuuid or so should provide a compatible
type(s) for user space.

> Is the plan to remove it
> from UAPI as well?

Yes.

> Wei.
> 
> > ---
> >  include/uapi/linux/hyperv.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/include/uapi/linux/hyperv.h b/include/uapi/linux/hyperv.h
> > index 991b2b7ada7a3..8f24404ad04f1 100644
> > --- a/include/uapi/linux/hyperv.h
> > +++ b/include/uapi/linux/hyperv.h
> > @@ -119,8 +119,8 @@ enum hv_fcopy_op {
> >  
> >  struct hv_fcopy_hdr {
> >  	__u32 operation;
> > -	uuid_le service_id0; /* currently unused */
> > -	uuid_le service_id1; /* currently unused */
> > +	__u8 service_id0[16]; /* currently unused */
> > +	__u8 service_id1[16]; /* currently unused */
> >  } __attribute__((packed));
> >  
> >  #define OVER_WRITE	0x1
> > -- 
> > 2.26.1
> > 

-- 
With Best Regards,
Andy Shevchenko



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

* Re: [PATCH v1] hyper-v: Remove internal types from UAPI header
  2020-04-22 14:15   ` Andy Shevchenko
@ 2020-04-22 19:38     ` Wei Liu
  0 siblings, 0 replies; 4+ messages in thread
From: Wei Liu @ 2020-04-22 19:38 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Wei Liu, K. Y. Srinivasan, Haiyang Zhang, Stephen Hemminger,
	linux-hyperv

On Wed, Apr 22, 2020 at 05:15:07PM +0300, Andy Shevchenko wrote:
> On Wed, Apr 22, 2020 at 02:41:27PM +0100, Wei Liu wrote:
> > On Wed, Apr 22, 2020 at 04:18:18PM +0300, Andy Shevchenko wrote:
> > > The uuid_le mistakenly comes to be an UAPI type. Since it's luckily not used by
> > > Hyper-V APIs, we may replace with POD types, i.e. __u8 array.
> > > 
> > > Note, previously shared uuid_be had been removed from UAPI few releases ago.
> > > This is a continuation of that process towards removing uuid_le one.
> > > 
> > > Note, there is no ABI change!
> > > 
> > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > 
> > Can you clarify why guid_t is not used instead?
> 
> It's internal type to the kernel. The libuuid or so should provide a compatible
> type(s) for user space.
> 
> > Is the plan to remove it
> > from UAPI as well?
> 
> Yes.
> 

OK. Thanks for explaining.

Wei.

> > Wei.
> > 
> > > ---
> > >  include/uapi/linux/hyperv.h | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/include/uapi/linux/hyperv.h b/include/uapi/linux/hyperv.h
> > > index 991b2b7ada7a3..8f24404ad04f1 100644
> > > --- a/include/uapi/linux/hyperv.h
> > > +++ b/include/uapi/linux/hyperv.h
> > > @@ -119,8 +119,8 @@ enum hv_fcopy_op {
> > >  
> > >  struct hv_fcopy_hdr {
> > >  	__u32 operation;
> > > -	uuid_le service_id0; /* currently unused */
> > > -	uuid_le service_id1; /* currently unused */
> > > +	__u8 service_id0[16]; /* currently unused */
> > > +	__u8 service_id1[16]; /* currently unused */
> > >  } __attribute__((packed));
> > >  
> > >  #define OVER_WRITE	0x1
> > > -- 
> > > 2.26.1
> > > 
> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

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

end of thread, other threads:[~2020-04-22 19:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-22 13:18 [PATCH v1] hyper-v: Remove internal types from UAPI header Andy Shevchenko
2020-04-22 13:41 ` Wei Liu
2020-04-22 14:15   ` Andy Shevchenko
2020-04-22 19:38     ` Wei Liu

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).