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 A1D0CA04A2; Thu, 24 Feb 2022 05:19:00 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 798944114D; Thu, 24 Feb 2022 05:19:00 +0100 (CET) Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) by mails.dpdk.org (Postfix) with ESMTP id 867FB40E5A for ; Thu, 24 Feb 2022 05:18:59 +0100 (CET) Received: by mail-io1-f48.google.com with SMTP id w7so1360778ioj.5 for ; Wed, 23 Feb 2022 20:18:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=csSOWJgbmSk/e9V8XRjwdCSaZT4syolWn5lJetqve/8=; b=I3Fse9rtRI+TZVMYhRM5RNOHblYPmcwongHli0yXcDJImqMfixIekci/iov2saeIvT PL9Scq1PD7jle9YXAo+V51CoX5gi4tr/pj1xg7zBTcGuqUUUbPKGij2W235AlHSn2leW klFuBjKNZZ+a7TFgZrxguWi5v8+iEKyE2NpEXA/GoZaNk8moFyhdu6CejQjEjUWnXxf+ MA4Ggba0j3idVcbA+IR4KjBVzoIa7YrPL5xsx99t0Xzc7nENgYczXc15Fkp54suKIzsk qrS9ycRUJNS0xuuuFF55mN6il5axwT/cDQ2hP/GYTxG0c/cO/zNDG272CZ8BeYACXeiU Lf8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=csSOWJgbmSk/e9V8XRjwdCSaZT4syolWn5lJetqve/8=; b=F06zY52s2TB1gkA/MAdJKdrsEmf1zVft6Z/2JrPaWa70uIm4M9yQYvy5PqJP05ikHC LlnBfGAfwcywIbpBsX2aX6qwLA/sI/QqfkO1pA6IaOnULQgKJwBfJTXZCvVrne/hAFmw hpDsuKVzTLUOX0kc2A9ikdNyo2XbubI3PbxLb5nY/e5+nNJTvVUu+JF1oWL9rDFJFc7/ GyhzL/pHMlVqOoaaXWLDAleUxFcuxeC5oqDvVEwCLFq2juLK+b9/RDOLdVj07VDhVDv4 2+d95aWrIAspL80arn1LUoeQ25A+MuTqvlrRxMjwkgh4Ehe7D/vkWuoQ4EbIBlcEiW7W woUg== X-Gm-Message-State: AOAM532krY9hk8q7yxxQxtjbTb8zS3Zc3QxT1CUIGtRkUFFnb3YNkMH8 2zXKf/ROQTbdAR+RCsaFgC8SzODMo8f8Vamtny8= X-Google-Smtp-Source: ABdhPJx7laRyCe+NZbGhtU/z7XN8YPlngIhc1HduIz7OUni1WzVnnmpsSdcfEUar9lm6E56BWeYRRbp8net5pPdsKGQ= X-Received: by 2002:a05:6638:584:b0:311:9d1c:64b with SMTP id a4-20020a056638058400b003119d1c064bmr723430jar.158.1645676338923; Wed, 23 Feb 2022 20:18:58 -0800 (PST) MIME-Version: 1.0 References: <20220223125104.254210-1-rbhansali@marvell.com> In-Reply-To: <20220223125104.254210-1-rbhansali@marvell.com> From: Jerin Jacob Date: Thu, 24 Feb 2022 09:48:32 +0530 Message-ID: Subject: Re: [PATCH] common/cnxk: adds cn10k specific xstats To: Rahul Bhansali Cc: dpdk-dev , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Jerin Jacob Content-Type: text/plain; charset="UTF-8" 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 Wed, Feb 23, 2022 at 6:21 PM Rahul Bhansali wrote: > > This adds cn10k specific rx xstats of bpf, cpt and > ipsecd counters. > > Signed-off-by: Rahul Bhansali Acked-by: Jerin Jacob Changed the git commit as follows and Applied to dpdk-next-net-mrvl/for-next-net. Thanks common/cnxk: add cn10k specific xstats Add cn10k specific Rx xstats of bandwidth profile, CPT and IPsec counters. Signed-off-by: Rahul Bhansali Acked-by: Jerin Jacob > --- > drivers/common/cnxk/hw/nix.h | 1 + > drivers/common/cnxk/roc_nix_stats.c | 14 ++++++++++++++ > drivers/common/cnxk/roc_nix_xstats.h | 20 +++++++++++++++++++- > 3 files changed, 34 insertions(+), 1 deletion(-) > > diff --git a/drivers/common/cnxk/hw/nix.h b/drivers/common/cnxk/hw/nix.h > index 6931f1d1d2..1cc0c8dfb8 100644 > --- a/drivers/common/cnxk/hw/nix.h > +++ b/drivers/common/cnxk/hw/nix.h > @@ -419,6 +419,7 @@ > #define NIX_STAT_LF_RX_RX_RC_OCTS_DROP (0x16ull) /* [CN10K, .) */ > #define NIX_STAT_LF_RX_RX_RC_PKTS_DROP (0x17ull) /* [CN10K, .) */ > #define NIX_STAT_LF_RX_RX_CPT_DROP_PKTS (0x18ull) /* [CN10K, .) */ > +#define NIX_STAT_LF_RX_RX_IPSECD_DROP_PKTS (0x19ull) /* [CN10K, .) */ > > #define CGX_RX_PKT_CNT (0x0ull) /* [CN9K, CN10K) */ > #define CGX_RX_OCT_CNT (0x1ull) /* [CN9K, CN10K) */ > diff --git a/drivers/common/cnxk/roc_nix_stats.c b/drivers/common/cnxk/roc_nix_stats.c > index 756111fb1c..946cda114d 100644 > --- a/drivers/common/cnxk/roc_nix_stats.c > +++ b/drivers/common/cnxk/roc_nix_stats.c > @@ -353,6 +353,13 @@ roc_nix_xstats_get(struct roc_nix *roc_nix, struct roc_nix_xstat *xstats, > xstats[count].id = count; > count++; > } > + > + for (i = 0; i < CNXK_NIX_NUM_CN10K_RX_XSTATS; i++) { > + xstats[count].value = > + NIX_RX_STATS(nix_cn10k_rx_xstats[i].offset); > + xstats[count].id = count; > + count++; > + } > } > > return count; > @@ -422,6 +429,13 @@ roc_nix_xstats_names_get(struct roc_nix *roc_nix, > nix_tx_xstats_rpm[i].name); > count++; > } > + > + for (i = 0; i < CNXK_NIX_NUM_CN10K_RX_XSTATS; i++) { > + snprintf(xstats_names[count].name, > + sizeof(xstats_names[count].name), "%s", > + nix_cn10k_rx_xstats[i].name); > + count++; > + } > } > } > > diff --git a/drivers/common/cnxk/roc_nix_xstats.h b/drivers/common/cnxk/roc_nix_xstats.h > index b0eaab78e7..c0a6f693f2 100644 > --- a/drivers/common/cnxk/roc_nix_xstats.h > +++ b/drivers/common/cnxk/roc_nix_xstats.h > @@ -34,6 +34,23 @@ static const struct cnxk_nix_xstats_name nix_rx_xstats[] = { > {"rx_drp_l3mcast", NIX_STAT_LF_RX_RX_DRP_L3MCAST}, > }; > > +static const struct cnxk_nix_xstats_name nix_cn10k_rx_xstats[] = { > + {"rx_gc_octs_pass", NIX_STAT_LF_RX_RX_GC_OCTS_PASSED}, > + {"rx_gc_pkts_pass", NIX_STAT_LF_RX_RX_GC_PKTS_PASSED}, > + {"rx_yc_octs_pass", NIX_STAT_LF_RX_RX_YC_OCTS_PASSED}, > + {"rx_yc_pkts_pass", NIX_STAT_LF_RX_RX_YC_PKTS_PASSED}, > + {"rx_rc_octs_pass", NIX_STAT_LF_RX_RX_RC_OCTS_PASSED}, > + {"rx_rc_pkts_pass", NIX_STAT_LF_RX_RX_RC_PKTS_PASSED}, > + {"rx_gc_octs_drop", NIX_STAT_LF_RX_RX_GC_OCTS_DROP}, > + {"rx_gc_pkts_drop", NIX_STAT_LF_RX_RX_GC_PKTS_DROP}, > + {"rx_yc_octs_drop", NIX_STAT_LF_RX_RX_YC_OCTS_DROP}, > + {"rx_yc_pkts_drop", NIX_STAT_LF_RX_RX_YC_PKTS_DROP}, > + {"rx_rc_octs_drop", NIX_STAT_LF_RX_RX_RC_OCTS_DROP}, > + {"rx_rc_pkts_drop", NIX_STAT_LF_RX_RX_RC_PKTS_DROP}, > + {"rx_cpt_pkts_drop", NIX_STAT_LF_RX_RX_CPT_DROP_PKTS}, > + {"rx_ipsecd_pkts_drop", NIX_STAT_LF_RX_RX_IPSECD_DROP_PKTS}, > +}; > + > static const struct cnxk_nix_xstats_name nix_q_xstats[] = { > {"rq_op_re_pkts", NIX_LF_RQ_OP_RE_PKTS}, > }; > @@ -173,6 +190,7 @@ static const struct cnxk_nix_xstats_name nix_tx_xstats_cgx[] = { > #define CNXK_NIX_NUM_TX_XSTATS_CGX PLT_DIM(nix_tx_xstats_cgx) > #define CNXK_NIX_NUM_RX_XSTATS_RPM PLT_DIM(nix_rx_xstats_rpm) > #define CNXK_NIX_NUM_TX_XSTATS_RPM PLT_DIM(nix_tx_xstats_rpm) > +#define CNXK_NIX_NUM_CN10K_RX_XSTATS PLT_DIM(nix_cn10k_rx_xstats) > > #define CNXK_NIX_NUM_XSTATS_REG \ > (CNXK_NIX_NUM_RX_XSTATS + CNXK_NIX_NUM_TX_XSTATS + \ > @@ -182,7 +200,7 @@ static const struct cnxk_nix_xstats_name nix_tx_xstats_cgx[] = { > CNXK_NIX_NUM_TX_XSTATS_CGX) > #define CNXK_NIX_NUM_XSTATS_RPM \ > (CNXK_NIX_NUM_XSTATS_REG + CNXK_NIX_NUM_RX_XSTATS_RPM + \ > - CNXK_NIX_NUM_TX_XSTATS_RPM) > + CNXK_NIX_NUM_TX_XSTATS_RPM + CNXK_NIX_NUM_CN10K_RX_XSTATS) > > static inline uint64_t > roc_nix_num_rx_xstats(void) > -- > 2.25.1 >