Soft Patch Panel
 help / color / Atom feed
From: x-fn-spp-ml@ntt-tx.co.jp
To: spp@dpdk.org, yasufum.o@gmail.com
Subject: [spp] [PATCH 5/5] mirror: remove ringlatency stats functionality
Date: Mon, 22 Jun 2020 10:18:54 +0900
Message-ID: <20200622011854.8059-6-x-fn-spp-ml@ntt-tx.co.jp> (raw)
In-Reply-To: <20200622011854.8059-1-x-fn-spp-ml@ntt-tx.co.jp>

From: Hideyuki Yamashita <yamashita.hideyuki@ntt-tx.co.jp>

This patch tries to remove ringlatency stats functionality.

Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki@ntt-tx.co.jp>
Signed-off-by: Naoki Takada <ntakada14@gmail.com>
---
 src/mirror/spp_mirror.c | 43 -----------------------------------------
 1 file changed, 43 deletions(-)

diff --git a/src/mirror/spp_mirror.c b/src/mirror/spp_mirror.c
index 2bfbf66..a2925f3 100644
--- a/src/mirror/spp_mirror.c
+++ b/src/mirror/spp_mirror.c
@@ -20,9 +20,6 @@
 #include "shared/secondary/spp_worker_th/cmd_utils.h"
 #include "shared/secondary/spp_worker_th/port_capability.h"
 
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-#include "shared/secondary/spp_worker_th/latency_stats.h"
-#endif
 
 /* Declare global variables */
 #define RTE_LOGTYPE_MIRROR RTE_LOGTYPE_USER1
@@ -336,13 +333,8 @@ mirror_proc(int id)
 
 	rx = &path->ports[0].rx;
 
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-	nb_rx = sppwk_eth_ring_stats_rx_burst(rx->ethdev_port_id,
-			rx->iface_type, rx->iface_no, 0, bufs, MAX_PKT_BURST);
-#else
 	nb_rx = rte_eth_rx_burst(rx->ethdev_port_id, rx->queue_no, bufs,
 			MAX_PKT_BURST);
-#endif
 
 	if (unlikely(nb_rx == 0))
 		return SPPWK_RET_OK;
@@ -399,26 +391,15 @@ mirror_proc(int id)
 		}
 
 		if (cnt != 0)
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-			nb_tx2 = sppwk_eth_ring_stats_tx_burst(
-					tx->ethdev_port_id, tx->iface_type,
-					tx->iface_no, 0, copybufs, cnt);
-#else
 			nb_tx2 = rte_eth_tx_burst(tx->ethdev_port_id,
 					tx->queue_no, copybufs, cnt);
-#endif
 	}
 
 	/* orginal */
 	tx = &path->ports[0].tx;
 	if (tx->ethdev_port_id >= 0)
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-		nb_tx1 = sppwk_eth_ring_stats_tx_burst(tx->ethdev_port_id,
-				tx->iface_type, tx->iface_no, 0, bufs, nb_rx);
-#else
 		nb_tx1 = rte_eth_tx_burst(tx->ethdev_port_id, tx->queue_no,
 				bufs, nb_rx);
-#endif
 	nb_tx = nb_tx1;
 
 	if (nb_tx1 != nb_tx2)
@@ -570,24 +551,6 @@ main(int argc, char *argv[])
 		if (unlikely(ret_cmd_init != SPPWK_RET_OK))
 			break;
 
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-		int port_type, port_id;
-		char dev_name[RTE_DEV_NAME_MAX_LEN] = { 0 };
-		int nof_rings = 0;
-		for (int i = 0; i < RTE_MAX_ETHPORTS; i++) {
-			if (!rte_eth_dev_is_valid_port(i))
-				continue;
-			rte_eth_dev_get_name_by_port(i, dev_name);
-			ret = parse_dev_name(dev_name, &port_type, &port_id);
-			if (port_type == RING)
-				nof_rings++;
-		}
-		int ret_ringlatency = sppwk_init_ring_latency_stats(
-				SPP_RING_LATENCY_STATS_SAMPLING_INTERVAL,
-				nof_rings);
-		if (unlikely(ret_ringlatency != SPPWK_RET_OK))
-			break;
-#endif /* SPP_RINGLATENCYSTATS_ENABLE */
 
 		/* Start worker threads of classifier and forwarder */
 		lcore_id = 0;
@@ -630,9 +593,6 @@ main(int argc, char *argv[])
 			 */
 			usleep(100);
 
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-			print_ring_latency_stats(&g_iface_info);
-#endif /* SPP_RINGLATENCYSTATS_ENABLE */
 		}
 
 		if (unlikely(ret_do != SPPWK_RET_OK)) {
@@ -653,9 +613,6 @@ main(int argc, char *argv[])
 	 /* Remove vhost sock file if not running in vhost-client mode. */
 	del_vhost_sockfile(g_iface_info.vhost);
 
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-	sppwk_clean_ring_latency_stats();
-#endif /* SPP_RINGLATENCYSTATS_ENABLE */
 
 	RTE_LOG(INFO, MIRROR, "Exit spp_mirror.\n");
 	return ret;
-- 
2.17.1


  parent reply index

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22  1:18 [spp] [PATCH 0/5] " x-fn-spp-ml
2020-06-22  1:18 ` [spp] [PATCH 1/5] Makefile: " x-fn-spp-ml
2020-06-22  1:18 ` [spp] [PATCH 2/5] shared: " x-fn-spp-ml
2020-06-22  1:18 ` [spp] [PATCH 3/5] vf: " x-fn-spp-ml
2020-06-22  1:18 ` [spp] [PATCH 4/5] pcap: " x-fn-spp-ml
2020-06-22  1:18 ` x-fn-spp-ml [this message]
2020-06-22  4:57 ` [spp] [PATCH 0/5] " Itsuro ODA
2020-07-02  0:31 ` Yasufumi Ogawa
2020-07-09  4:28   ` Yasufumi Ogawa
2020-07-09  5:30 ` [spp] [PATCH v2 " x-fn-spp-ml
2020-07-10  5:46   ` Yasufumi Ogawa
2020-07-09  5:30 ` [spp] [PATCH v2 1/5] makefile: " x-fn-spp-ml
2020-07-09  5:30 ` [spp] [PATCH v2 2/5] shared/sec: " x-fn-spp-ml
2020-07-09  5:30 ` [spp] [PATCH v2 3/5] spp_pcap: " x-fn-spp-ml
2020-07-09  5:30 ` [spp] [PATCH v2 4/5] spp_vf: " x-fn-spp-ml
2020-07-09  5:30 ` [spp] [PATCH v2 5/5] spp_mirror: " x-fn-spp-ml

Reply instructions:

You may reply publically 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=20200622011854.8059-6-x-fn-spp-ml@ntt-tx.co.jp \
    --to=x-fn-spp-ml@ntt-tx.co.jp \
    --cc=spp@dpdk.org \
    --cc=yasufum.o@gmail.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

Soft Patch Panel

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/spp/0 spp/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 spp spp/ http://inbox.dpdk.org/spp \
		spp@dpdk.org
	public-inbox-index spp


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.spp


AGPL code for this site: git clone https://public-inbox.org/ public-inbox