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 BE365C32793 for ; Wed, 18 Jan 2023 14:27:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3F2F68547A; Wed, 18 Jan 2023 15:27:27 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.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=amd.com header.i=@amd.com header.b="UEmsRHsU"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7D42E855C7; Wed, 18 Jan 2023 15:27:25 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2052.outbound.protection.outlook.com [40.107.94.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 731618481F for ; Wed, 18 Jan 2023 15:27:22 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=michal.simek@amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l/9C9/wVfHaIN63yFUq7ciha3UFsIHOpu+b/3yRpccbfasg0g5e5ez4Dt9BH0W2O//PAmAUNdhXyyMVwBMzyosnD/5MQaiJS9oZ6WlE3IsczBApIie9XalHUn+iFvi5KYeSlhGNxYbAaPFP1hNhuBtybwBiZHMgU0CoZDch8G31ZK8lICChaHTzmtgTQSlxKpv4McHxpZQBOIrHBU+p0/dcvhtuScRvpeYdXSrYiCISyMRehXMQZa8JePvft5IwpqnYfN0PfwtTkNdk3LrI/wOirCyMW5bukZJZgGU9lp66bYGr1R/kWq3xL+id8eKyhjy/6Tkf0zv4PCuoBL5T6gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=CGtVdC4/vCw6XoAQ/MVaMuvKtObmy4cCqgzDsRwz54E=; b=IHeGhjt6U84UAlE7XA0E90hQkLdQ0GETPRINUZlNSwZnWKEzumyc1NwwcJDXYT6yoXoS1JM6ub16+v5Fw87MSlsnNXNLKJ4pfySvxojAGp/0D5OIfwPZDCjCGP8cO7Co+XPhp3MtqNxptDpGHbuUSP/ct90bE50RwJessXcI/7um0Tg8PnmRyC8X+snfAr3Ys1VOi7tMtqqkm0XUdiYaLdptZ0q4guqnPsunzpXRSDzw5QE5R00XWFEJTJLzz+opJGlZkmav+xrrarJZHqV3nMEoSTpH3F+lO2HTVFu+A5d5bjb3JNmgsMwitZAxBhBlCmb7WqRjzhsK4FSI9Aw9hA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CGtVdC4/vCw6XoAQ/MVaMuvKtObmy4cCqgzDsRwz54E=; b=UEmsRHsUWORsJbmgu1reYU9tDIWf2B1ttY4bMcCsetkMr9fIRCFFKPKpPs+5zztfMylxt6ImSrkYAg28lfAFljrhzRqrP42e5pC2HraF2rtu/rUwZyu6iVu/yPyk0LC6bke87rwLuy7A8rXNVbVuVRE0Pq7+qheD8iuNGoj7pUQ= Received: from BN9PR03CA0103.namprd03.prod.outlook.com (2603:10b6:408:fd::18) by CH2PR12MB4278.namprd12.prod.outlook.com (2603:10b6:610:ab::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.24; Wed, 18 Jan 2023 14:27:18 +0000 Received: from BN8NAM11FT061.eop-nam11.prod.protection.outlook.com (2603:10b6:408:fd:cafe::e2) by BN9PR03CA0103.outlook.office365.com (2603:10b6:408:fd::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.19 via Frontend Transport; Wed, 18 Jan 2023 14:27:18 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by BN8NAM11FT061.mail.protection.outlook.com (10.13.177.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6002.24 via Frontend Transport; Wed, 18 Jan 2023 14:27:18 +0000 Received: from [10.254.241.50] (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 18 Jan 2023 08:27:14 -0600 Message-ID: <026a74f4-5add-27ff-2100-390844654c68@amd.com> Date: Wed, 18 Jan 2023 15:27:12 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCHv3 0/5] FWU: Handle meta-data in common code Content-Language: en-US To: Jassi Brar , Michal Simek CC: , , , , , , , , , Jassi Brar References: <20230102182532.2411125-1-jaswinder.singh@linaro.org> From: Michal Simek In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT061:EE_|CH2PR12MB4278:EE_ X-MS-Office365-Filtering-Correlation-Id: 5c08994c-8166-4765-d06f-08daf9601abe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pc9k95vm97M4+OLImC4fD1a925vYE0Gfl7xoIARl4rq5JUJlPlZT3YQEsPSGLCog3mhedR5vkhG4z4QsCXwzHQKE96tlJykpmoe+HExWDI2cKLDlV+ZqU4tkXkOHvoNHC/OYG+vklXCOv4K49nEsE1OEbGqTZxI1afR7nCm7SkU3W4+FgLsPkS1eAv+YkHs9mSHnxhyZz/FoI21LBMwZF8Cc9cvPTDtQpZOxdI7yHvI70JWgfG/5Y0calk+34VuJg/ROM4xQkVV9Vx2mdRpgaCQYTvw0GTbY0G8xEUPguWv2/u1cJCyHzUBhN2e/CR3Gy3VuGEk8BYf/rUrBZcnpjFHWwqR4KBDMQoz/Le5XoaN59h/lL8X+yOO9yKyUJ64anqyfeD5EnoadtBKlPwibmcEK14FtZ5KYCyOYX00kt7Aq283dszOBKhd8bPYG4QLpgczXlIQiDBKfEkJd8L37Xc5Y8tKgUbJlLQNxSwIDFt4ekT7170nmcSv3sygoAAVZVtW9nkERA2EsdvlUpeY1xSfJKx2k/Wn6CDoksR3oRweOplBldbO0+Acw+VaEbPdh/LOhrXa1cKnhSZa3H2+tDaz6jWQhkvw8wKJsV1xjL3aeVMFjWQdy2xSycsHQ0iEBOV0cFY5YGPe/oiXGafseaZ7JAIETMUEBG9BGSGNyrk44fThIySz2hu6yJaH0LMSQOnZ1wq4Mm0v7AoXgu/KrdTQ1NgyrSphCD8N39cbPI88ngTBGg8RFHdSlMfmWnT+pWb+9IlZ8bNyEQwgNkBITfYg3LsFvK/KienxJr/akL2k= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230022)(4636009)(396003)(136003)(376002)(39860400002)(346002)(451199015)(40470700004)(36840700001)(46966006)(81166007)(36860700001)(31696002)(356005)(86362001)(5660300002)(8936002)(7416002)(44832011)(82740400003)(2906002)(70206006)(70586007)(40480700001)(4326008)(8676002)(41300700001)(82310400005)(40460700003)(2616005)(336012)(16526019)(186003)(83380400001)(26005)(47076005)(426003)(53546011)(16576012)(316002)(54906003)(110136005)(478600001)(36756003)(966005)(31686004)(36900700001)(43740500002); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2023 14:27:18.6767 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c08994c-8166-4765-d06f-08daf9601abe X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT061.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4278 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 1/18/23 15:13, 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 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? Take a look here. https://lore.kernel.org/all/20230102182532.2411125-1-jaswinder.singh@linaro.org/#r where you can see two series in the same thread. And this pretty much confuse b4. > >> >> 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. It really depends how you download that patches. Thanks, Michal