From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3399C38147 for ; Wed, 18 Jan 2023 14:18:25 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 36599855C0; Wed, 18 Jan 2023 15:18:23 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="DeLpsTYt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 782B8855C0; Wed, 18 Jan 2023 15:18:21 +0100 (CET) Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id AB3988481F for ; Wed, 18 Jan 2023 15:18:18 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x834.google.com with SMTP id g9so15268462qtu.2 for ; Wed, 18 Jan 2023 06:18:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=XFlDo20Q0i+RZ7n2TaleCxmCgZDoCmPI1KOH3Lk2dW8=; b=DeLpsTYtNUO0OU9KjmrItbnCzLIffUdQ6M2mXD6Q1DpZ+9pdOAHaHPZoFOJ1Ha0yYD 97YQVGWLAXrlla9I40ZJw2cdfrccf5TDuw6+2KTzoA98yXj18+YVNGh5YyYIZybNbTtB oZM1RM6UjpcW0CrBo6yCWnR/xdWwKQ54glOvU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XFlDo20Q0i+RZ7n2TaleCxmCgZDoCmPI1KOH3Lk2dW8=; b=U9nevueE5scl04ghKI9CX7RpqbJo0bvkJu4gbKRTCdXzJ/TV0MP8UPQlFH3U/XNc50 bAddvryQGVNXesMu9f8aT4SDX9FHTLDuzdq04PIxP5Q1EHPJEeS2rfqDLMnwM/jEV7Yl s+hvnNDEErWJ226LH3FyUp1iOdF/TyZEbA51zB+t3rUeTPh12wEFgF1or6R5aDUaTxn8 gfbH4A8a7YMC93dG0osShrwj01dQuvxIb9blJSIuepy/BNyWvHsl8uXblJjPJ9/n46aM gzpbWgo4FD+Tw/50++C+yAy0IrjjWxsMA8xKR3G1cYvz6dnjD3GeOUxUkKZSaJDzdQ5V F5qQ== X-Gm-Message-State: AFqh2krnbz4pXhfWEBDY1667/m2ie5mWQ7/c+xw/2CnH0DtIvVgmplOo rJr6Ew90rMhjax47JS4D6iTmUg== X-Google-Smtp-Source: AMrXdXtIJDqck5FU7/vAUTyMLm6r1yu476uAqUPHLfn1gAMY7zIqZW9Gg3xrC+Dz8LOytHW1obDoIA== X-Received: by 2002:ac8:4cd0:0:b0:3af:4d45:b73 with SMTP id l16-20020ac84cd0000000b003af4d450b73mr6860128qtv.33.1674051497453; Wed, 18 Jan 2023 06:18:17 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-400d-a7ad-2782-8e67.res6.spectrum.com. [2603:6081:7b00:6400:400d:a7ad:2782:8e67]) by smtp.gmail.com with ESMTPSA id h23-20020ac85057000000b003b1546ee6absm10108961qtm.11.2023.01.18.06.18.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Jan 2023 06:18:17 -0800 (PST) Date: Wed, 18 Jan 2023 09:18:15 -0500 From: Tom Rini To: Jassi Brar Cc: Michal Simek , u-boot@lists.denx.de, ilias.apalodimas@linaro.org, etienne.carriere@linaro.org, sjg@chromium.org, sughosh.ganu@linaro.org, xypron.glpk@gmx.de, patrick.delaunay@foss.st.com, patrice.chotard@foss.st.com, Jassi Brar Subject: Re: [PATCHv3 0/5] FWU: Handle meta-data in common code Message-ID: <20230118141815.GD631605@bill-the-cat> References: <20230102182532.2411125-1-jaswinder.singh@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KdquIMZPjGJQvRdI" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean --KdquIMZPjGJQvRdI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 18, 2023 at 08:13:01AM -0600, Jassi Brar wrote: > On Wed, Jan 18, 2023 at 7:28 AM Michal Simek wrote: > > > > Hi, > > > > On 1/2/23 19:25, Jassi Brar wrote: > > > The patchset reduces ~400 lines of code, while keeping the functional= ity same and making > > > meta-data operations much faster (by using cached structures). > > > > > > Issue: > > > meta-data copies (primary and secondary) are being handled by the b= ackend/storage layer > > > instead of the common core in fwu.c (as also noted by Ilias) that is= , gpt_blk.c manages > > > meta-data and similarly raw_mtd.c will have to do the same when it ar= rives. The code > > > could by make smaller, cleaner and optimised. > > > > > > Basic idea: > > > Introduce .read_mdata() and .write_mdata() in fwu_mdata_ops that = simply read/write > > > meta-data copy. The core code takes care of integrity and redundancy = of the meta-data, > > > as a result we can get rid of every other callback .get_mdata() .upda= te_mdata() > > > .get_mdata_part_num() .read_mdata_partition() .write_mdata_partitio= n() and the > > > corresponding wrapper functions thereby making the code 100s of LOC s= maller. > > > > > > Get rid of fwu_check_mdata_validity() and fwu_mdata_check() which exp= ected underlying > > > layer to manage and verify mdata copies. > > > Implement fwu_get_verified_mdata(struct fwu_mdata *mdata) public fun= ction that reads, > > > verifies and, if needed, fixes the meta-data copies. > > > > > > Verified copy of meta-data is now cached as 'g_mdata' in fwu.c, which= avoids multiple > > > low-level expensive read and parse calls. > > > gpt meta-data partition numbers are now cached in gpt_blk.c, so that = we don't have to do expensive part_get_info() and uid ops. > > > > First of all I have strong suspicious that this series are pretty much = two > > series at once. > > > Yes, I submitted two patchsets. > 1) Optimizing the api of current fwu. > 2) Introduce support for mtd backed storage (DeveloperBox platform as > an instance) using the new api. >=20 > They appear just fine in my inbox. Do they appear bad to you? >=20 > > > > The second issue is that you are sending patches from > > Jassi Brar > > but SOB is > > Signed-off-by: Jassi Brar > > > > And Tom said in past that they should match. There is a hook for it to = check it > > which everybody should be using. That's why please fix this in the next= series. > > > I have submitted dozens of patches and pull requests over the last > many years. This never occurred to anybody. > BTW, the 'Author' and 'Signed-off-by' appear consistent in git log. > And there are very recent instances in uboot git log where even they > actually differ. >=20 > But if Tom really wants, I am happy to send-email from my other account. It doesn't matter what the email you send from is, but Author and Signed-of= f-by really really should match in the commit itself. It can be annoying, depending on corporate setup / policies, to have send-email work directly with your corporate account, but if you're allowed to be submitting patches, that's where the match between Author and Signed-off-by matters. --=20 Tom --KdquIMZPjGJQvRdI Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmPH/50ACgkQFHw5/5Y0 tyxJkwv/Q8RVhNyjIt2JPO1fmSbOn+q2LOZ9AHhF0QGuqfIZ/4j67CNkTyUmm5nQ NvW9jddU3VpRv90ismk7gkdTsWR2OFxlIeg7ieZPTwf/aJUBfxHwqSoK3YeuyYEm y03sShVvz86yxmDKp8USIE//mb1xW7L6Vgvay4I7lahD2YsuN2GGVc93Nk12GBvH UMoJAorg9j+y4qemnKFJVtRXOYkodQ+OXA+ZNEsWORaNZEetRGRgW9MulwBq9/CM 1crhq4ozHZcnMderkYrgZAYVvs1N7Mgg+EQew0gT7w8b/dV023vzHh3nzEknZHg1 gbxeFAsuVbP9pUTSDVwdMTwvNl3FTjM+qTwZ3n0wYBG74gMVOOdldqyOcPgOxl6t /WDPxb/nufP1nG7zccIPFF2xtVPD1uvk8QwmszIBjRgxn0c/u8Vqs1IMgWRoRDN1 RqingnIWlFCVS1IYizpAz/bMtRICAJUzWIDb6S200wiMKn0Rwkvj5fRVVHrSD0cH 3vlGAoUN =/tiv -----END PGP SIGNATURE----- --KdquIMZPjGJQvRdI--