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 AB27EA0A0F; Mon, 5 Jul 2021 15:19:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C31DE40040; Mon, 5 Jul 2021 15:19:32 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 719E44003C for ; Mon, 5 Jul 2021 15:19:30 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10035"; a="209019717" X-IronPort-AV: E=Sophos;i="5.83,325,1616482800"; d="scan'208";a="209019717" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2021 06:19:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,325,1616482800"; d="scan'208";a="456718376" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga008.jf.intel.com with ESMTP; 05 Jul 2021 06:19:28 -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.2242.10; Mon, 5 Jul 2021 06:19:28 -0700 Received: from orsmsx604.amr.corp.intel.com (10.22.229.17) 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.2242.4; Mon, 5 Jul 2021 06:19:28 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Mon, 5 Jul 2021 06:19:28 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Mon, 5 Jul 2021 06:19:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FHbyR+tEyd9EZ0E1amgyZBL1EoQ9Tm31R6Az6RGyPQ+vhT9VvU0Nh42bmXMr7S/nj5SKmTeHiHYz7U6v41ERNtOcEFvjFZx6DZqkXkXS0iusauoJjLMUmTdeTKBaVoMdcLjTQL+KP4TKHRi1o3qCx+ul1djQ4edqpkOhpEgGdAqAUgbeE7XPRgcYIhV+0hHEGk6yhP/AfNRFXJ0HcRxs3Ny2e9FxauKd6PAZaVX4ku5qM8Kc7nUN5YzcthWP+3vt/Ff0RIREFBBtl+A3pTze47TXwF/rpehhJ67LhraB3W81OgCT3FwF7PeC+9eUDe/Soq8GR8qa+8fQcTutJ5nP2A== 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-SenderADCheck; bh=XQghRp33kNPBX3R/CnAnvcphGP3BRyn/9+2pVQ/xvis=; b=UBkNNR1hvAEVHbB8B8+iN7Ru7r4V0atcOq04WJxh2gSV0ekrqcgll7bAdfw8TVsi78vQ5F1K+iawCVd6Zu0YUvMI/qBg081I4Lh/BnZNIDo4lGI4QAp5fRHn2cfJPZ2iqvumJL/jACbsKe6Q82SqQhDTrfuZyhx1Vt8uPujnua34M4x/loZ48IYzAfA8q+ess9NW/ZxaNVF+22dKzP1xo+MLLfNAGml8fCHAsbtzVvHM1tcq7PLcWnUAqn4yWj4OxD4bhmul9PLjo4vxUCAHid8jdfWYmiWIEh04YXg9odvqPU1Dv3yQxJN+tAgbJQiSGNt/g1uhRxt1Rs8lRETnSQ== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XQghRp33kNPBX3R/CnAnvcphGP3BRyn/9+2pVQ/xvis=; b=BElD0D7nvKV8xr61eQF9DVZk/3x8mzWtaRKldl7Nqin7y479Jp6FSpwwJtQfVn+9OzUMxJjYLvWxZ+HLnqhIsczBmx6PMJ/TsLExL7UFKAVrkglhKqDCLZeMHrpH3ykkAD8w2cCfGht8W7pNKCtBfpk3ls5U9O/DBQA673yQhuY= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN6PR11MB1409.namprd11.prod.outlook.com (2603:10b6:404:46::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.27; Mon, 5 Jul 2021 13:19:15 +0000 Received: from BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::8807:6661:e425:102]) by BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::8807:6661:e425:102%7]) with mapi id 15.20.4287.033; Mon, 5 Jul 2021 13:19:14 +0000 From: "Wang, Haiyue" To: David Marchand , "dev@dpdk.org" CC: Igor Russkikh , Aaron Conole , Michael Santana , "Richardson, Bruce" , Rasesh Mody , Shahed Shaikh , "Yang, Qiming" , "Zhang, Qi Z" , Heinrich Kuhn , "Devendra Singh Rawat" , Ray Kinsella , "Neil Horman" , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , "Kadam, Pallavi" Thread-Topic: [dpdk-dev] [PATCH v3 2/2] eal: handle compressed firmwares Thread-Index: AQHXbL3RKn320QbtAkSEENioEUd0H6s0Zuqw Date: Mon, 5 Jul 2021 13:19:14 +0000 Message-ID: References: <20210602095836.24901-1-david.marchand@redhat.com> <20210629080632.30964-1-david.marchand@redhat.com> <20210629080632.30964-3-david.marchand@redhat.com> In-Reply-To: <20210629080632.30964-3-david.marchand@redhat.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.0.76 authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.143.19] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 480c370d-868b-49cf-397b-08d93fb77c6f x-ms-traffictypediagnostic: BN6PR11MB1409: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IpCJ/gMSJBdxS01YkvJyrdN8rkW0gyxT/rH2wf+peZVOV2HeJhQ49gfYR9B926tv62RBtf5NXMLAtkOfpCQTvm1Xut1e1ZfcDhNJHjd/jtJcExH47wyma/ilLgkf4YxszJjwMEG+CBrMXKM8WmW8KjoQ/8wfh/jqSpSwJ+ZtZ1zHBgKcuCAL+7skXnPQ4PfWmnLI9AJOseGOgfbjvz6qdSvp/hsA1cfigSXgGZ0S3LjOXTMLpnorpSobDDizoq3qqo5WD/p3ZwSJszOuCqNPRYMz1lgioHb2zByu0FhCyStYldXhFNW1/AINXpcoBKafnv9bNXG6YCOsNWZGaVokCzbGHDkZ03a8V8i6g6lI0dlIlh7CBbOZDIDlHFDhXV0d8S1MZDay2/3odn0llIUDWv6BcdGfaT2dO7bV+MF1WOFA+cjyQ0Pwg7DS8rT4yMTxAT6vH6/gOjC0Z2zLOkus7HmNSR5noFqDKocV0weQWpv+FOWeLLwiGPhBMMDVih/7OtaeuTuMSfSwefIKLMC03ClclCsUuSYBK4GwefgPSIFzzmpfQ1n90p4wdKsy9Iqbpkk9/TSyj8xnxnHbQHpcKmIINMzCA5RG0KhHSzLc4f5pPWua+vzHe4WIV/ggFPlOieYoYpkWrzzR61NVVX3/xg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR11MB3795.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(396003)(136003)(366004)(346002)(39860400002)(55016002)(7696005)(9686003)(54906003)(478600001)(316002)(86362001)(33656002)(110136005)(186003)(107886003)(53546011)(66556008)(7416002)(4326008)(5660300002)(66476007)(26005)(71200400001)(64756008)(8936002)(2906002)(52536014)(66446008)(76116006)(38100700002)(8676002)(6506007)(122000001)(83380400001)(66946007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?XXpMKgVCeJkUhmDXNkADCfv9ABe81i4EkpkT/Z1xca8eCThHWT1I9qaCLpyD?= =?us-ascii?Q?/R1s8NuoWidj/FfePxqQvf+5kTGS3LV0eB03XCH7pN2MPyVk+TjBntP0/p6G?= =?us-ascii?Q?3tmWM510M6sB9WBbCnryO9StAuUn3DicHJhYyjK9srMej3L5/NiIsSpzAnyB?= =?us-ascii?Q?O9jNEJwdP9iU5lP/p8VONPU2hbGCDeEchHhs/MoR4j6S2uIFxgtRe0RHO5gQ?= =?us-ascii?Q?4FUrs1exzh8ruDdeqJyfZ2vJtKRWZ8ubLOzGaBHtreDlMk+1YtBZL6rFKCme?= =?us-ascii?Q?tn74bIYLxQ1fTtxK3dZbyNfjDQrOfPleLchNKBZhDqdK1qKbumBTYwgHARjw?= =?us-ascii?Q?nhLVYykmwPN9SAB6py57uz/WoIh6sDlR3oKhKVFwQYpUc1ClZ87Git2j3Cw/?= =?us-ascii?Q?kR7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N0PPy56cfkCVK?= =?us-ascii?Q?yYu1SsyxbaUghD0EymNFCyZJ?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3795.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 480c370d-868b-49cf-397b-08d93fb77c6f X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2021 13:19:14.6975 (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: +8Xd9wlYc7BeakjHeuGi17BIrmBW+b9yyTaR21veKze5x/RYVhnpSg1rOXlR03YJcPLaAzJiRbl7RmVaaEVB2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1409 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 2/2] eal: handle compressed firmwares 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 Sender: "dev" > -----Original Message----- > From: dev On Behalf Of David Marchand > Sent: Tuesday, June 29, 2021 16:07 > To: dev@dpdk.org > Cc: Igor Russkikh ; Aaron Conole ; Michael Santana > ; Richardson, Bruce ; Rasesh Mody > ; Shahed Shaikh ; Yang, Qiming <= qiming.yang@intel.com>; Zhang, > Qi Z ; Heinrich Kuhn ;= Devendra Singh Rawat > ; Ray Kinsella ; Neil Horman ; Dmitry > Kozlyuk ; Narcisa Ana Maria Vasile ; Dmitry > Malloy ; Kadam, Pallavi > Subject: [dpdk-dev] [PATCH v3 2/2] eal: handle compressed firmwares >=20 > Introduce an internal firmware loading helper to remove code duplication > in our drivers and handle xz compressed firmwares by calling libarchive. >=20 > This helper tries to look for .xz suffixes so that drivers are not aware > the firmwares have been compressed. >=20 > libarchive is set as an optional dependency: without libarchive, a > runtime warning is emitted so that users know there is a compressed > firmware. >=20 > Windows implementation is left as an empty stub. >=20 > Signed-off-by: David Marchand > Reviewed-by: Igor Russkikh > --- > Changes since v2: > - added a comment on libarchive link dependency, >=20 > Changes since v1: > - used pkg-config for libarchive detection, > - updated doxygen annotations, > - added internal helpers in eal_firmware.c to enhance readability, > - dropped whitespace damage in version.map, >=20 > --- > .github/workflows/build.yml | 1 + > .travis.yml | 1 + > config/meson.build | 10 +++ > drivers/net/bnx2x/bnx2x.c | 35 +++----- > drivers/net/ice/ice_ethdev.c | 60 +++---------- For ice PMD: Tested-by: Haiyue Wang > drivers/net/nfp/nfp_net.c | 57 +++---------- > drivers/net/qede/qede_main.c | 45 ++++------ > lib/eal/include/rte_firmware.h | 32 +++++++ > lib/eal/unix/eal_firmware.c | 149 +++++++++++++++++++++++++++++++++ > lib/eal/unix/meson.build | 1 + > lib/eal/version.map | 1 + > lib/eal/windows/eal.c | 9 ++ > 12 files changed, 259 insertions(+), 142 deletions(-) > create mode 100644 lib/eal/include/rte_firmware.h > create mode 100644 lib/eal/unix/eal_firmware.c >=20 > -- > 2.23.0