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 04BB2A04A9; Mon, 27 Dec 2021 18:57:59 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7AFE640683; Mon, 27 Dec 2021 18:57:59 +0100 (CET) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id 449264067B for ; Mon, 27 Dec 2021 18:57:58 +0100 (CET) Received: by mail-pl1-f174.google.com with SMTP id h6so8008635plf.6 for ; Mon, 27 Dec 2021 09:57:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mueduBKtVFKwL3lAklBhvI7b9z7gJh7O3oHZu2dccC0=; b=lWnQ4codSjrt7+Jqu4yEtuTKRnK+nXXQDhQpwP9FceAcV3uJtomVnU+8fT4alAbVrj Ex8LhGNw37FlmUkj3NIcnFUqMIiFyhpfA/U7G0DA9NFBB3TwjNIaTjdmyXbn7D5k54Cb ehy4CdJ55z4H0zYaEv9EDIekQl3um1kDzj8Nc+MUvDB9czVUAkNWekiwJqhsMYVqO9+H oB9ZVSMH9O75gqwRyuXt8d1ARqE8+DbY+ucnn0Z6mA50JupgEeKwHJj0uKkUkBdZq4Ba RcEAcaM+poZVTERt5/D4WXyI6e+hiOZVdrjlNjlvYPd/RDNdD5bQ8XP7ttnd1t2U1DI4 K0oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mueduBKtVFKwL3lAklBhvI7b9z7gJh7O3oHZu2dccC0=; b=awDuD/QOv1er0+JGNB8B2ZAv/Ol0Uok/HsYH8oh6gw05MPmnTzs11Qcc8B92pFfH3z /v2xCYhpsXZvrzAq2YtuDMxvSmSMPDiHnEeOleq+FRVK0bxkFosVtvjGRxHQ55SIR6qt thcgBZC8BgCdqOGhDB8o9PDpWnOVTW91m5T/1ZSsHBcDix4z8z448cMHRlILG/gN+V6U +1ut7fO+o1CyTBpVp0lEoDlJFZ047wGcDMlqo8T1cH/VyHYH5NomV4lAZ7+cq6BM62Vr WRR8y+6NF5eK5Zbcn4s+GEn7jVxT7/w3wOiFUp7hXrK7cXi6DRlIj83E/MvxFXt+9dJW MBfg== X-Gm-Message-State: AOAM5307xII8BCMnbEAFiOz03ULwf37MYv+YCJG2mj9fXitCCeSd6vdX +/xLuIPiLmKt8h4Kgcq2y+QgaA== X-Google-Smtp-Source: ABdhPJyyLQBQAVafg3Gev2HpE4eGeedTTUqDD8iioNf3vQqjauvEt00YvTKew3g1t+l3/LmW2L+XSg== X-Received: by 2002:a17:902:e884:b0:148:b91b:d7e2 with SMTP id w4-20020a170902e88400b00148b91bd7e2mr17835349plg.87.1640627877370; Mon, 27 Dec 2021 09:57:57 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id k8sm11985599pjs.53.2021.12.27.09.57.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Dec 2021 09:57:57 -0800 (PST) Date: Mon, 27 Dec 2021 09:57:55 -0800 From: Stephen Hemminger To: nipun.gupta@nxp.com Cc: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@intel.com, hemant.agrawal@nxp.com, Gagandeep Singh Subject: Re: [PATCH v2 15/16] net/pfe: reduce driver initialization time Message-ID: <20211227095755.0aa34af9@hermes.local> In-Reply-To: <20211227161645.24359-16-nipun.gupta@nxp.com> References: <20211206121824.3493-1-nipun.gupta@nxp.com> <20211227161645.24359-1-nipun.gupta@nxp.com> <20211227161645.24359-16-nipun.gupta@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Mon, 27 Dec 2021 21:46:44 +0530 nipun.gupta@nxp.com wrote: > 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)); Why not just rte_delay_ms(1);