From: Ian Jackson Subject: Re: [v10][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM Date: Tue, 21 Jul 2015 16:09:05 +0100 Message-ID: <21934.24721.304399.773580@mariner.uk.xensource.com> References: <1437373023-14884-1-git-send-email-tiejun.chen@intel.com> <1437373023-14884-12-git-send-email-tiejun.chen@intel.com> <21932.63595.566823.211293@mariner.uk.xensource.com> <21934.8684.318670.874156@mariner.uk.xensource.com> <55AE272A.4020306@intel.com> <21934.10490.615041.203428@mariner.uk.xensource.com> <55AE2BB1.9030604@intel.com> <21934.11410.844215.554291@mariner.uk.xensource.com> <55AE30D4.8000009@intel.com> <21934.15393.528332.534956@mariner.uk.xensource.com> <55AE492D.7080204@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55AE492D.7080204@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Chen, Tiejun" Cc: Stefano Stabellini , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Chen, Tiejun writes ("Re: [v10][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM"): > +static void > +add_rdm_entry(libxl__gc *gc, libxl_domain_config *d_config, > + uint64_t rdm_start, uint64_t rdm_size, int rdm_policy) > +{ > + d_config->num_rdms++; > + d_config->rdms = libxl__realloc(NOGC, d_config->rdms, > + d_config->num_rdms * sizeof(libxl_device_rdm)); > + > + d_config->rdms[d_config->num_rdms - 1].start = rdm_start; > + d_config->rdms[d_config->num_rdms - 1].size = rdm_size; > + d_config->rdms[d_config->num_rdms - 1].policy = rdm_policy; > +} But, I wrote: Can I suggest a function void add_rdm_entry(libxl__gc *gc, libxl_domain_config *d_config, uint64_t rdm_start, uint64_t rdm_size, int rdm_policy) which assumes that d_config->num_rdms is set correctly, and increments it ? (Please put the increment at the end so that the assignments are to ->rdms[d_config->num_rdms], or perhaps make a convenience alias.) Note the last paragraph. This is now the third time I have posted that text. It is the fifth request or clarification I have had to make about this very small area. I have to say that I'm finding this rather frustrating. Ian.