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 B43DCA0A0F; Mon, 5 Jul 2021 05:33:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4E10E40686; Mon, 5 Jul 2021 05:33:47 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 6C94040141 for ; Mon, 5 Jul 2021 05:33:45 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10035"; a="272767976" X-IronPort-AV: E=Sophos;i="5.83,325,1616482800"; d="scan'208";a="272767976" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jul 2021 20:33:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.83,325,1616482800"; d="scan'208";a="448832156" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga007.jf.intel.com with ESMTP; 04 Jul 2021 20:33:42 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Sun, 4 Jul 2021 20:33:41 -0700 Received: from fmsmsx604.amr.corp.intel.com (10.18.126.84) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4; Sun, 4 Jul 2021 20:33:41 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.4 via Frontend Transport; Sun, 4 Jul 2021 20:33:41 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.104) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.4; Sun, 4 Jul 2021 20:33:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D75Fid0EiFtVXIBdHfe7UpMQlIKe5QC/F2tNr2KE/4AQeGbXY3sRlNiRFDqWJPtkNIbf/HZO9eRb1F/X3joKv3weLRVCjRN/dqtHOZAhHB6TPOniwocs082yrABkQ/n4mUSuyL4K9aBqmEeXmeh+/CXetVd93gz7rOxZU/n3rEDNojZjIjOedin3t92cQYn7orqd2VktrfmxHUykpsFKlWKRtJbs0wvDW8y0eTpxSzpjQNRj+IXSnlWUzlT1n8Pc4QZ6bdGi5vklZcZm6hQ1FJFV8Ay780SyMdjdtxBbnIEWQbvWYSfrlQ2X7gvz9cK59lER9+bjZP1iTcFOC5D7qw== 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=EYwyEZyyeHXO0O/GpsIXgX6hIiaIp39PyzZ2uJTKy10=; b=lE5PElY2bQfMB1mPZdLB7slSP/lePbVoCWpbSBAmfAkveWfGKDn50RRTxajzoIEQtxBmeaSNoX9srPTeij084Mg6SnAYLPHrdVuMMhbRGCfqYFwMJiA0pBhicpMxDpGvXi8FNjmrnUZx3f+iYgMbMek7ckLXngWhM1M6NCqj8znlmyUVrb3k9OBqZ3bJ+Is4s6eSekpwyJAP/mA539UCvDho8aC+2UHB+nx8TGjECLtaIkbgd9/iKf78asuJhxD3boyLRSZsEX7KH4RPF5Ud4d+txyha7EMrG6V5JFz8ipZZIadoZLUl3hS6O6czrJ2pYMZT4pnz9TP8/3UtKbvC1Q== 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=EYwyEZyyeHXO0O/GpsIXgX6hIiaIp39PyzZ2uJTKy10=; b=Y8AlA7x52PhL3Wqi/3hAN/1U9sCuqUZqlx24PokumIxaqtC0dlH/ulGne7JF963XoPbmNmp+2Be8ORBVLX8nkpJZxcrv1GFB01ghXinlta4x606k1IaLcqz9BvYYntpt/57AjUpeSg+9X9wBsuFPEZ58g6kJgVCU1LElgzLWpus= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN9PR11MB5289.namprd11.prod.outlook.com (2603:10b6:408:136::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4287.23; Mon, 5 Jul 2021 03:33:37 +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 03:33:36 +0000 From: "Wang, Haiyue" To: David Marchand , "dev@dpdk.org" CC: "Yang, Qiming" , "Zhang, Qi Z" Thread-Topic: [dpdk-dev] [PATCH v3 1/2] net/ice: factorize firmware loading Thread-Index: AQHXbL3LHM6wvHCgqECmshcrHyKK1Kszo0VAgAAfh8A= Date: Mon, 5 Jul 2021 03:33:36 +0000 Message-ID: References: <20210602095836.24901-1-david.marchand@redhat.com> <20210629080632.30964-1-david.marchand@redhat.com> <20210629080632.30964-2-david.marchand@redhat.com> In-Reply-To: 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.55.46.54] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 245f6bed-bb70-4b63-7a06-08d93f65ac90 x-ms-traffictypediagnostic: BN9PR11MB5289: 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:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: dKVdOFzxmkmsV0Ox2sjmuv2y5R1oDD4tIG/73S4gqdMesF1OkX6JFBKxM4XzIHnbdnaUBPB6MMB7Yg+p/3HvrWrWxvr5owaftzDnZ/E+1/CrETVOIA0BAvIOb8XU2ith/MDB9Wfd56CGglJ30Bs56pF813h2f1Z7K5tEJQr7xgUH3xisTDnYfk19F7/DrBBZR3s4gZDS6xcIJmsjNpIuRcNHivZPYdI8YkNoNgIOkfAlk9ivLcQU1K/dSj5wKp3rBzVo/ah3MVtkI24ZgfSK+bLqQmeCBb9K29WXrWJMe3/S0r6k+H+KHNIZZS/duhsMcio2eK8ZIysIOZcHjEIdsEbu+TFUb/R1V+uk1ow6a1/UDmOsJCv/ZDq7BU4hLoc64IwV7Rz8UNfMrnrFfBJFFurZxZI5c/wvSbFUGBwoE57Eff9cvDEiHVyeM+AvWnIssDhzkKatj4WGWDFodkDsl3+hx+lLwkhDdhrx+Ja3p2tx49K6neQD/9JGh0NmgBya021dVttdnBJ6PZvEoZahkzAEWBBUvYePGD8KT5NfT0y9WLYZQnYgiafyfXnGba/rsoNLXW5eRIjElbq3eU6ngQNXMZH6ChyRXnNkbP+XF9ZT3woyXxXEoetL+aSLN182hwR+hwjFtHxqhQDCVcUAl96NefhZfwwWkxuEDYWP7S7a3OczXmofmi+kjAgfWRMzIkvEPqS8+5zcALExG2Rqic7x5rrf3Mt+3lvNkIlmTH0= 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:(346002)(39860400002)(376002)(396003)(366004)(136003)(38100700002)(966005)(54906003)(110136005)(64756008)(122000001)(66946007)(186003)(66446008)(66476007)(66556008)(478600001)(26005)(76116006)(8936002)(9686003)(8676002)(83380400001)(5660300002)(6506007)(52536014)(4326008)(107886003)(86362001)(316002)(33656002)(53546011)(7696005)(55016002)(2906002)(2940100002)(71200400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?koi8-r?Q?4I1bdLTQjSA0KVwetJj7tPzHbxQk+SqWbSAmknSD4rnce2Zcgw9DiEkJaBCyoF?= =?koi8-r?Q?sCpPVUslV5N//zxMECZ3pTg1wkv8bNqB+1iRVfSau+YW5q5yNV1r9a5svqIde+?= =?koi8-r?Q?aF4Si+ZtyORAfBbVirvFvY1F3CQCDRqPk8lfmkBnMrRicAfclKB4dG2P3WB8tB?= =?koi8-r?Q?1fT2g9uBgcMHV1aKfju0w5bWab+uIxWgl/SHYbFWHskcKK9DQciyESGQUoEFxU?= =?koi8-r?Q?aEnQRkZtk48Hu1YvBpy00wLoe7iKU+j8lFxaM5GtcvUy6vnhy/PFdn4j1xJbu1?= =?koi8-r?Q?E43bIsjF3A90f/+lGmHTFh9WLq3jVeLiUq0NSvzdOsvUxfMpZDn2eH6aGzCn5y?= =?koi8-r?Q?7Gs5rMtIWiE0hX5CAbRT6bO/JGt8znaDDhjXXwHnlyCpnDUQoR2esMUVX4FSjJ?= =?koi8-r?Q?ugMc1h/lRJnJgJEq5PrzNmoZkNK577MLlptSwTykPEFERMoUnlZCAJ8VSDrnqG?= =?koi8-r?Q?6tUDkyDFp8Jv2NGuiZRiyVhck+UbAShiKZGFQfVCEiGiBW1XO7xb7hDjsmnwJt?= =?koi8-r?Q?i9V7XC1nAEyd9UE0HmwmWyzIpFcxlWeGjU5pBjBG34VvDoe3udQ80JaKd1Nys5?= =?koi8-r?Q?Ixud2GWwgL9OBT7sjb+L5/qcLcOIUFEp1fCDF7xfKyf+ZZ8wHQE4R72jaIGa35?= =?koi8-r?Q?b/nqJMsNqz0JWQec15C7I8UOhTat9ADi5tCBRqjbREcb5xLFp8eRKNaUDSSCiS?= =?koi8-r?Q?Ep50/jC7mtmhIfF2BMOivO1yA+surCS0sqIWBWjH4xVb+PIlZQujIm9XyR5GW5?= =?koi8-r?Q?OfsG7F0df6jfXevV9nTZwL+WaZwSKnSuZ9kdRSXoLzozvvOqvpP0VvBgoetfm/?= =?koi8-r?Q?62wANF85tywgmTPUC9LSaKsQT2LlKz75HZ7Z7qyp6ACuyGJN9QaxNz4MoOuqRI?= =?koi8-r?Q?soG+sU4/XnFfqZN6Y5S6g3LDHZQbFQzlyM9oy6XZZhxFlC8WjB5a5Pmczq18JC?= =?koi8-r?Q?Oet+3f6roX4OuK9q6q2UGTxNtAwltFLILkOj0neM8+TdhSdS8cNoKFcQ4WAFBH?= =?koi8-r?Q?xDfLDtt3pUItRVdCv1bcRPxRDYZC0s3Tbj1GCulvtCzxq8YzvictLE1UsukCZD?= =?koi8-r?Q?0ZeHzzw9YJU3QsC2P4kn59MuHf1OMTjcDENALECeFlsa5II/taclkU4c18ys2n?= =?koi8-r?Q?ZgGtAEwkm1bBZr8LZBZXIjvPrKN2dSivlfVgYswVRFzhLkBu1RBziMj2uS/DP3?= =?koi8-r?Q?MBeu0boTi5+ANK8c/Hdi18rspMloWnNycA83u0bHu38/EOtMgsXuDyjJeicYw5?= =?koi8-r?Q?DkMZICG/kScqHMJ69vkkY=3D?= Content-Type: text/plain; charset="koi8-r" 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: 245f6bed-bb70-4b63-7a06-08d93f65ac90 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2021 03:33:36.8242 (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: OOrZgO0sqzxDXh9CG/EuxQ1TjF7QBkBNCSrac3CWcW7LBAGZqnAM5Y7FXGqzvj3tWcw2vZ14cWO7/n6OueQN6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR11MB5289 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 1/2] net/ice: factorize firmware loading 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" Hi David & Qi, > -----Original Message----- > From: Wang, Haiyue > Sent: Monday, July 5, 2021 09:43 > To: David Marchand ; dev@dpdk.org > Cc: Yang, Qiming ; Zhang, Qi Z > Subject: RE: [dpdk-dev] [PATCH v3 1/2] net/ice: factorize firmware loadin= g >=20 > Hi David, >=20 > > -----Original Message----- > > From: dev On Behalf Of David Marchand > > Sent: Tuesday, June 29, 2021 16:07 > > To: dev@dpdk.org > > Cc: Yang, Qiming ; Zhang, Qi Z > > Subject: [dpdk-dev] [PATCH v3 1/2] net/ice: factorize firmware loading > > > > Both "normal" and "dcf" inits have their copy of some firmware loading > > code. > > > > The DSN query is moved in specific parts for the "normal" and "dcf" ini= t. > > > > A common helper ice_load_pkg is then introduced and takes an adapter > > pointer as its main input. > > > > This helper takes care of finding the right firmware file and loading > > it. > > The adapter active_pkg_type field is set by this helper. > > > > The ice_access macro is removed from the osdep.h header: osdep.h should > > only hosts wrappers for base driver code. > > > > Signed-off-by: David Marchand > > --- > > drivers/net/ice/base/ice_osdep.h | 6 -- > > drivers/net/ice/ice_dcf_parent.c | 97 ++----------------- > > drivers/net/ice/ice_ethdev.c | 161 +++++++++++++++---------------- > > drivers/net/ice/ice_ethdev.h | 3 +- > > 4 files changed, 88 insertions(+), 179 deletions(-) > > >=20 >=20 > > + if (!use_dsn) > > + goto no_dsn; > > + > > + memset(opt_ddp_filename, 0, ICE_MAX_PKG_FILENAME_SIZE); > > + snprintf(opt_ddp_filename, ICE_MAX_PKG_FILENAME_SIZE, > > + "ice-%016" PRIx64 ".pkg", dsn); > > + strncpy(pkg_file, ICE_PKG_FILE_SEARCH_PATH_UPDATES, > > + ICE_MAX_PKG_FILENAME_SIZE); > > + if (!ice_access(strcat(pkg_file, opt_ddp_filename), 0)) > > + goto load_fw; > > + > > + strncpy(pkg_file, ICE_PKG_FILE_SEARCH_PATH_DEFAULT, > > + ICE_MAX_PKG_FILENAME_SIZE); > > + if (!ice_access(strcat(pkg_file, opt_ddp_filename), 0)) > > + goto load_fw; > > + > > +no_dsn: > > + strncpy(pkg_file, ICE_PKG_FILE_UPDATES, ICE_MAX_PKG_FILENAME_SIZE); > > + if (!ice_access(pkg_file, 0)) > > + goto load_fw; > > + strncpy(pkg_file, ICE_PKG_FILE_DEFAULT, ICE_MAX_PKG_FILENAME_SIZE); > > + if (ice_access(pkg_file, 0)) { > > PMD_INIT_LOG(ERR, "failed to search file path\n"); > > - return err; > > + return -1; > > } > > > > +load_fw: > > file =3D fopen(pkg_file, "rb"); > > if (!file) { > > PMD_INIT_LOG(ERR, "failed to open file: %s\n", pkg_file); > > return -1; > > } > > >=20 > I'm wondering what's full name for ice firmware in F34, has any *.xz > postfix ? If so, the search method will also needs to be updated, since > we will check each file can be accessed: >=20 > #define ICE_PKG_FILE_DEFAULT "/lib/firmware/intel/ice/ddp/ice.pkg" > #define ICE_PKG_FILE_UPDATES "/lib/firmware/updates/intel/ice/ddp/ice.pkg= " >=20 We need to update the default/comms search method: I try the F34: tree /lib/firmware/intel/ice/ /lib/firmware/intel/ice/ =86=80=80 ddp =81=9A=9A =86=80=80 ice-1.3.16.0.pkg.xz =81=9A=9A =84=80=80 ice.pkg.xz -> ice-1.3.16.0.pkg.xz =84=80=80 ddp-comms =84=80=80 ice_comms-1.3.20.0.pkg.xz It matches the upstream version: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git= /tree/intel/ice d--------- ddp-comms 50 logstatsplain d--------- ddp 44 logstatsplain >=20 > > 2.23.0