From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D2CE343FDF; Wed, 8 May 2024 12:50:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5BE4F43579; Wed, 8 May 2024 12:50:20 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by mails.dpdk.org (Postfix) with ESMTP id 8D80C432C4 for ; Wed, 8 May 2024 12:50:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715165419; x=1746701419; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=rDlvORRaU/M9x5B4KNrLpsD6y2W4uscj1jkxpyWK/bQ=; b=kSuvM8WKiC8v1juLFUx7DofStxepuQnRWb3r8LZMR92MT0z0rQz75egh iyGCrcf66cHCujke3X8ZuBZqQRCxYB7nj5hFlsikuX2TBGNPWvN+h6QB5 KS6EwTMKUctw/7MRJ38acQexnSA9TMVA8y55qDbNVq19F87EE0x4ysJXw whJ99wpbHb6388xWvlDzfdAbvD9LtrC0eASx4W35mcVIJE5GsBRmYBAAu dcCHcrXfzlh3h3wl7YLsJLyQOX7D7X8pdzBuANNrY3wBQMi8X+75VVil0 4b/TcyP64trVO6bIKkADVJfG53VkEUhtsSn7cS6VIHmyQ1uMIJ37slEMA A==; X-CSE-ConnectionGUID: dln02/thR5CTtzhoE/D31Q== X-CSE-MsgGUID: Yosx5WO6QDqv3/Y+Djq+PQ== X-IronPort-AV: E=McAfee;i="6600,9927,11066"; a="11140467" X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="11140467" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2024 03:50:17 -0700 X-CSE-ConnectionGUID: n4xrRCYjRu250hpN0twxAg== X-CSE-MsgGUID: kWdB1fQeREuZzuyQG4D2BQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="28940462" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmviesa010.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 08 May 2024 03:50:17 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 8 May 2024 03:50:16 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX612.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 8 May 2024 03:50:15 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 8 May 2024 03:50:15 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 8 May 2024 03:50:15 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Aau6yWR8Q5exIhbKkWhNspoQVRQXedLMTgmBji99+CDw7e35NI9GplFtjN/lrb//wi0vKbpuSjZ9BI7Ny6Iwd0xInsKld8qUgx3n7v7nnBn9eXW4Hy9eYP0lZTVtWT+ThxzbsZHVjINizybAcdl7UcgL9QLuXRJ2+nJTEar/XqQDvaZprz5EHpJ6ogOkustYm5VFmXybOWT5dz27YpC1EBzMTa7/DKgGio4DZuhfBEOxSdald+AYigWmQe7dXFYxKlgCWdTu3HD4zXIy+QbZUPN1x/JIh0TVcB4gIosz8gWqHEX/EqVIWUp8VLZJUVwPZ8gwafpz7Mo5WUGkifRCDw== 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=oZiqszTCU4XpuBSd4dPIUBDsXJynUvmKOY66Ourj1Q4=; b=fTA5Kkkt4tU0X6PT9FHkYq+2GLv2gjpk53TrhSAF499hVKrwpQF84+WsHiQnTqm8Rrh4/J7jDjWJEZ93nLZ0e/PyMRMeWJ9v3oeiuhk03nf32TvM6U/TY5ZdDKc7Cmb/M7x43m+nq61rUXFXDZRqi7L6jB52Z9htk5yqjomuUs5R7EPFY3h+M+Xyr08sNyfXuqohE13Rnsbrak1lJPJdq5bNt/JVCuCXt+4utE/TJ2945E8HxgCDZDTak7JYsJoeCdFdmL8po+6A8pZpoV5SW44FvP4ttDAPCj0O2JtedRt8SU3q+0sti8vndAugwXcjvZcF7ujjB5IRl+G7aWNDMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by IA1PR11MB6370.namprd11.prod.outlook.com (2603:10b6:208:3ae::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Wed, 8 May 2024 10:50:08 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::487e:e20c:ad88:9c0f]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::487e:e20c:ad88:9c0f%7]) with mapi id 15.20.7544.041; Wed, 8 May 2024 10:50:08 +0000 Date: Wed, 8 May 2024 11:50:02 +0100 From: Bruce Richardson To: David Marchand CC: , Yu Jiang Subject: Re: [PATCH] eal/unix: support ZSTD compression for firmwares Message-ID: References: <20240508095214.2541115-1-david.marchand@redhat.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240508095214.2541115-1-david.marchand@redhat.com> X-ClientProxiedBy: DUZPR01CA0327.eurprd01.prod.exchangelabs.com (2603:10a6:10:4ba::17) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|IA1PR11MB6370:EE_ X-MS-Office365-Filtering-Correlation-Id: f9874428-dcd5-4b94-9dc8-08dc6f4ca07c X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|366007|376005|1800799015; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?GV4BqI031n8inGmcGTb5v+N1JxyYI+QETmFt7Oas89T/YtNeicliq5K4flOe?= =?us-ascii?Q?k7ofEjM7+XJmG3VpoE5B9MWXtZZS15dd+CNBAXYThTWgjA3d0SGIKShP8sYE?= =?us-ascii?Q?zNswkykJGgsDeFKVgRUtB+Ck+wQjq5zMFVS6tYIhHd+mFXP/fdM0wpo1rEOV?= =?us-ascii?Q?BzJY8ul5f5ayDgGx9vxQ9IjIEPtJXalrJwQnzrClPq1OsD5uX8nalsHnfGev?= =?us-ascii?Q?K1IepmF00ou5A/Kw30d7FPvRZy1DBEmu9uOb1434Yj444KCyifI1Cnd4uIRg?= =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uXrKCsk8MoI9yR9CIu4Lg7Vl+YEdm?= =?us-ascii?Q?PcJ+r5UMuoyvjL/bCGQJJmyXML6hSHygaPisN/q1Z/K8eH4ZeTLYp3KXMYua?= =?us-ascii?Q?Y8uuOcZftVkwqogxTmAFrTXX2+Ix+ZfPi/NYuEhMwg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(376005)(1800799015); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?355+w3eS82lWAkBtnl+CP+e0iudn6E1HiEgyCBw38UrGfsJG8fj8k25QdQKk?= =?us-ascii?Q?MTSlkq24V/5ykC+nItwj5lBgBtSy+3AAfFiZFPeAbpNJrRRG77NWgqJS6PWd?= =?us-ascii?Q?aNh4oJFhCR4v8ogkg3Xjtj54lAHhJne8YVGshG/89HZhkPikcVaRAaotVwPX?= =?us-ascii?Q?K7TdCKM8veFpsEDOto0XF7H/coucMXjSx/bXP7G+2iBm6ACt4R8Vg+op0s6b?= =?us-ascii?Q?R4igWlEGYYncxJzT1QsqqGm0DEbckr8LI2Heq1WAvVvDkcdX+9FidHOfd9FY?= =?us-ascii?Q?Dvb/3soPgKgHCJu5PpzCtAyF6hcTlxK0VdKP0n7PXdRdoEdkkThzJkWgycR0?= =?us-ascii?Q?C/u8taPGjazBu7g1zuL9Qps2BlyrizJb4AGEl/nryFnAGIpE+NIVYkg3v3JZ?= =?us-ascii?Q?Lfu2yWXi8CJq0G1+NXOsUKXWIup+Pr453L6hIx2EsYr+eZAJXemIJoS7hwCL?= =?us-ascii?Q?qtNa/OmtXOvwjBFhtDy7SNC4Pxy7VnIQ6JENSkFZ6PhkbCmBG9yOZ45NFm/3?= =?us-ascii?Q?G+byqIBbscKvYl1lJ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dC?= =?us-ascii?Q?3YrkhK0/s43kGYCAWj5HalbWf+193tn3RzpxMOcM9TO/673pzlvydThfouQM?= =?us-ascii?Q?66MkHIDywkHqahPI/clTqBOMivfEl3mioxjAUTH8Szcis9AYu0dubs1rbL6B?= =?us-ascii?Q?0S6DY6zGm+THLqBaslxYNKdd8T8q9qjIguW1gOCzEgYR593OyXVxN+6gAjKm?= =?us-ascii?Q?sw=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: f9874428-dcd5-4b94-9dc8-08dc6f4ca07c X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2024 10:50:08.2568 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dgD9Eb0R1+Ztj602GWJigzmV33gWo7eEys4voJrtx77a3lgReJCUYN9LvnfjoyA55P1JTUjI+zqgDJeOJMQf8IE0whmM9j0LydrP0NWgAFE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6370 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, May 08, 2024 at 11:52:14AM +0200, David Marchand wrote: > Ubuntu 24.04 started to compress firmwares with ZSTD compression. > > Bugzilla ID: 1437 > > Signed-off-by: David Marchand > --- > lib/eal/unix/eal_firmware.c | 42 +++++++++++++++++++++++++++++-------- > 1 file changed, 33 insertions(+), 9 deletions(-) > > diff --git a/lib/eal/unix/eal_firmware.c b/lib/eal/unix/eal_firmware.c > index 1d47e879c8..065e251f9d 100644 > --- a/lib/eal/unix/eal_firmware.c > +++ b/lib/eal/unix/eal_firmware.c > @@ -16,6 +16,21 @@ > #include "eal_firmware.h" > #include "eal_private.h" > > +#ifndef RTE_HAS_LIBARCHIVE > +/* Fake definitions for the compression_algorithms array below. */ > +struct archive; > +extern int archive_read_support_filter_xz(struct archive *a); > +extern int archive_read_support_filter_zstd(struct archive *a); > +#endif > + Do these not lead to unresolved symbols on link? > +static struct { > + const char *suffix; > + int (*support_callback)(struct archive *a); > +} compression_algorithms[] = { > + { "xz", archive_read_support_filter_xz, }, > + { "zst", archive_read_support_filter_zstd, }, > +}; > + Rather than defining stubs for these functions from libarchive, can you just have an empty list if no libarchive? struct archive; /* may need to be #ifdef'ed perhaps? */ static struct { const char *suffix; int (*support_callback)(struct archive *a); } compression_algorithms[] = { #ifdef RTE_HAS_LIBARCHIVE { "xz", archive_read_support_filter_xz, }, { "zst", archive_read_support_filter_zstd, }, #endif }; > #ifdef RTE_HAS_LIBARCHIVE >