[spp] [PATCH v2 4/5] spp_vf: remove ringlatency stats functionality

x-fn-spp-ml at ntt-tx.co.jp x-fn-spp-ml at ntt-tx.co.jp
Thu Jul 9 07:30:25 CEST 2020


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

This patch tries to remove ringlatency stats functionality.

Signed-off-by: Hideyuki Yamashita <yamashita.hideyuki at ntt-tx.co.jp>
Signed-off-by: Naoki Takada <ntakada14 at gmail.com>
---
 src/vf/classifier.c | 19 ++++---------------
 src/vf/forwarder.c  | 19 ++++---------------
 src/vf/spp_vf.c     | 27 ---------------------------
 3 files changed, 8 insertions(+), 57 deletions(-)

diff --git a/src/vf/classifier.c b/src/vf/classifier.c
index 2d95289..58d0f03 100644
--- a/src/vf/classifier.c
+++ b/src/vf/classifier.c
@@ -29,9 +29,6 @@
 #include "shared/secondary/spp_worker_th/vf_deps.h"
 #include "shared/secondary/spp_worker_th/port_capability.h"
 
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-#include "shared/secondary/spp_worker_th/latency_stats.h"
-#endif
 
 #define RTE_LOGTYPE_VF_CLS RTE_LOGTYPE_USER1
 
@@ -424,15 +421,11 @@ transmit_packets(struct cls_port_info *clsd_data)
 	uint16_t n_tx;
 
 	/* transmit packets */
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-	n_tx = sppwk_eth_vlan_ring_stats_tx_burst(clsd_data->ethdev_port_id,
-			clsd_data->iface_type, clsd_data->iface_no,
-			0, clsd_data->pkts, clsd_data->nof_pkts);
-#else
+
 	n_tx = sppwk_eth_vlan_tx_burst(clsd_data->ethdev_port_id,
 			clsd_data->queue_no, clsd_data->pkts,
 			clsd_data->nof_pkts);
-#endif
+
 
 	/* free cannot transmit packets */
 	if (unlikely(n_tx != clsd_data->nof_pkts)) {
@@ -758,14 +751,10 @@ classify_packets(int comp_id)
 		return SPPWK_RET_OK;
 
 	/* Retrieve packets */
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-	n_rx = sppwk_eth_vlan_ring_stats_rx_burst(clsd_data_rx->ethdev_port_id,
-			clsd_data_rx->iface_type, clsd_data_rx->iface_no,
-			0, rx_pkts, MAX_PKT_BURST);
-#else
+
 	n_rx = sppwk_eth_vlan_rx_burst(clsd_data_rx->ethdev_port_id,
 			clsd_data_rx->queue_no, rx_pkts, MAX_PKT_BURST);
-#endif
+
 	if (unlikely(n_rx == 0))
 		return SPPWK_RET_OK;
 
diff --git a/src/vf/forwarder.c b/src/vf/forwarder.c
index 66e1682..a95d472 100644
--- a/src/vf/forwarder.c
+++ b/src/vf/forwarder.c
@@ -9,9 +9,6 @@
 #include "shared/secondary/spp_worker_th/vf_deps.h"
 #include "shared/secondary/spp_worker_th/port_capability.h"
 
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-#include "shared/secondary/spp_worker_th/latency_stats.h"
-#endif
 
 #define RTE_LOGTYPE_FORWARD RTE_LOGTYPE_USER1
 
@@ -214,27 +211,19 @@ forward_packets(int id)
 		rx = &path->ports[cnt].rx;
 		tx = &path->ports[cnt].tx;
 
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-		nb_rx = sppwk_eth_vlan_ring_stats_rx_burst(rx->ethdev_port_id,
-				rx->iface_type, rx->iface_no, 0,
-				bufs, MAX_PKT_BURST);
-#else
+
 		nb_rx = sppwk_eth_vlan_rx_burst(rx->ethdev_port_id,
 				rx->queue_no, bufs, MAX_PKT_BURST);
-#endif
+
 		if (unlikely(nb_rx == 0))
 			continue;
 
 		/* Send packets */
 		if (tx->ethdev_port_id >= 0)
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-			nb_tx = sppwk_eth_vlan_ring_stats_tx_burst(
-					tx->ethdev_port_id, tx->iface_type,
-					tx->iface_no, 0, bufs, nb_rx);
-#else
+
 			nb_tx = sppwk_eth_vlan_tx_burst(tx->ethdev_port_id,
 					tx->queue_no, bufs, nb_rx);
-#endif
+
 
 		/* Discard remained packets to release mbuf */
 		if (unlikely(nb_tx < nb_rx)) {
diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c
index ab2e9f2..c2cc795 100644
--- a/src/vf/spp_vf.c
+++ b/src/vf/spp_vf.c
@@ -19,9 +19,6 @@
 
 #define RTE_LOGTYPE_SPP_VF RTE_LOGTYPE_USER1
 
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-#include "shared/secondary/spp_worker_th/latency_stats.h"
-#endif
 
 /* getopt_long return value for long option */
 enum SPP_LONGOPT_RETVAL {
@@ -280,24 +277,6 @@ main(int argc, char *argv[])
 		if (unlikely(ret != 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++;
-		}
-		ret = sppwk_init_ring_latency_stats(
-				SPP_RING_LATENCY_STATS_SAMPLING_INTERVAL,
-				nof_rings);
-		if (unlikely(ret != SPPWK_RET_OK))
-			break;
-#endif /* SPP_RINGLATENCYSTATS_ENABLE */
 
 		/* Start worker threads of classifier and forwarder */
 		RTE_LCORE_FOREACH_SLAVE(lcore_id) {
@@ -332,9 +311,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 != SPPWK_RET_OK)) {
@@ -358,9 +334,6 @@ main(int argc, char *argv[])
 	 */
 	del_vhost_sockfile(g_iface_info.vhost);
 
-#ifdef SPP_RINGLATENCYSTATS_ENABLE
-	sppwk_clean_ring_latency_stats();
-#endif /* SPP_RINGLATENCYSTATS_ENABLE */
 
 	RTE_LOG(INFO, SPP_VF, "Exit spp_vf.\n");
 	return ret;
-- 
2.17.1



More information about the spp mailing list