From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=JgdLWdVE; spf=pass (domain: linaro.org, ip: 209.85.221.67, mailfrom: leif.lindholm@linaro.org) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by groups.io with SMTP; Mon, 03 Jun 2019 09:40:28 -0700 Received: by mail-wr1-f67.google.com with SMTP id e16so4554762wrn.1 for ; Mon, 03 Jun 2019 09:40:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JhxTyxf9sW5Y/Chd6WpBjJ1Bh/cmqxv2mr1bC5D1q90=; b=JgdLWdVEiRABo9XGG/x9b+ZK0o/xwMcdWlTAKLWAQizdOdBz1t7S4DrOp5M7lzBy+x B7FFmszQNJ+I4/lb7+znOeF654XYFwrzTKMTYzO+nuxYejp+SmPUuKrdoW7QDqwDzYMd jH0/EL4V1h9z+sFzM9dOQcgQ0/tDselJvnUlslYxJ063bSAY+sJyvoGyuaLRRS8qKQzW NzegbAEMCcaFNl/ITxTGZ2cOUF8P2CR35F+e8Ytyb5ixW/ckt8aZxwwTkav6OZJo2cBh X7AeJv30HZjfKfAth2WIgnKdPWcZNiZcgqQbRMWBCBakwrjp0ycyHUyQ29ymWmuZDiCk 0OKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JhxTyxf9sW5Y/Chd6WpBjJ1Bh/cmqxv2mr1bC5D1q90=; b=enA6rtH+yw0Nu7Yyv7K1QMD/Xc0o7uyDl6wWbp0HacDcO6tNGcS7gtIMgWFO2YkLnk tAXUbC74SM9CVy+2TCjo/fO7z6Y28EZGW/GHsxoMBoKJ7D5nSuoscGej/gCZYw+NrouP /BOncKooAk2Eq3MmWdIRTsxM1+lyrfTcHdgHUF6Xlv0yyyBQ3MnSypxIhCmLJugvSotM f0WO6j62QktaZEUt9zetShWF7hV4gdhy8C2zi6IupoeAiU8wDyuUf3JisXZapqAruGoX egStsp7xCFhFKyyvoucTioHQKCZkpZMlLebc50DYItQ1AXDu4/7HmlHDWug9wv5CW8ec mIWQ== X-Gm-Message-State: APjAAAUGDKJOAIfbZuNMRp8k/Sf98UqNnW9BQuA1bu9CJnbmjcateigD WzRgI/uA6LE83iu22fSjZHsU+w== X-Google-Smtp-Source: APXvYqxSbe/tPAvvePVN21ZDwvC7ibjp+rDWQW5ieIE3jH7SfUnXZdIyrhfz+KBfV8St0cjZD0oy7A== X-Received: by 2002:a5d:6191:: with SMTP id j17mr3437558wru.172.1559580026995; Mon, 03 Jun 2019 09:40:26 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id 88sm16711490wrl.68.2019.06.03.09.40.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Jun 2019 09:40:26 -0700 (PDT) Date: Mon, 3 Jun 2019 17:40:24 +0100 From: "Leif Lindholm" To: Zhichao Gao Cc: devel@edk2.groups.io, Bret Barkelew , Jian J Wang , Hao A Wu , Ray Ni , Star Zeng , Liming Gao , Sean Brogan , Michael Turner Subject: Re: [PATCH v3] MdeModulePkg/CapsulePei: Optimize the CapsulePei Message-ID: <20190603164024.64rhr47ckf44vniu@bivouac.eciton.net> References: <20190603154202.10856-1-zhichao.gao@intel.com> MIME-Version: 1.0 In-Reply-To: <20190603154202.10856-1-zhichao.gao@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Jun 03, 2019 at 11:42:02PM +0800, Zhichao Gao wrote: > From: Bret Barkelew > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1853 > > Change form Mu repo: > https://github.com/microsoft/mu_basecore/blob/release/201903/ > MdeModulePkg/Universal/CapsulePei/UefiCapsule.c#L801 > > Minor changes on it: > 1. Change the AreCapsulesStaged: directly return the BOOLEAN result. > 2. In GetScatterGatherHeadEntries: using allocate memory instead of > the fixed template array. While the SG list is larger then the > pre-allocate buffer, enlarge the buffer. > > Optimize some function in CapsulePei to make it easier > to maintain. > 1. Separate the capsule check function form GetCapsuleDescriptors. > The original logic is unclear. > 2. Avoid querying the capsule variable twice. First time to count > the number of SG list and allocate a buffer to save SG list data. > Second time to save the SG list data to the buffer. Modified: > Using a template buffer to save the SG list data. After query, > we get the number of SG list, then allocate memory and copy > data form template buffer to the allocated memory. > 3. Using MemoryAllocationLib instead of memory function in Pei > services. OK, sounds to me like a subsantial modification. This is not ideal to do as part of moving a patch from one repository to another. Usually, the kind of modifications done at that point are just things like "rebase to latest master", "adjust to updated API".. Could you import the original patch in its original form as a separate patch and then provide your changes on top of that in the subsequent patch? This also removes any ambiguity w.r.t. copyright. Best Regards, Leif