From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 05E53A2EEB for ; Thu, 12 Sep 2019 12:48:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F41412C19; Thu, 12 Sep 2019 12:48:37 +0200 (CEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by dpdk.org (Postfix) with ESMTP id D52682C19 for ; Thu, 12 Sep 2019 12:48:36 +0200 (CEST) Received: by mail-pf1-f170.google.com with SMTP id w22so15752637pfi.9 for ; Thu, 12 Sep 2019 03:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=AUIBoIGXgC6o9thMLseCxSSTykVsNIAuUZJaOiDQ8e8=; b=I5T2YcUre+TmNhMMnXb5yhSpKpz32hKrijyXICiKQX+3GiQ5+kBdDJLuliKWPzTk1e j/vwlEl0FaoAHjFUV+UoBjqsId169UsbxGuVCJUMcGVIQjne463+raYUWUp7t2yyxxf9 upy11Zw+pycDA3aG08LKhUvOGkTZkIUtaI8+MOxl6TVH49B2rtqz1BEDzPkuO9kxi3kI YtNt9NZZg49I+vqHOiaQzCwklUVIQoeeGM1duO9YTOJIMZnRQehPYJRg5xflfVArje8w H2sNd0bPWLuvhrpD4OFpsGQKhUJS98xcxgkRFeKvbnbSwBiv0zNh1YjRdg68hiMEbmIw hMhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=AUIBoIGXgC6o9thMLseCxSSTykVsNIAuUZJaOiDQ8e8=; b=SkaoOMWYILjWiX4X2NxT/QlZavFaeDFmcmOvApsHEOJ3JJ+UOVis+v8hqTophkaknO ncjjUJSzaQTVGVGAcPI0QF/kB28HvZCZXrUcTZk49Gve1unntSctcBzCD2tCWj+k2uVl HRDWe64f+v8TWbcRh6HNXaDpnHi09ihp8CF85vof4ytkCBANzZ6ijh3OqYjPeZwRW4nL RaAg8BN8Fw9XtM+dDiBl8bUcD381iiBN7R6WiNjF1lXbV/8K8EiCsVL664YhFazriNDm 11L62+0W5Fp+K7Ggi6r6Uc/sSuWkO/Vo1AxO7Rio5dyjiK8O27goJDYeJFxBfDMxKXCT L2uw== X-Gm-Message-State: APjAAAVAKEimiDMRQhHautOyIU0J2ET3mCMwBqT//UJrpRDmJdjZCL6z OtXjy63+LS2coO7JaKq+y35kexFy X-Google-Smtp-Source: APXvYqy8PReGw7KUJIKLDTbi18gBorubwzwvTJk/awN+qsqkKKZIko4nYM98/4sINrQ893JlWNwAog== X-Received: by 2002:a65:6802:: with SMTP id l2mr6232647pgt.33.1568285315251; Thu, 12 Sep 2019 03:48:35 -0700 (PDT) Received: from localhost.localdomain ([192.47.164.146]) by smtp.gmail.com with ESMTPSA id t3sm26034930pfe.7.2019.09.12.03.48.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Sep 2019 03:48:34 -0700 (PDT) From: yasufum.o@gmail.com To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Thu, 12 Sep 2019 19:48:19 +0900 Message-Id: <20190912104824.21519-5-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912104824.21519-1-yasufum.o@gmail.com> References: <20190912104824.21519-1-yasufum.o@gmail.com> Subject: [spp] [PATCH 4/9] shared: rename func for init latency stats X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spp-bounces@dpdk.org Sender: "spp" From: Yasufumi Ogawa 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 --- src/mirror/spp_mirror.c | 4 ++-- src/shared/secondary/spp_worker_th/latency_stats.c | 4 ++-- src/shared/secondary/spp_worker_th/latency_stats.h | 13 +++++-------- src/vf/spp_vf.c | 4 ++-- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/mirror/spp_mirror.c b/src/mirror/spp_mirror.c index 40fbc6f..a6bad3a 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)) @@ -650,7 +650,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 f843332..bf4cdbe 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)) @@ -357,7 +357,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"); -- 2.17.1