summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYasufumi Ogawa <yasufum.o@gmail.com>2019-09-12 19:48:19 +0900
committerYasufumi Ogawa <yasufum.o@gmail.com>2019-10-04 22:06:14 +0900
commit9c5079a21412253f8d581ebcfa2016f112424b36 (patch)
tree869175ea283f57a925429fb50da165a99f8629f8
parenta9f6ade5eaf67ba3105b7806967819184b075618 (diff)
downloadspp-9c5079a21412253f8d581ebcfa2016f112424b36.zip
spp-9c5079a21412253f8d581ebcfa2016f112424b36.tar.gz
spp-9c5079a21412253f8d581ebcfa2016f112424b36.tar.xz
shared: rename func for init latency stats
This update is to revise name of func spp_ringlatencystats_init() to sppwk_ring_latency_stats(), and also spp_ringlatencystats_uninit() to sppwk_clean_ring_latency_stats() to be more specific. Signed-off-by: Yasufumi Ogawa <yasufum.o@gmail.com>
-rw-r--r--src/mirror/spp_mirror.c4
-rw-r--r--src/shared/secondary/spp_worker_th/latency_stats.c4
-rw-r--r--src/shared/secondary/spp_worker_th/latency_stats.h13
-rw-r--r--src/vf/spp_vf.c4
4 files changed, 11 insertions, 14 deletions
diff --git a/src/mirror/spp_mirror.c b/src/mirror/spp_mirror.c
index f4427ad..4f0820d 100644
--- a/src/mirror/spp_mirror.c
+++ b/src/mirror/spp_mirror.c
@@ -580,7 +580,7 @@ main(int argc, char *argv[])
if (port_type == RING)
nof_rings++;
}
- int ret_ringlatency = spp_ringlatencystats_init(
+ int ret_ringlatency = sppwk_init_ring_latency_stats(
SPP_RING_LATENCY_STATS_SAMPLING_INTERVAL,
nof_rings);
if (unlikely(ret_ringlatency != SPPWK_RET_OK))
@@ -652,7 +652,7 @@ main(int argc, char *argv[])
del_vhost_sockfile(g_iface_info.vhost);
#ifdef SPP_RINGLATENCYSTATS_ENABLE
- spp_ringlatencystats_uninit();
+ sppwk_clean_ring_latency_stats();
#endif /* SPP_RINGLATENCYSTATS_ENABLE */
RTE_LOG(INFO, MIRROR, "Exit spp_mirror.\n");
diff --git a/src/shared/secondary/spp_worker_th/latency_stats.c b/src/shared/secondary/spp_worker_th/latency_stats.c
index 0a5e5a7..e1dde2c 100644
--- a/src/shared/secondary/spp_worker_th/latency_stats.c
+++ b/src/shared/secondary/spp_worker_th/latency_stats.c
@@ -49,7 +49,7 @@ cycles_per_ns(void)
}
int
-spp_ringlatencystats_init(uint64_t samp_intvl, uint16_t stats_count)
+sppwk_init_ring_latency_stats(uint64_t samp_intvl, uint16_t stats_count)
{
/* allocate memory for ring latency statistics information */
g_stats_info = rte_zmalloc(
@@ -76,7 +76,7 @@ spp_ringlatencystats_init(uint64_t samp_intvl, uint16_t stats_count)
}
void
-spp_ringlatencystats_uninit(void)
+sppwk_clean_ring_latency_stats(void)
{
/* free memory for ring latency statistics information */
if (likely(g_stats_info != NULL)) {
diff --git a/src/shared/secondary/spp_worker_th/latency_stats.h b/src/shared/secondary/spp_worker_th/latency_stats.h
index de9ee5d..8016233 100644
--- a/src/shared/secondary/spp_worker_th/latency_stats.h
+++ b/src/shared/secondary/spp_worker_th/latency_stats.h
@@ -43,12 +43,9 @@ struct ring_latency_stats_t {
* @retval SPPWK_RET_OK: succeeded.
* @retval SPPWK_RET_NG: failed.
*/
-int spp_ringlatencystats_init(uint64_t samp_intvl, uint16_t stats_count);
+int sppwk_init_ring_latency_stats(uint64_t samp_intvl, uint16_t stats_count);
-/**
- *uninitialize ring latency statistics.
- */
-void spp_ringlatencystats_uninit(void);
+void sppwk_clean_ring_latency_stats(void);
/**
* add time-stamp to mbuf's member.
@@ -81,7 +78,7 @@ void sppwk_calc_ring_latency(int ring_id,
/**
* get number of ring latency statistics.
*
- * @return spp_ringlatencystats_init's parameter "stats_count"
+ * @return sppwk_init_ring_latency_stats's parameter "stats_count"
*/
int spp_ringlatencystats_get_count(void);
@@ -157,8 +154,8 @@ uint16_t sppwk_eth_vlan_ring_stats_tx_burst(uint16_t port_id,
#else
-#define spp_ringlatencystats_init(arg1, arg2) 0
-#define spp_ringlatencystats_uninit()
+#define sppwk_init_ring_latency_stats(arg1, arg2) 0
+#define sppwk_clean_ring_latency_stats()
#define spp_ringlatencystats_add_time_stamp(arg1, arg2, arg3)
#define sppwk_calc_ring_latency(arg1, arg2, arg3)
#define spp_ringlatencystats_get_count() 0
diff --git a/src/vf/spp_vf.c b/src/vf/spp_vf.c
index 8bb759f..012e529 100644
--- a/src/vf/spp_vf.c
+++ b/src/vf/spp_vf.c
@@ -292,7 +292,7 @@ main(int argc, char *argv[])
if (port_type == RING)
nof_rings++;
}
- ret = spp_ringlatencystats_init(
+ ret = sppwk_init_ring_latency_stats(
SPP_RING_LATENCY_STATS_SAMPLING_INTERVAL,
nof_rings);
if (unlikely(ret != SPPWK_RET_OK))
@@ -359,7 +359,7 @@ main(int argc, char *argv[])
del_vhost_sockfile(g_iface_info.vhost);
#ifdef SPP_RINGLATENCYSTATS_ENABLE
- spp_ringlatencystats_uninit();
+ sppwk_clean_ring_latency_stats();
#endif /* SPP_RINGLATENCYSTATS_ENABLE */
RTE_LOG(INFO, SPP_VF, "Exit spp_vf.\n");