From: "Xu, Rosen" <rosen.xu@intel.com>
To: "Pei, Andy" <andy.pei@intel.com>, "dev@dpdk.org" <dev@dpdk.org>,
"Yigit, Ferruh" <ferruh.yigit@intel.com>,
"Zhang, Tianfei" <tianfei.zhang@intel.com>
Subject: Re: [dpdk-dev] [PATCH v5 3/4] net/ipn3ke: clear statistics when init and start dev
Date: Tue, 2 Jul 2019 10:00:42 +0000 [thread overview]
Message-ID: <0E78D399C70DA940A335608C6ED296D73A863A36@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <1561977388-51692-3-git-send-email-andy.pei@intel.com>
> -----Original Message-----
> From: Pei, Andy
> Sent: Monday, July 01, 2019 18:36
> To: dev@dpdk.org
> Cc: Pei, Andy <andy.pei@intel.com>; Xu, Rosen <rosen.xu@intel.com>
> Subject: [PATCH v5 3/4] net/ipn3ke: clear statistics when init and start dev
>
> clear line side and NIC side statistics registers when HW init and uinit, and
> when dev start.
>
> Fixes: c01c748e4ae6 ("net/ipn3ke: add new driver")
> Cc: rosen.xu@intel.com
>
> Signed-off-by: Andy Pei <andy.pei@intel.com>
> ---
> drivers/net/ipn3ke/ipn3ke_ethdev.c | 59
> ++++++++++++++++++++++++++++-----
> drivers/net/ipn3ke/ipn3ke_representor.c | 27 ++++++++++++---
> 2 files changed, 74 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/ipn3ke/ipn3ke_ethdev.c
> b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> index 8d3084d..27ebfb5 100644
> --- a/drivers/net/ipn3ke/ipn3ke_ethdev.c
> +++ b/drivers/net/ipn3ke/ipn3ke_ethdev.c
> @@ -244,11 +244,33 @@
> /* Enable the RX path */
> ipn3ke_xmac_rx_enable(hw, i, 1);
>
> - /* Clear all TX statistics counters */
> - ipn3ke_xmac_tx_clr_stcs(hw, i, 1);
> + /* Clear NIC side TX statistics counters */
> + ipn3ke_xmac_tx_clr_10G_stcs(hw, i, 1);
>
> - /* Clear all RX statistics counters */
> - ipn3ke_xmac_rx_clr_stcs(hw, i, 1);
> + /* Clear NIC side RX statistics counters */
> + ipn3ke_xmac_rx_clr_10G_stcs(hw, i, 1);
> +
> + /* Clear line side TX statistics counters */
> + ipn3ke_xmac_tx_clr_10G_stcs(hw, i, 0);
> +
> + /* Clear line RX statistics counters */
> + ipn3ke_xmac_rx_clr_10G_stcs(hw, i, 0);
> + }
> + } else if (hw->retimer.mac_type ==
> + IFPGA_RAWDEV_RETIMER_MAC_TYPE_25GE_25GAUI)
> {
> + /* Enable inter connect channel */
> + for (i = 0; i < hw->port_num; i++) {
> + /* Clear NIC side TX statistics counters */
> + ipn3ke_xmac_tx_clr_25G_stcs(hw, i, 1);
> +
> + /* Clear NIC side RX statistics counters */
> + ipn3ke_xmac_rx_clr_25G_stcs(hw, i, 1);
> +
> + /* Clear line side TX statistics counters */
> + ipn3ke_xmac_tx_clr_25G_stcs(hw, i, 0);
> +
> + /* Clear line side RX statistics counters */
> + ipn3ke_xmac_rx_clr_25G_stcs(hw, i, 0);
> }
> }
>
> @@ -291,11 +313,32 @@
> /* Disable the RX path */
> ipn3ke_xmac_rx_disable(hw, i, 1);
>
> - /* Clear all TX statistics counters */
> - ipn3ke_xmac_tx_clr_stcs(hw, i, 1);
> + /* Clear NIC side TX statistics counters */
> + ipn3ke_xmac_tx_clr_10G_stcs(hw, i, 1);
> +
> + /* Clear NIC side RX statistics counters */
> + ipn3ke_xmac_rx_clr_10G_stcs(hw, i, 1);
> +
> + /* Clear line side TX statistics counters */
> + ipn3ke_xmac_tx_clr_10G_stcs(hw, i, 0);
> +
> + /* Clear line side RX statistics counters */
> + ipn3ke_xmac_rx_clr_10G_stcs(hw, i, 0);
> + }
> + } else if (hw->retimer.mac_type ==
> + IFPGA_RAWDEV_RETIMER_MAC_TYPE_25GE_25GAUI)
> {
> + for (i = 0; i < hw->port_num; i++) {
> + /* Clear NIC side TX statistics counters */
> + ipn3ke_xmac_tx_clr_25G_stcs(hw, i, 1);
> +
> + /* Clear NIC side RX statistics counters */
> + ipn3ke_xmac_rx_clr_25G_stcs(hw, i, 1);
> +
> + /* Clear line side TX statistics counters */
> + ipn3ke_xmac_tx_clr_25G_stcs(hw, i, 0);
>
> - /* Clear all RX statistics counters */
> - ipn3ke_xmac_rx_clr_stcs(hw, i, 1);
> + /* Clear line side RX statistics counters */
> + ipn3ke_xmac_rx_clr_25G_stcs(hw, i, 0);
> }
> }
> }
> diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c
> b/drivers/net/ipn3ke/ipn3ke_representor.c
> index 01ad92e..4456d9d 100644
> --- a/drivers/net/ipn3ke/ipn3ke_representor.c
> +++ b/drivers/net/ipn3ke/ipn3ke_representor.c
> @@ -159,11 +159,30 @@
> /* Enable the RX path */
> ipn3ke_xmac_rx_enable(hw, rpst->port_id, 0);
>
> - /* Clear all TX statistics counters */
> - ipn3ke_xmac_tx_clr_stcs(hw, rpst->port_id, 0);
> + /* Clear line side TX statistics counters */
> + ipn3ke_xmac_tx_clr_10G_stcs(hw, rpst->port_id, 0);
>
> - /* Clear all RX statistics counters */
> - ipn3ke_xmac_rx_clr_stcs(hw, rpst->port_id, 0);
> + /* Clear line side RX statistics counters */
> + ipn3ke_xmac_rx_clr_10G_stcs(hw, rpst->port_id, 0);
> +
> + /* Clear NIC side TX statistics counters */
> + ipn3ke_xmac_tx_clr_10G_stcs(hw, rpst->port_id, 1);
> +
> + /* Clear NIC side RX statistics counters */
> + ipn3ke_xmac_rx_clr_10G_stcs(hw, rpst->port_id, 1);
> + } else if (hw->retimer.mac_type ==
> +
> IFPGA_RAWDEV_RETIMER_MAC_TYPE_25GE_25GAUI) {
> + /* Clear line side TX statistics counters */
> + ipn3ke_xmac_tx_clr_25G_stcs(hw, rpst->port_id, 0);
> +
> + /* Clear line side RX statistics counters */
> + ipn3ke_xmac_rx_clr_25G_stcs(hw, rpst->port_id, 0);
> +
> + /* Clear NIC side TX statistics counters */
> + ipn3ke_xmac_tx_clr_25G_stcs(hw, rpst->port_id, 1);
> +
> + /* Clear NIC side RX statistics counters */
> + ipn3ke_xmac_rx_clr_25G_stcs(hw, rpst->port_id, 1);
> }
>
> ipn3ke_rpst_link_update(dev, 0);
> --
> 1.8.3.1
Acked-by: Rosen Xu <rosen.xu@intel.com>
next prev parent reply other threads:[~2019-07-02 10:00 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-03 6:31 [dpdk-dev] [PATCH 1/2] net/ipn3ke: add new register address Andy Pei
2019-06-03 6:31 ` [dpdk-dev] [PATCH 2/2] net/ipn3ke: implementation of statistics Andy Pei
2019-06-11 9:48 ` [dpdk-dev] [PATCH v2 1/4] net/ipn3ke: add new register address Andy Pei
2019-06-11 9:48 ` [dpdk-dev] [PATCH v2 2/4] net/ipn3ke: delete MAC register address mask Andy Pei
2019-06-12 1:17 ` Xu, Rosen
2019-06-11 9:48 ` [dpdk-dev] [PATCH v2 3/4] net/ipn3ke: clear statistics when init and start dev Andy Pei
2019-06-12 1:17 ` Xu, Rosen
2019-06-19 8:49 ` [dpdk-dev] [PATCH v3 1/4] net/ipn3ke: add new register address Andy Pei
2019-06-19 8:49 ` [dpdk-dev] [PATCH v3 2/4] net/ipn3ke: delete MAC register address mask Andy Pei
2019-06-19 8:49 ` [dpdk-dev] [PATCH v3 3/4] net/ipn3ke: clear statistics when init and start dev Andy Pei
2019-06-19 8:49 ` [dpdk-dev] [PATCH v3 4/4] net/ipn3ke: implementation of statistics Andy Pei
2019-06-19 9:05 ` David Marchand
2019-06-25 7:09 ` Pei, Andy
2019-06-25 7:16 ` David Marchand
2019-06-25 8:53 ` Pei, Andy
2019-06-25 8:58 ` David Marchand
2019-06-27 6:02 ` Pei, Andy
2019-06-25 7:50 ` [dpdk-dev] [PATCH v4 1/4] net/ipn3ke: add new register address Andy Pei
2019-06-25 7:50 ` [dpdk-dev] [PATCH v4 2/4] net/ipn3ke: delete MAC register address mask Andy Pei
2019-06-25 7:50 ` [dpdk-dev] [PATCH v4 3/4] net/ipn3ke: clear statistics when init and start dev Andy Pei
2019-06-25 7:50 ` [dpdk-dev] [PATCH v4] net/ipn3ke: implementation of statistics Andy Pei
2019-06-25 8:00 ` [dpdk-dev] [PATCH v4 1/4] net/ipn3ke: add new register address Andy Pei
2019-06-25 8:00 ` [dpdk-dev] [PATCH v4 2/4] net/ipn3ke: delete MAC register address mask Andy Pei
2019-06-25 8:00 ` [dpdk-dev] [PATCH v4 3/4] net/ipn3ke: clear statistics when init and start dev Andy Pei
2019-06-25 8:00 ` [dpdk-dev] [PATCH v4 4/4] net/ipn3ke: implementation of statistics Andy Pei
2019-06-27 5:49 ` Xu, Rosen
2019-06-28 8:54 ` Pei, Andy
2019-07-01 10:36 ` [dpdk-dev] [PATCH v5 1/4] net/ipn3ke: add new register address Andy Pei
2019-07-01 10:36 ` [dpdk-dev] [PATCH v5 2/4] net/ipn3ke: delete MAC register address mask Andy Pei
2019-07-02 10:00 ` Xu, Rosen
2019-07-08 2:06 ` Zhang, Qi Z
2019-07-01 10:36 ` [dpdk-dev] [PATCH v5 3/4] net/ipn3ke: clear statistics when init and start dev Andy Pei
2019-07-02 10:00 ` Xu, Rosen [this message]
2019-07-08 2:07 ` Zhang, Qi Z
2019-07-01 10:36 ` [dpdk-dev] [PATCH v5 4/4] net/ipn3ke: implementation of statistics Andy Pei
2019-07-02 10:01 ` Xu, Rosen
2019-07-08 2:09 ` Zhang, Qi Z
2019-07-02 9:59 ` [dpdk-dev] [PATCH v5 1/4] net/ipn3ke: add new register address Xu, Rosen
2019-07-08 2:06 ` Zhang, Qi Z
2019-07-08 16:00 ` Ferruh Yigit
2019-07-09 1:33 ` Pei, Andy
2019-06-11 9:48 ` [dpdk-dev] [PATCH v2 4/4] net/ipn3ke: implementation of statistics Andy Pei
2019-06-12 1:17 ` Xu, Rosen
2019-06-18 11:59 ` Ferruh Yigit
2019-06-18 12:39 ` Ferruh Yigit
2019-06-19 3:23 ` Pei, Andy
2019-06-12 1:17 ` [dpdk-dev] [PATCH v2 1/4] net/ipn3ke: add new register address Xu, Rosen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0E78D399C70DA940A335608C6ED296D73A863A36@SHSMSX104.ccr.corp.intel.com \
--to=rosen.xu@intel.com \
--cc=andy.pei@intel.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=tianfei.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).