All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Ian Campbell <Ian.Campbell@eu.citrix.com>,
	Keir Fraser <keir@xen.org>
Subject: Re: [PATCH] vNUMA: rename interface structures
Date: Tue, 25 Nov 2014 12:45:22 +0000	[thread overview]
Message-ID: <547479E2.8040904@citrix.com> (raw)
In-Reply-To: <547485D8020000780004AA76@mail.emea.novell.com>


[-- Attachment #1.1: Type: text/plain, Size: 5380 bytes --]

On 25/11/14 12:36, Jan Beulich wrote:
> No-one (including me) paid attention during review that these
> structures don't adhere to the naming requirements of the public
> interface: Consistently use xen_ prefixes at least for all new
> additions.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

Good to catch this before 4.5 gets released and it is harder to justify
the change.

>
> --- a/tools/libxc/include/xenctrl.h
> +++ b/tools/libxc/include/xenctrl.h
> @@ -1264,7 +1264,7 @@ int xc_domain_setvnuma(xc_interface *xch
>                          uint32_t nr_vnodes,
>                          uint32_t nr_regions,
>                          uint32_t nr_vcpus,
> -                        vmemrange_t *vmemrange,
> +                        xen_vmemrange_t *vmemrange,
>                          unsigned int *vdistance,
>                          unsigned int *vcpu_to_vnode,
>                          unsigned int *vnode_to_pnode);
> --- a/tools/libxc/xc_domain.c
> +++ b/tools/libxc/xc_domain.c
> @@ -2171,7 +2171,7 @@ int xc_domain_setvnuma(xc_interface *xch
>                         uint32_t nr_vnodes,
>                         uint32_t nr_vmemranges,
>                         uint32_t nr_vcpus,
> -                       vmemrange_t *vmemrange,
> +                       xen_vmemrange_t *vmemrange,
>                         unsigned int *vdistance,
>                         unsigned int *vcpu_to_vnode,
>                         unsigned int *vnode_to_pnode)
> --- a/xen/common/domctl.c
> +++ b/xen/common/domctl.c
> @@ -345,7 +345,7 @@ static struct vnuma_info *vnuma_alloc(un
>      vnuma->vdistance = xmalloc_array(unsigned int, nr_vnodes * nr_vnodes);
>      vnuma->vcpu_to_vnode = xmalloc_array(unsigned int, nr_vcpus);
>      vnuma->vnode_to_pnode = xmalloc_array(unsigned int, nr_vnodes);
> -    vnuma->vmemrange = xmalloc_array(vmemrange_t, nr_ranges);
> +    vnuma->vmemrange = xmalloc_array(xen_vmemrange_t, nr_ranges);
>  
>      if ( vnuma->vdistance == NULL || vnuma->vmemrange == NULL ||
>           vnuma->vcpu_to_vnode == NULL || vnuma->vnode_to_pnode == NULL )
> --- a/xen/common/memory.c
> +++ b/xen/common/memory.c
> @@ -972,7 +972,7 @@ long do_memory_op(unsigned long cmd, XEN
>  
>      case XENMEM_get_vnumainfo:
>      {
> -        struct vnuma_topology_info topology;
> +        struct xen_vnuma_topology_info topology;
>          struct domain *d;
>          unsigned int dom_vnodes, dom_vranges, dom_vcpus;
>          struct vnuma_info tmp;
> @@ -1033,7 +1033,7 @@ long do_memory_op(unsigned long cmd, XEN
>          read_unlock(&d->vnuma_rwlock);
>  
>          tmp.vdistance = xmalloc_array(unsigned int, dom_vnodes * dom_vnodes);
> -        tmp.vmemrange = xmalloc_array(vmemrange_t, dom_vranges);
> +        tmp.vmemrange = xmalloc_array(xen_vmemrange_t, dom_vranges);
>          tmp.vcpu_to_vnode = xmalloc_array(unsigned int, dom_vcpus);
>  
>          if ( tmp.vdistance == NULL ||
> --- a/xen/include/public/domctl.h
> +++ b/xen/include/public/domctl.h
> @@ -980,7 +980,7 @@ struct xen_domctl_vnuma {
>      /*
>       * memory rages for each vNUMA node
>       */
> -    XEN_GUEST_HANDLE_64(vmemrange_t) vmemrange;
> +    XEN_GUEST_HANDLE_64(xen_vmemrange_t) vmemrange;
>  };
>  typedef struct xen_domctl_vnuma xen_domctl_vnuma_t;
>  DEFINE_XEN_GUEST_HANDLE(xen_domctl_vnuma_t);
> --- a/xen/include/public/memory.h
> +++ b/xen/include/public/memory.h
> @@ -530,14 +530,13 @@ DEFINE_XEN_GUEST_HANDLE(xen_mem_sharing_
>  #define XENMEM_get_vnumainfo                26
>  
>  /* vNUMA node memory ranges */
> -struct vmemrange {
> +struct xen_vmemrange {
>      uint64_t start, end;
>      unsigned int flags;
>      unsigned int nid;
>  };
> -
> -typedef struct vmemrange vmemrange_t;
> -DEFINE_XEN_GUEST_HANDLE(vmemrange_t);
> +typedef struct xen_vmemrange xen_vmemrange_t;
> +DEFINE_XEN_GUEST_HANDLE(xen_vmemrange_t);
>  
>  /*
>   * vNUMA topology specifies vNUMA node number, distance table,
> @@ -548,7 +547,7 @@ DEFINE_XEN_GUEST_HANDLE(vmemrange_t);
>   * copied back to guest. Domain returns expected values of nr_vnodes,
>   * nr_vmemranges and nr_vcpus to guest if the values where incorrect.
>   */
> -struct vnuma_topology_info {
> +struct xen_vnuma_topology_info {
>      /* IN */
>      domid_t domid;
>      uint16_t pad;
> @@ -566,12 +565,12 @@ struct vnuma_topology_info {
>          uint64_t pad;
>      } vcpu_to_vnode;
>      union {
> -        XEN_GUEST_HANDLE(vmemrange_t) h;
> +        XEN_GUEST_HANDLE(xen_vmemrange_t) h;
>          uint64_t pad;
>      } vmemrange;
>  };
> -typedef struct vnuma_topology_info vnuma_topology_info_t;
> -DEFINE_XEN_GUEST_HANDLE(vnuma_topology_info_t);
> +typedef struct xen_vnuma_topology_info xen_vnuma_topology_info_t;
> +DEFINE_XEN_GUEST_HANDLE(xen_vnuma_topology_info_t);
>  
>  /* Next available subop number is 27 */
>  
> --- a/xen/include/xen/domain.h
> +++ b/xen/include/xen/domain.h
> @@ -100,7 +100,7 @@ struct vnuma_info {
>      unsigned int *vdistance;
>      unsigned int *vcpu_to_vnode;
>      unsigned int *vnode_to_pnode;
> -    struct vmemrange *vmemrange;
> +    struct xen_vmemrange *vmemrange;
>  };
>  
>  void vnuma_destroy(struct vnuma_info *vnuma);
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel


[-- Attachment #1.2: Type: text/html, Size: 6107 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-11-25 12:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-25 12:36 [PATCH] vNUMA: rename interface structures Jan Beulich
2014-11-25 12:45 ` Andrew Cooper [this message]
2014-11-25 12:54 ` Ian Campbell
2014-11-25 14:11 ` Jan Beulich
2014-11-25 15:49   ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=547479E2.8040904@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=Ian.Campbell@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.