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 8F509A0350; Mon, 3 Jan 2022 06:45:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 78A6741140; Mon, 3 Jan 2022 06:45:26 +0100 (CET) Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40057.outbound.protection.outlook.com [40.107.4.57]) by mails.dpdk.org (Postfix) with ESMTP id B0DE4410E0 for ; Mon, 3 Jan 2022 06:45:25 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oCByoaxEAhF7GXV/goloSzNZ/PHkQ4Cr/E/n2OQX6qVdg5fPJQI+qVGSjm9SxjYMdrr+VgykYw1gyKKg72Do+AR13FK9Ep6wwa5Yi55kqU5OPvh0b9D6uD1jP2vAVSYR74XjpQfL4C9dJX4Q4+jD4F2Z4nAJgwd7ZMiGS16qZglXmxBBJKAl19kM4meNAeR8W1kzkXmRIeMJHnZ9+DPOqoAicjU3N4GLd8Fq0G5V55T1YVQQ+NtgmUPwyh2hY0SDFkXIF7eIuAsLAN12QHWOqfnpz8kpKRAEzb3E4sNFcybWDJ0uoz4sbVHl13N4AuHKFOPPrSfo+RvsM2v09Q9mlQ== 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=DQJDgD34Dt7+cc67/EYIM2W51yaFB2qtRyxf00uer4M=; b=IG17jqMSmw/4VjH2T6/G74f18Lb0wyRa2NW7kCHy+ronlB68yiZxCzbtxDkSszzBjAYv5bJ6gtELTTzj8EKok2PW2fcobZON44d1L42AmJCyDmCEE5LYPohzxAlK4HkJNPnOX73PXiTrVXj50OrsPnIkJmO/XgF3Dal0csXbB4SmmaJgaGvUgYcw0UC/QhYbVDi6xpnVX3W3r7rLYgkADntChcURJeWx4fgxvceJVqXObSsyT5zV/SmpX3sKWDSNxgme5wHRssU0k6kYEnH11BAZxSNUfV22LyJPwdsEGT1+pMLC8Gb4lSVBwnia0Rt4ZbdzN6wxnvAgmzmEZqk69A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DQJDgD34Dt7+cc67/EYIM2W51yaFB2qtRyxf00uer4M=; b=h+vgL+jtxx7dkUje0S41Dkv7vBsCMz96g7p/jQ7s4oI3YYM3DOSywsmSdSd+jOF/T4sEKXuww9o97DqtPvuh1ypyKa1GszNHjaowIA2AlwHCJ16SVmv47AQD6aTt+kk6zagyl5gWLfzrfAHpykaVGU2O3M33R9w4SRjnWxox7m8= Received: from PAXPR04MB8427.eurprd04.prod.outlook.com (2603:10a6:102:1cd::13) by PA4PR04MB7696.eurprd04.prod.outlook.com (2603:10a6:102:f1::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4844.15; Mon, 3 Jan 2022 05:45:24 +0000 Received: from PAXPR04MB8427.eurprd04.prod.outlook.com ([fe80::b18f:f500:eccf:90b5]) by PAXPR04MB8427.eurprd04.prod.outlook.com ([fe80::b18f:f500:eccf:90b5%4]) with mapi id 15.20.4844.015; Mon, 3 Jan 2022 05:45:24 +0000 From: Nipun Gupta To: Stephen Hemminger CC: "dev@dpdk.org" , "thomas@monjalon.net" , "ferruh.yigit@intel.com" , Hemant Agrawal , Gagandeep Singh Subject: RE: [PATCH v2 15/16] net/pfe: reduce driver initialization time Thread-Topic: [PATCH v2 15/16] net/pfe: reduce driver initialization time Thread-Index: AQHX+z1dYaIZPiSSek+GWnAmNqZzz6xGoBGAgAoznXA= Date: Mon, 3 Jan 2022 05:45:24 +0000 Message-ID: References: <20211206121824.3493-1-nipun.gupta@nxp.com> <20211227161645.24359-1-nipun.gupta@nxp.com> <20211227161645.24359-16-nipun.gupta@nxp.com> <20211227095755.0aa34af9@hermes.local> In-Reply-To: <20211227095755.0aa34af9@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 351b71b8-febe-46ec-5425-08d9ce7c3d01 x-ms-traffictypediagnostic: PA4PR04MB7696:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2399; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Z9jsbagwU2iXE1qVqQ+r2SBQP0Ng3bC97miGDZeJJloHYgEslG0O1upDgqY1kJtIWdxpqLrytz3SoykwoEpH+5Ss0qBkAOSkGM5OKuJxKBdwAXHtbsLkL8MrDyD5HX3Y+sorcOMaPUShCbdO97ii8S7m+q142+K9GPi6lgRLAwg6SBVMSpNISiuTvpf90prTqGPsVsei0rN1hynKdW3+0/UvxR/o7ScqxBF+pO4S7BWzWyKdu7O4DEPLnABZ7PHGchtwt09z0B2RTySsx3V5CMKpvSmdF4WhcSD0Kg84f907G1aBOzrJ0zyW+gmlD4TnqpBr3UnpaD6yANZR/gxQv0XoQAIX0gpwJJqwZ7YldrZA6tnjlnnKpq56h+eyEqP0o1ISOojezNljHtf2W/fAG9yeUv/KcgI8VZ5Hb0hwcXfairzF0jQMZn9h6WOZzBg1rukUZ586qqIHAcF+ll4byzrypYj1o8VRUQBBh8v3MtwjRTyr5+9wXW5TjK2+1+ZbFtHteRhDCupkzXqy17p5gIkXCkWMhrrcKZ/d3x0xDndujwzxuoHbSXy5ev7CPqGLI/OhzeIaJY2B4Zcul1ziqYIE2JdFd+GNzoErgl5tYyOT2JLddRr/jRorjQkgfVHzUb9DmEHW7R1iLkbnU0+5kTUiKXLZz6WIzonwsiZ2AVsu2ZJ7uzod3yaLeXmE1gYMK1pkDqIdMVJQLACNcxPOCg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB8427.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(316002)(64756008)(66476007)(66556008)(38070700005)(66446008)(86362001)(52536014)(33656002)(76116006)(9686003)(6916009)(44832011)(26005)(66946007)(186003)(54906003)(508600001)(5660300002)(2906002)(55016003)(8676002)(7696005)(4326008)(122000001)(71200400001)(83380400001)(38100700002)(53546011)(8936002)(55236004)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Awe61fypv6yoUw/RViyTdV8z+7qEtS0dnRVU1xO/gTsiOMFRW28AOQhfDpdF?= =?us-ascii?Q?Xk7np5gXDj+bRDcmQx9WiDFPFRYdNiZuTps4iHDrR+BCINd6Qn8MPVvOo16g?= =?us-ascii?Q?LcE8TmK97MSKUV1MlsDY8y99hD6M5bMLisAUbZFk32QGOWBBkWsoSnwmHBlp?= =?us-ascii?Q?2ruTl01pkyXa9Q1rIEa6GLi+vxp30kOPAK73G9DYnNc90LlHHN9LnRIZ0eoT?= =?us-ascii?Q?9+8PUDxKFza9QsiybK+kXAHSeWrysFTad0ljfQjvzDM2cwd9c84QW4iVd9SF?= =?us-ascii?Q?22buXmnrS8plnZtNpVM/Lf9Qe6u3Ic7ihwahAYnEQVoYKUgT9bP37XdgdRrR?= =?us-ascii?Q?3x9qEFDs2fpdLNakrpcx7SQMKQGcwD6yz7xSXfj7//vtLWU/+VXXmn5NomWQ?= =?us-ascii?Q?NbPV7Kn1UW+TgamXXAT9P79o6RIz2Rcw8YUh+2K/esEC8JxSEyTvDXuLBMVN?= =?us-ascii?Q?QBHynb0teGSdY1p8HSGi/fGaT8AbbodBZOhyARfch7fqMoSQUrppyD/0AJSM?= =?us-ascii?Q?0IiGorRKeivBrUnLkfYX0kN0/nq1KUAfmFO5ppZ0TNWtmIxjLztTqdQSSB6z?= =?us-ascii?Q?GrBCoF1sEfipijuo7GRnAgurIITcfi1hpNzlcn0cPoZOatsz1s44D8B+otBW?= =?us-ascii?Q?Wgvxy63NuUjCTUfsvRZLmkVoyBrYSNtIz58I0Sri56k/5X5v6N2JIeDxU5WA?= =?us-ascii?Q?XongwCreV+b9jDaQTrNuExNx4eax22LA+REo/a+6Gw84Ml7n2TerLse1CC2T?= =?us-ascii?Q?HD0AeuSP8SI9wzKO+CJli5QE8yEp2f1XFt2baOX/FmcexS/Uu67Pq4gqWajE?= =?us-ascii?Q?NuXBVr86cRnTPSwfD2AObalUixesHRG1xwSf5RcUBysSldSqv74jLQ2mwmtL?= =?us-ascii?Q?XPbe2khvoSP9eD5adoWW7suHEqXc+tBBh/M1JBfb8EV37MfkLwLYGmFclF1Q?= =?us-ascii?Q?o42n3TXvFtOcPWSnGXAHiq8dLO1yeJ+WxhwyV2f2x6najH8xv9t69Jhfo7RF?= =?us-ascii?Q?rt/ABdOc43jt7RKUHhlb7uiEHdz8xpcihKMhNQC7vh1qsCuhR5UCOnG/BUV6?= =?us-ascii?Q?1Tg7ANsvRgnuBEKvM7xilDVpuh14tHcpUxtoROth98ecqPxxxoB403n7C085?= =?us-ascii?Q?Tmj+fFEvPj8UetNRYZnE1YkCV4DKT44DvhLaBrQC9bghe0o9f1A0hSIT4+qw?= =?us-ascii?Q?H9kYltAiSFYyN8s8nJLwwF38/HWuOC2ac7JsHokqFyDY1XunUchySpNWucnF?= =?us-ascii?Q?adPVdpkcbsyWyDgintwqIBvBbLxDo2SvfSgFaLN38sZDvISLhfJLSxQ9g4iF?= =?us-ascii?Q?VTdKULqH/7mCj6ATTNB+QWpbv34Us3GNkxaoQDQM4fgDsqSKIJIm1LTF+fE3?= =?us-ascii?Q?vCSEA2rG7YYd23kGnCJ1tS9h1ZxWajUW6nRFxO7ZEDjWhcylgeHeqIhYj/vD?= =?us-ascii?Q?Sm6HNt4HHogBYzORytCVipSWa9A6Uxo0lrpcbBiJ6DfhH6DXsfkaoptGyxsf?= =?us-ascii?Q?PiXGit2iH9U717CVbmtWW3WrcSJrwXP519T7x207uXakPmSnDVjH2mFRvFaM?= =?us-ascii?Q?T45lDGjpj5IyG4Dl6fTFJnJMZ43pe/mjDrMRUMY2cNakQWd5ww/ec6xiUtHs?= =?us-ascii?Q?7w=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8427.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 351b71b8-febe-46ec-5425-08d9ce7c3d01 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jan 2022 05:45:24.3871 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: xCeqTEjv4e6GK5X0/9eIFU9mWiZLdtXoYvGdmJT3MP0kDA4jml4KySrCZvf1yDOcxLqCelxvyxXU33TNlWy5dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7696 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 > -----Original Message----- > From: Stephen Hemminger > Sent: 27 December 2021 23:28 > To: Nipun Gupta > Cc: dev@dpdk.org; thomas@monjalon.net; ferruh.yigit@intel.com; Hemant > Agrawal ; Gagandeep Singh > Subject: Re: [PATCH v2 15/16] net/pfe: reduce driver initialization time >=20 > On Mon, 27 Dec 2021 21:46:44 +0530 > nipun.gupta@nxp.com wrote: >=20 > > From: Gagandeep Singh > > > > This patch reduces the delay in the device init. > > > > Signed-off-by: Gagandeep Singh > > --- > > drivers/net/pfe/pfe_hif.c | 6 ++++-- > > 1 file changed, 4 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/net/pfe/pfe_hif.c b/drivers/net/pfe/pfe_hif.c > > index c4a7154ba7..eade726b2e 100644 > > --- a/drivers/net/pfe/pfe_hif.c > > +++ b/drivers/net/pfe/pfe_hif.c > > @@ -1,5 +1,5 @@ > > /* SPDX-License-Identifier: BSD-3-Clause > > - * Copyright 2018-2019 NXP > > + * Copyright 2018-2020 NXP > > */ > > > > #include "pfe_logs.h" > > @@ -9,6 +9,8 @@ > > #include > > #include > > > > +#define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) > > +#define msleep(x) rte_delay_us(1000 * (x)) > > static int > > pfe_hif_alloc_descr(struct pfe_hif *hif) > > { > > @@ -766,7 +768,7 @@ pfe_hif_rx_idle(struct pfe_hif *hif) > > if (rx_status & BDP_CSR_RX_DMA_ACTV) > > send_dummy_pkt_to_hif(); > > > > - sleep(1); > > + msleep(DIV_ROUND_UP(100, 1000)); >=20 > Why not just > rte_delay_ms(1); Will update.