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 0C6C0C32793 for ; Wed, 18 Jan 2023 14:13:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 89D4E85343; Wed, 18 Jan 2023 15:13:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Cz0hDJMz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D5A21855C0; Wed, 18 Jan 2023 15:13:15 +0100 (CET) Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (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 6B8278481F for ; Wed, 18 Jan 2023 15:13:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jassisinghbrar@gmail.com Received: by mail-ej1-x62b.google.com with SMTP id vm8so83505971ejc.2 for ; Wed, 18 Jan 2023 06:13:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sBLKfLzB8OQre1cgx3/tn4JaCE/IFWzeH9jHAVNxPbM=; b=Cz0hDJMzXEqGG0Zsl7WMQSuJNToRRHFI8Anpn9fhkrJiOHt9s+BOV/pMkOKxNkQ6w+ FhWk3BGgZaFcTCEweMVnL6STOIKiHpzawZe/VfTTor+maHDKuEnWDtsKiG/NY7zbTJVT eQ51HAVTGSY5SbbaMQZrZWFyuOn54Qm3bz9ZX/XINchlD2hQNB1wBDUyysWFKQ81TlX2 XqMcrpcpBSZJ8ci3G2txQv8CggHDXt7N2hvD8ogN4fkz8jKCGA43eF3PfBvQKqDxwANu pVE65jYunaDi96fVSAU84WSRk+6nW/b0vWpW255L1rk7wbWtvSFroHv1+ylODaBRurYl 8WVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sBLKfLzB8OQre1cgx3/tn4JaCE/IFWzeH9jHAVNxPbM=; b=pGD+vYiKvERLg+FnZZL1yOH+SV/ZFpBjz/J34oQFyS0KxNDv6IvRQ/pRdMONg569RE CAV0YtDtI84085ZRI3Pzl7B5iaw9mUH4wu4iUv+fWosY8nC8zPlZp6rTzUFXaaPChKpn QKItKw9wvNJ8Egibxr/8hzuv+gtI/uTeVpJhUZCpQ9zEGe6PDENPsoCUPWbq8gdZrtPb PuOTr7Tw0IG9+F0HaoHZrQzDxcjqJRUw4dW/hL2r3MQ3qpA9AOc93NUcGW0gxCeLpp08 o89iX+LOj+2YF1IghgGc5WQqmphig9bi/H9zVsdGezQsTCSZ5xPkhx14QFbRdEe191Dc 05TA== X-Gm-Message-State: AFqh2kon35qF2X21qW+lklSTsu+s06grz0a//IQVPlAo4Asp5ig88pYy vEqg3yFtvuvEpIiUmPm9jAbmeOMyhJS/41CeUso= X-Google-Smtp-Source: AMrXdXs7+y/MoYpWqE1a/u/bOnEwdrxkLjg7WSVarUY+lh1Wdgc2js2JLl5q2G2uFBU127CcZu0Ws5ApjPvR2TSalAc= X-Received: by 2002:a17:906:15d4:b0:7c0:fa5f:a032 with SMTP id l20-20020a17090615d400b007c0fa5fa032mr435695ejd.112.1674051192937; Wed, 18 Jan 2023 06:13:12 -0800 (PST) MIME-Version: 1.0 References: <20230102182532.2411125-1-jaswinder.singh@linaro.org> In-Reply-To: From: Jassi Brar Date: Wed, 18 Jan 2023 08:13:01 -0600 Message-ID: Subject: Re: [PATCHv3 0/5] FWU: Handle meta-data in common code To: Michal Simek Cc: u-boot@lists.denx.de, ilias.apalodimas@linaro.org, etienne.carriere@linaro.org, trini@konsulko.com, sjg@chromium.org, sughosh.ganu@linaro.org, xypron.glpk@gmx.de, patrick.delaunay@foss.st.com, patrice.chotard@foss.st.com, Jassi Brar Content-Type: text/plain; charset="UTF-8" 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 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 functionality same and making > > meta-data operations much faster (by using cached structures). > > > > Issue: > > meta-data copies (primary and secondary) are being handled by the backend/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 arrives. 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() .update_mdata() > > .get_mdata_part_num() .read_mdata_partition() .write_mdata_partition() and the > > corresponding wrapper functions thereby making the code 100s of LOC smaller. > > > > Get rid of fwu_check_mdata_validity() and fwu_mdata_check() which expected underlying > > layer to manage and verify mdata copies. > > Implement fwu_get_verified_mdata(struct fwu_mdata *mdata) public function 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. They appear just fine in my inbox. Do they appear bad to you? > > 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. But if Tom really wants, I am happy to send-email from my other account. Thanks.