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 EF86FA09E4; Sat, 24 Apr 2021 20:56:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72E0F4013F; Sat, 24 Apr 2021 20:56:24 +0200 (CEST) Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) by mails.dpdk.org (Postfix) with ESMTP id D3BC240040 for ; Sat, 24 Apr 2021 20:56:22 +0200 (CEST) Received: by mail-qk1-f182.google.com with SMTP id s5so44090039qkj.5 for ; Sat, 24 Apr 2021 11:56:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Yc1OFxaPvR2TtWNdkSZGS0eJX8SXmZ6kufyDcc+nNeQ=; b=Qkbw3HQBPsqET1c2d/ld+5/ypxb5DBhAG7lkhjFRU1jh0Wji1UPTc4Ixcu8qX6v2np BrAXT6sfFrfDK1k7+mGkLcIu00Z4VjKC2aiA7qBCmDT8osFZTTwCdd7XZ62wN2+zk0cq wkJ26W1H8X7ajb3XaAIumeqDmTi9p7QOAxakc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Yc1OFxaPvR2TtWNdkSZGS0eJX8SXmZ6kufyDcc+nNeQ=; b=rJ4wPEGV7mtzqZ0DOPSI9tbNf3nhMoppyzQJvaenxonfVxjgnkXfRyu/fy0hkcKChR hZDwVX5hjw/UsEkpLti88H99bsnzfoRLS0qjevKjtNBAH0UfIiDRjAandHKqIRkNLMgu K+Bod/rP3fSgB+PUyMBZp18KH7poHxxNkAidMNPXcFHCEokJRyiInJlGQpkjxxMF5dsQ K33lFFtaj4gv6SL1qSgOwbilsuO4Ip81Kay4zh+FjS9+t74N33M4Om+/MsgoW6M3q+Rt 3Bq4XJLFsn1oB/x5/kWn6wpQolaBnXr8xpP1VdX1AcsV/6KPvYIUG8EeEwahVqZpc97y uxTQ== X-Gm-Message-State: AOAM530ZNgduOVq+JtJgw/c7FUudvI3eZTO8Rw6LdHtXZGp0DZK6swjD sLghNkxW423yB1qchS+kD1JWTPV84RBiAc4U+UNu9Q== X-Google-Smtp-Source: ABdhPJxO7c6R9vYt9qgtLOh+Q2vUsHUcYEbAW4s/VEzsy5QAe4iKQrJtHFe9LCRVH+4l7hLuvs4aR8UUjJ/ftNQ1hKM= X-Received: by 2002:ae9:e8d5:: with SMTP id a204mr9641662qkg.409.1619290582039; Sat, 24 Apr 2021 11:56:22 -0700 (PDT) MIME-Version: 1.0 References: <20210421230929.434822-1-stephen@networkplumber.org> In-Reply-To: <20210421230929.434822-1-stephen@networkplumber.org> From: Ajit Khaparde Date: Sat, 24 Apr 2021 11:56:05 -0700 Message-ID: To: Stephen Hemminger Cc: Somnath Kotur , dpdk-dev Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000f4117205c0bc77fc" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH] bnxt: skip getting statistics for queues not started 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" --000000000000f4117205c0bc77fc Content-Type: text/plain; charset="UTF-8" On Wed, Apr 21, 2021 at 4:09 PM Stephen Hemminger wrote: > > An application using rte_flow may define a large number of queues > but only use a small subset of them at any one time. > > Since querying the status of each queue requires a request/spin/reply > with the firmware, optimize by skipping the request for queues not running. > For those queues the statistics will be 0. > > This cuts the cost of single xstats query in half and has even > bigger gain for simple stats query. > > Signed-off-by: Stephen Hemminger Changed the commit headline to "net/bnxt: skip get statistics for stopped queues" Patch applied to dpdk-next-net-brcm. Thanks > --- > drivers/net/bnxt/bnxt_stats.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/net/bnxt/bnxt_stats.c b/drivers/net/bnxt/bnxt_stats.c > index bb4b2eee194e..11767e06d074 100644 > --- a/drivers/net/bnxt/bnxt_stats.c > +++ b/drivers/net/bnxt/bnxt_stats.c > @@ -528,6 +528,8 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, > struct bnxt_rx_queue *rxq = bp->rx_queues[i]; > struct bnxt_cp_ring_info *cpr = rxq->cp_ring; > > + if (!rxq->rx_started) > + continue; > rc = bnxt_hwrm_ctx_qstats(bp, cpr->hw_stats_ctx_id, i, > bnxt_stats, 1); > if (unlikely(rc)) > @@ -543,6 +545,8 @@ int bnxt_stats_get_op(struct rte_eth_dev *eth_dev, > struct bnxt_tx_queue *txq = bp->tx_queues[i]; > struct bnxt_cp_ring_info *cpr = txq->cp_ring; > > + if (!txq->tx_started) > + continue; > rc = bnxt_hwrm_ctx_qstats(bp, cpr->hw_stats_ctx_id, i, > bnxt_stats, 0); > if (unlikely(rc)) > -- > 2.30.2 > --000000000000f4117205c0bc77fc--