examples/l3fwd-power: add telemetry mode support
PATCH 1/1 examples/l3fwd-power: add telemetry mode support
Add new telemetry mode support for l3fwd-power. This is a standalone mode, in this mode l3fwd-power does simple l3fwding along with calculating empty polls, full polls, and busy percentage for each forwarding core. The aggregation of these values of all cores is reported as application level telemetry to metric library for every 10ms from the master core.
The busy percentage is calculated by recording the poll_count and when the count reaches a defined value the total cycles it took is measured and compared with minimum and maximum reference cycles and busy rate is set according to either 0% or 50% or 100%.
--- doc/guides/rel_notes/release_19_08.rst | 5 + .../sample_app_ug/l3_forward_power_man.rst | 21 ++ examples/l3fwd-power/main.c | 307 ++++++++++++++++-- 3 files changed, 314 insertions(+), 19 deletions(-)
doc/guides/rel_notes/release_19_08.rst +5 -0
@@ -54,6 +54,11 @@ New Features Also, make sure to start the actual text at the margin. ========================================================= +* **Added new telemetry mode for l3fwd-power application.** + + Added telemetry mode to l3fwd-power application to report + application level busyness, empty and full polls of rte_eth_rx_burst(). + Removed Items -------------
doc/guides/sample_app_ug/l3_forward_power_man.rst +21 -0
@@ -107,6 +107,8 @@ where, * --empty-poll: Traffic Aware power management. See below for details +* --telemetry: Telemetry mode. + See :doc:`l3_forward` for details. The L3fwd-power example reuses the L3fwd command line options.
@@ -431,3 +433,22 @@ then be started without the training mode so traffic can start immediately. .. code-block:: console ./examples/l3fwd-power/build/l3fwd-power -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --empty-poll "0,340000,540000" –P + +Telemetry Mode +-------------- + +The telemetry mode support for ``l3fwd-power`` is a standalone mode, in this mode +``l3fwd-power`` does simple l3fwding along with calculating empty polls, full polls, +and busy percentage for each forwarding core. The aggregation of these +values of all cores is reported as application level telemetry to metric +library for every 10ms from the master core. + +The busy percentage is calculated by recording the poll_count +and when the count reaches a defined value the total +cycles it took is measured and compared with minimum and maximum +reference cycles and accordingly busy rate is set to either 0% or +50% or 100%. + +.. code-block:: console + + ./examples/l3fwd-power/build/l3fwd-power -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --telemetry
examples/l3fwd-power/main.c +288 -19
448 lines not on this page · raw message
Signature · 1 line
2.21.0
Quoted 17 lines · Reshma Pattan
Add new telemetry mode support for l3fwd-power. This is a standalone mode, in this mode l3fwd-power does simple l3fwding along with calculating empty polls, full polls, and busy percentage for each forwarding core. The aggregation of these values of all cores is reported as application level telemetry to metric library for every 10ms from the master core.
The busy percentage is calculated by recording the
poll_countand when the count reaches a defined value the total cycles it took is measured and compared with minimum and maximum reference cycles and busy rate is set according to either 0% or 50% or 100%.Signed-off-by Reshma Pattan <[email protected]>---
<snip>
examples/l3fwd-power/main.c static int event_register(struct lcore_conf *qconf) · line 1045
Quoted 10 lines
examples/l3fwd-power/main.c +10
-0+ poll_count =0 ; + prev_tel_tsc = cur_tsc; +/* update stats for telemetry */ +rte_spinlock_lock (&stats[lcore_id].telemetry_lock); + stats[lcore_id].ep_nep[0 ] = ep_nep[0 ]; + stats[lcore_id].ep_nep[1 ] = ep_nep[1 ]; + stats[lcore_id].fp_nfp[0 ] = fp_nfp[0 ]; + stats[lcore_id].fp_nfp[1 ] = fp_nfp[1 ]; + stats[lcore_id].br = br; +rte_spinlock_unlock (&stats[lcore_id].telemetry_lock);
Locking here seems relatively rare (per-lcore and once every N polls), but any locking on a hotpath makes me nervous. What is the current performance impact of this? Should we bother improving?
Quoted 11 lines
examples/l3fwd-power/main.c +7
-0+ } + } + +return 0 ; +} +/* main processing loop */ +static int main_empty_poll_loop (__attribute__((unused))void *dummy) {struct rte_mbuf *pkts_burst[MAX_PKT_BURST ];
examples/l3fwd-power/main.c print_usage(const char *prgname) · line 1459
Quoted 6 lines
examples/l3fwd-power/main.c +2
-1@@ -1274,7 +1455,9 @@ print_usage(const char *prgname)" which max packet len is PKTLEN in decimal (64-9600)\n" " --parse-ptype: parse packet type by software\n" " --empty-poll: enable empty poll detection" - " follow (training_flag, high_threshold, med_threshold)\n", +" follow (training_flag, high_threshold, med_threshold)\n" +" --telemetry: enable telemetry mode, to upadte"
Update :)
examples/l3fwd-power/main.c print_usage(const char *prgname) · line 1460
Quoted 1 line
examples/l3fwd-power/main.c +1
-0+ " empty polls, full polls, and core busyness to telemetry\n",
I don't particularly like the term "busyness". Load? Workload? I'm OK with keeping as is though, just a personal preference :)
Quoted 8 lines
examples/l3fwd-power/main.c +1
-0prgname); }@@ -1417,6 +1600,7 @@ parse_ep_config(const char *q_arg) }#define CMD_LINE_OPT_PARSE_PTYPE "parse-ptype" +#define CMD_LINE_OPT_TELEMETRY "telemetry"
<snip>
examples/l3fwd-power/main.c init_power_library(void) · line 2073
Quoted 9 lines
if (!strncmp(lgopts[option_index].name,
examples/l3fwd-power/main.c +3
-0@@ -1869,6 +2068,52 @@ init_power_library(void)return ret; }static void +update_telemetry (__attribute__((unused))struct rte_timer *tim, + __attribute__((unused))void *arg) +{
I would question the need to put telemetry on a high precision 10ms timer. Is there any reason why we cannot gather telemetry, say, once every 100ms, and why we cannot do so from interrupt thread using alarm API? Using high-precision timer API here seems like an overkill.
examples/l3fwd-power/main.c init_power_library(void) · line 2083
Quoted 10 lines
examples/l3fwd-power/main.c +10
-0+unsigned int lcore_id =rte_lcore_id (); +struct lcore_conf *qconf; +uint64_t app_eps =0 , app_fps =0 , app_br =0 ; +uint64_t values[3 ] = {0 }; +int ret; +uint64_t count =0 ; + +RTE_LCORE_FOREACH_SLAVE (lcore_id) { + qconf = &lcore_conf[lcore_id]; +if (qconf->n_rx_queue !=0 ) {
Perhaps just to an early exit? It will avoid having extra indentation level :)
e.g.
if (qconf->n_rx_queue == 0)
continue;
<rest of the code>
Quoted 7 lines
examples/l3fwd-power/main.c +7
-0+ count++; +rte_spinlock_lock (&stats[lcore_id].telemetry_lock); + app_eps += stats[lcore_id].ep_nep[1 ]; + app_fps += stats[lcore_id].fp_nfp[1 ]; + app_br += stats[lcore_id].br; +rte_spinlock_unlock (&stats[lcore_id].telemetry_lock); + }
<snip>
examples/l3fwd-power/main.c main(int argc, char **argv) · line 2463
Quoted 13 lines
/* launch per-lcore init on every lcore */
examples/l3fwd-power/main.c +6
-2-if (empty_poll_on == false) { +if (app_mode ==APP_MODE_LEGACY ) {rte_eal_mp_remote_launch (main_loop,NULL ,CALL_MASTER ); - }else { + }else if (app_mode ==APP_MODE_EMPTY_POLL ) { empty_poll_stop = false;rte_eal_mp_remote_launch (main_empty_poll_loop,NULL ,SKIP_MASTER ); + }else { +/* Init metrics library */ +rte_metrics_init (rte_socket_id ()); +/** Register latency stats with stats library */
Latency? Probably a copy-paste error?
Signature · 2 lines
Thanks, Anatoly
Quoted 9 lines
-----Original Message-----
From: Burakov, Anatoly
Sent: Monday, May 20, 2019 2:17 PM
To: Pattan, Reshma <[email protected]>; [email protected]
Cc: Hunt, David <[email protected]>; Ma, Liang J <[email protected]>
Subject: Re: [PATCH v1] examples/l3fwd-power: add telemetry mode support
<snip>
Quoted 4 lines
Quoted 1 line
---
<snip>
Quoted 14 lines
examples/l3fwd-power/main.c static int event_register(struct lcore_conf *qconf) · line 1045
Quoted 10 lines
examples/l3fwd-power/main.c +10
-0+ poll_count =0 ; + prev_tel_tsc = cur_tsc; +/* update stats for telemetry */ +rte_spinlock_lock (&stats[lcore_id].telemetry_lock); + stats[lcore_id].ep_nep[0 ] = ep_nep[0 ]; + stats[lcore_id].ep_nep[1 ] = ep_nep[1 ]; + stats[lcore_id].fp_nfp[0 ] = fp_nfp[0 ]; + stats[lcore_id].fp_nfp[1 ] = fp_nfp[1 ]; + stats[lcore_id].br = br; +rte_spinlock_unlock (&stats[lcore_id].telemetry_lock);Locking here seems relatively rare (per-lcore and once every N polls), but any locking on a hotpath makes me nervous. What is the current performance impact of this? Should we bother improving?
The performance impact is negligible, in thousands.
Quoted 14 lines
examples/l3fwd-power/main.c init_power_library(void) · line 2073
Quoted 9 lines
if (!strncmp(lgopts[option_index].name,
examples/l3fwd-power/main.c +3
-0@@ -1869,6 +2068,52 @@ init_power_library(void)return ret; }static void +update_telemetry (__attribute__((unused))struct rte_timer *tim, + __attribute__((unused))void *arg) +{I would question the need to put telemetry on a high precision 10ms timer. Is there any reason why we cannot gather telemetry, say, once every 100ms, and why we cannot do so from interrupt thread using alarm API? Using high- precision timer API here seems like an overkill.
The l3-power uses the timers , so followed the same. But I am ok to use ALARM api.
Thanks,
Reshma
Quoted 31 lines · Reshma
Quoted 9 lines
-----Original Message-----
From: Burakov, Anatoly
Sent: Monday, May 20, 2019 2:17 PM
To: Pattan, Reshma <[email protected]>; [email protected]
Cc: Hunt, David <[email protected]>; Ma, Liang J <[email protected]>
Subject: Re: [PATCH v1] examples/l3fwd-power: add telemetry mode support<snip>
Quoted 4 lines
Quoted 1 line
---
<snip>
Quoted 14 lines
examples/l3fwd-power/main.c static int event_register(struct lcore_conf *qconf) · line 1045
Quoted 10 lines
examples/l3fwd-power/main.c +10
-0+ poll_count =0 ; + prev_tel_tsc = cur_tsc; +/* update stats for telemetry */ +rte_spinlock_lock (&stats[lcore_id].telemetry_lock); + stats[lcore_id].ep_nep[0 ] = ep_nep[0 ]; + stats[lcore_id].ep_nep[1 ] = ep_nep[1 ]; + stats[lcore_id].fp_nfp[0 ] = fp_nfp[0 ]; + stats[lcore_id].fp_nfp[1 ] = fp_nfp[1 ]; + stats[lcore_id].br = br; +rte_spinlock_unlock (&stats[lcore_id].telemetry_lock);Locking here seems relatively rare (per-lcore and once every N polls), but any locking on a hotpath makes me nervous. What is the current performance impact of this? Should we bother improving?
Quoted 1 line
The performance impact is negligible, in thousands.
In thousands of packets? Out of?
Quoted 16 lines
Quoted 15 lines
examples/l3fwd-power/main.c init_power_library(void) · line 2073
Quoted 10 lines
if (!strncmp(lgopts[option_index].name,
examples/l3fwd-power/main.c +3
-0@@ -1869,6 +2068,52 @@ init_power_library(void)return ret; }static void +update_telemetry (__attribute__((unused))struct rte_timer *tim, + __attribute__((unused))void *arg) +{I would question the need to put telemetry on a high precision 10ms timer. Is there any reason why we cannot gather telemetry, say, once every 100ms, and why we cannot do so from interrupt thread using alarm API? Using high- precision timer API here seems like an overkill.
Quoted 2 lines
The l3-power uses the timers , so followed the same. But I am ok to use ALARM api.
Maybe just change the timer period then? 10ms to update telemetry looks way too often to me. Do we really expect telemetry to be gathered every 10ms?
Quoted 4 lines
Thanks,
Reshma
Signature · 2 lines
Thanks, Anatoly
Quoted 26 lines
-----Original Message-----
From: Burakov, Anatoly
Sent: Wednesday, May 22, 2019 10:46 AM
To: Pattan, Reshma <[email protected]>; [email protected]
Cc: Hunt, David <[email protected]>; Ma, Liang J <[email protected]>
Subject: Re: [PATCH v1] examples/l3fwd-power: add telemetry mode supportQuoted 16 lines · Reshma
Quoted 15 lines
examples/l3fwd-power/main.c static int event_register(struct lcore_conf *qconf) · line 1045
Quoted 11 lines
examples/l3fwd-power/main.c +10
-0+ poll_count =0 ; + prev_tel_tsc = cur_tsc; +/* update stats for telemetry */ +rte_spinlock_lock (&stats[lcore_id].telemetry_lock); + stats[lcore_id].ep_nep[0 ] = ep_nep[0 ]; + stats[lcore_id].ep_nep[1 ] = ep_nep[1 ]; + stats[lcore_id].fp_nfp[0 ] = fp_nfp[0 ]; + stats[lcore_id].fp_nfp[1 ] = fp_nfp[1 ]; + stats[lcore_id].br = br; +rte_spinlock_unlock (&stats[lcore_id].telemetry_lock);Locking here seems relatively rare (per-lcore and once every N polls), but any locking on a hotpath makes me nervous. What is the current performance impact of this? Should we bother improving?
Quoted 3 lines
Quoted 1 line
The performance impact is negligible, in thousands.
In thousands of packets? Out of?
@ input rate ~120mpps, with 1 core , 2 ports, 2 queues per port. I have tested below 2 cases
1)l3fwd-power telemetry mode w/o stats and locks, 2)l3fwd-power telemetry with stats and locks
The case 2 has 0.32% of packet loss compared to case1.
Quoted 16 lines
Quoted 16 lines
Quoted 15 lines
examples/l3fwd-power/main.c init_power_library(void) · line 2072
Quoted 10 lines
if (!strncmp(lgopts[option_index].name,
examples/l3fwd-power/main.c +2
-0@@ -1869,6 +2068,52 @@ init_power_library(void)return ret; }static void +update_telemetry (__attribute__((unused))struct rte_timer *tim, + __attribute__((unused))void *arg) {I would question the need to put telemetry on a high precision 10ms timer. Is there any reason why we cannot gather telemetry, say, once every 100ms, and why we cannot do so from interrupt thread using alarm API? Using high- precision timer API here seems like an overkill.
Quoted 6 lines
Quoted 2 lines
The l3-power uses the timers , so followed the same. But I am ok to use ALARM api.
Maybe just change the timer period then? 10ms to update telemetry looks way too often to me. Do we really expect telemetry to be gathered every 10ms?
Will increase the timer value to 500ms.
Thanks,
Reshma
Quoted 9 lines · On Fri, 17 May 2019 19:17:12 +0100 Reshma Pattan <[email protected]>…
Add new telemetry mode support for l3fwd-power. This is a standalone mode, in this mode l3fwd-power does simple l3fwding along with calculating empty polls, full polls, and busy percentage for each forwarding core. The aggregation of these values of all cores is reported as application level telemetry to metric library for every 10ms from the master core.
Quoted 7 lines
The busy percentage is calculated by recording the
poll_countand when the count reaches a defined value the total cycles it took is measured and compared with minimum and maximum reference cycles and busy rate is set according to either 0% or 50% or 100%.Signed-off-by Reshma Pattan <[email protected]>
I think this adding more complexity to an example, which makes it harder not easier for users. The existing l3fwd-power has grown too large already and needs some architecture refactoring anyway.
PATCH v2 1/1 examples/l3fwd-power: add telemetry mode support
In reply to Reshma PattanAdd new telemetry mode support for l3fwd-power. This is a standalone mode, in this mode l3fwd-power does simple l3fwding along with calculating empty polls, full polls, and busy percentage for each forwarding core. The aggregation of these values of all cores is reported as application level telemetry to metric library for every 10ms from the master core.
The busy percentage is calculated by recording the poll_count and when the count reaches a defined value the total cycles it took is measured and compared with minimum and maximum reference cycles and busy rate is set according to either 0% or 50% or 100%.
---
v2: Increased telemetry timer value.
Corrected typos.
Fixed if condition to avoid extra indentation.
Added metrics dependency to meson build file.
---
--- doc/guides/rel_notes/release_19_08.rst | 5 + .../sample_app_ug/l3_forward_power_man.rst | 21 ++ examples/l3fwd-power/main.c | 310 ++++++++++++++++-- examples/l3fwd-power/meson.build | 2 +- 4 files changed, 318 insertions(+), 20 deletions(-)
doc/guides/rel_notes/release_19_08.rst +5 -0
@@ -54,6 +54,11 @@ New Features Also, make sure to start the actual text at the margin. ========================================================= +* **Added new telemetry mode for l3fwd-power application.** + + Added telemetry mode to l3fwd-power application to report + application level busyness, empty and full polls of rte_eth_rx_burst(). + Removed Items -------------
doc/guides/sample_app_ug/l3_forward_power_man.rst +21 -0
@@ -107,6 +107,8 @@ where, * --empty-poll: Traffic Aware power management. See below for details +* --telemetry: Telemetry mode. + See :doc:`l3_forward` for details. The L3fwd-power example reuses the L3fwd command line options.
@@ -431,3 +433,22 @@ then be started without the training mode so traffic can start immediately. .. code-block:: console ./examples/l3fwd-power/build/l3fwd-power -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --empty-poll "0,340000,540000" –P + +Telemetry Mode +-------------- + +The telemetry mode support for ``l3fwd-power`` is a standalone mode, in this mode +``l3fwd-power`` does simple l3fwding along with calculating empty polls, full polls, +and busy percentage for each forwarding core. The aggregation of these +values of all cores is reported as application level telemetry to metric +library for every 10ms from the master core. + +The busy percentage is calculated by recording the poll_count +and when the count reaches a defined value the total +cycles it took is measured and compared with minimum and maximum +reference cycles and accordingly busy rate is set to either 0% or +50% or 100%. + +.. code-block:: console + + ./examples/l3fwd-power/build/l3fwd-power -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --telemetry
examples/l3fwd-power/main.c +291 -19
451 lines not on this page · raw message
examples/l3fwd-power/meson.build +1 -1
@@ -10,7 +10,7 @@ if not is_linux build = false endif allow_experimental_apis = true -deps += ['power', 'timer', 'lpm', 'hash'] +deps += ['power', 'timer', 'lpm', 'hash', 'metrics'] sources = files( 'main.c', 'perf_core.c' )
Signature · 1 line
2.21.0
Quoted 9 lines · Reshma Pattan
Add new telemetry mode support for l3fwd-power. This is a standalone mode, in this mode l3fwd-power does simple l3fwding along with calculating empty polls, full polls, and busy percentage for each forwarding core. The aggregation of these values of all cores is reported as application level telemetry to metric library for every 10ms from the master core.
Quoted 8 lines
The busy percentage is calculated by recording the
poll_countand when the count reaches a defined value the total cycles it took is measured and compared with minimum and maximum reference cycles and busy rate is set according to either 0% or 50% or 100%.Signed-off-by Reshma Pattan <[email protected]>---
LGTM
Signature · 2 lines
Thanks, Anatoly
PATCH v3 1/1 examples/l3fwd-power: add telemetry mode support
In reply to Reshma PattanAdd new telemetry mode support for l3fwd-power. This is a standalone mode, in this mode l3fwd-power does simple l3fwding along with calculating
empty polls, full polls, and busy percentage for each forwarding core. The aggregation of these values of all cores is reported as application level telemetry to metric library for every 500ms from the master core.
The busy percentage is calculated by recording the poll_count and when the count reaches a defined value the total cycles it took is measured and compared with minimum and maximum reference cycles and busy rate is set according to either 0% or 50% or 100%.
---
v3: Update commit message.
Update guide l3_forward_power_man.rst.
Update code to not allow master core in --conf(port,queue,lcore) option for telemetry mode.
v2:Increased telemetry timer value.
Corrected typos.
Fixed if condition to avoid extra indentation.
Added metrics dependency to meson build file.
--- doc/guides/rel_notes/release_19_08.rst | 5 + .../sample_app_ug/l3_forward_power_man.rst | 28 ++ examples/l3fwd-power/main.c | 315 ++++++++++++++++-- examples/l3fwd-power/meson.build | 2 +- 4 files changed, 330 insertions(+), 20 deletions(-)
doc/guides/rel_notes/release_19_08.rst +5 -0
@@ -54,6 +54,11 @@ New Features Also, make sure to start the actual text at the margin. ========================================================= +* **Added new telemetry mode for l3fwd-power application.** + + Added telemetry mode to l3fwd-power application to report + application level busyness, empty and full polls of rte_eth_rx_burst(). + Removed Items -------------
doc/guides/sample_app_ug/l3_forward_power_man.rst +28 -0
@@ -107,6 +107,8 @@ where, * --empty-poll: Traffic Aware power management. See below for details +* --telemetry: Telemetry mode. + See :doc:`l3_forward` for details. The L3fwd-power example reuses the L3fwd command line options.
@@ -431,3 +433,29 @@ then be started without the training mode so traffic can start immediately. .. code-block:: console ./examples/l3fwd-power/build/l3fwd-power -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --empty-poll "0,340000,540000" –P + +Telemetry Mode +-------------- + +The telemetry mode support for ``l3fwd-power`` is a standalone mode, in this mode +``l3fwd-power`` does simple l3fwding along with calculating empty polls, full polls, +and busy percentage for each forwarding core. The aggregation of these +values of all cores is reported as application level telemetry to metric +library for every 500ms from the master core. + +The busy percentage is calculated by recording the poll_count +and when the count reaches a defined value the total +cycles it took is measured and compared with minimum and maximum +reference cycles and accordingly busy rate is set to either 0% or +50% or 100%. + + .. Note:: + + * The CONFIG_RTE_LIBRTE_TELEMETRY should be set in order to get the stats in DPDK telemetry. + +.. code-block:: console + + ./examples/l3fwd-power/build/l3fwd-power --telemetry -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --telemetry + +The new stats ``empty_poll`` , ``full_poll`` and ``busy_percent`` can be viewed by running the script +``/usertools/dpdk-telemetry-client.py`` and selecting the menu option ``Send for global Metrics``.
examples/l3fwd-power/main.c +296 -19
462 lines not on this page · raw message
examples/l3fwd-power/meson.build +1 -1
@@ -10,7 +10,7 @@ if not is_linux build = false endif allow_experimental_apis = true -deps += ['power', 'timer', 'lpm', 'hash'] +deps += ['power', 'timer', 'lpm', 'hash', 'metrics'] sources = files( 'main.c', 'perf_core.c' )
Signature · 1 line
2.21.0
13/06/2019 15:44, Reshma Pattan:
Quoted 22 lines
Add new telemetry mode support for l3fwd-power. This is a standalone mode, in this mode l3fwd-power does simple l3fwding along with calculating
empty polls, full polls, and busy percentage for each forwarding core. The aggregation of these values of all cores is reported as application level telemetry to metric library for every 500ms from the master core.The busy percentage is calculated by recording the
poll_countand when the count reaches a defined value the total cycles it took is measured and compared with minimum and maximum reference cycles and busy rate is set according to either 0% or 50% or 100%.Signed-off-by Reshma Pattan <[email protected]>Acked-by Anatoly Burakov <[email protected]>---
v3: Update commit message.
Update guidel3_forward_power_man.rst.
Update code to not allow master core in --conf(port,queue,lcore) option for telemetry mode.
Quoted 5 lines
v2:Increased telemetry timer value.
Corrected typos.
Fixed if condition to avoid extra indentation.
Added metrics dependency to meson build file.
---
Shared library linking is failing:
undefined reference to symbol 'round@@GLIBC_2.2.5'
Quoted 10 lines
-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday, June 24, 2019 4:17 PMShared library linking is failing:
undefined reference to symbol 'round@@GLIBC_2.2.5'
v4 sent.
PATCH v4 1/1 examples/l3fwd-power: add telemetry mode support
In reply to Reshma PattanAdd new telemetry mode support for l3fwd-power. This is a standalone mode, in this mode l3fwd-power does simple l3fwding along with calculating
empty polls, full polls, and busy percentage for each forwarding core. The aggregation of these values of all cores is reported as application level telemetry to metric library for every 500ms from the master core.
The busy percentage is calculated by recording the poll_count and when the count reaches a defined value the total cycles it took is measured and compared with minimum and maximum reference cycles and busy rate is set according to either 0% or 50% or 100%.
---
v4: Add -lm dependency to fix shared library linking issue. rebased release notes.
v3: Update commit message.
Update guide l3_forward_power_man.rst.
Update code to not allow master core in --conf(port,queue,lcore) option for telemetry mode.
v2:Increased telemetry timer value.
Corrected typos.
Fixed if condition to avoid extra indentation.
Added metrics dependency to meson build file.
--- doc/guides/rel_notes/release_19_08.rst | 4 + .../sample_app_ug/l3_forward_power_man.rst | 28 ++ examples/l3fwd-power/Makefile | 1 + examples/l3fwd-power/main.c | 315 ++++++++++++++++-- examples/l3fwd-power/meson.build | 2 +- 5 files changed, 330 insertions(+), 20 deletions(-)
doc/guides/rel_notes/release_19_08.rst +4 -0
@@ -99,6 +99,10 @@ New Features Updated ``librte_telemetry`` to fetch the global metrics from the ``librte_metrics`` library. +* **Added new telemetry mode for l3fwd-power application.** + + Added telemetry mode to l3fwd-power application to report + application level busyness, empty and full polls of rte_eth_rx_burst(). Removed Items -------------
doc/guides/sample_app_ug/l3_forward_power_man.rst +28 -0
@@ -107,6 +107,8 @@ where, * --empty-poll: Traffic Aware power management. See below for details +* --telemetry: Telemetry mode. + See :doc:`l3_forward` for details. The L3fwd-power example reuses the L3fwd command line options.
@@ -431,3 +433,29 @@ then be started without the training mode so traffic can start immediately. .. code-block:: console ./examples/l3fwd-power/build/l3fwd-power -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --empty-poll "0,340000,540000" –P + +Telemetry Mode +-------------- + +The telemetry mode support for ``l3fwd-power`` is a standalone mode, in this mode +``l3fwd-power`` does simple l3fwding along with calculating empty polls, full polls, +and busy percentage for each forwarding core. The aggregation of these +values of all cores is reported as application level telemetry to metric +library for every 500ms from the master core. + +The busy percentage is calculated by recording the poll_count +and when the count reaches a defined value the total +cycles it took is measured and compared with minimum and maximum +reference cycles and accordingly busy rate is set to either 0% or +50% or 100%. + + .. Note:: + + * The CONFIG_RTE_LIBRTE_TELEMETRY should be set in order to get the stats in DPDK telemetry. + +.. code-block:: console + + ./examples/l3fwd-power/build/l3fwd-power --telemetry -l 1-3 -- -p 0x0f --config="(0,0,2),(0,1,3)" --telemetry + +The new stats ``empty_poll`` , ``full_poll`` and ``busy_percent`` can be viewed by running the script +``/usertools/dpdk-telemetry-client.py`` and selecting the menu option ``Send for global Metrics``.
examples/l3fwd-power/Makefile +1 -0
@@ -59,6 +59,7 @@ else CFLAGS += -DALLOW_EXPERIMENTAL_API CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) +LDLIBS += -lm # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
examples/l3fwd-power/main.c +296 -19
462 lines not on this page · raw message
examples/l3fwd-power/meson.build +1 -1
@@ -10,7 +10,7 @@ if not is_linux build = false endif allow_experimental_apis = true -deps += ['power', 'timer', 'lpm', 'hash'] +deps += ['power', 'timer', 'lpm', 'hash', 'metrics'] sources = files( 'main.c', 'perf_core.c' )
Signature · 1 line
2.21.0
Thomas Monjalon
Applied24/06/2019 18:45, Reshma Pattan:
Quoted 9 lines
Add new telemetry mode support for l3fwd-power. This is a standalone mode, in this mode l3fwd-power does simple l3fwding along with calculating
empty polls, full polls, and busy percentage for each forwarding core. The aggregation of these values of all cores is reported as application level telemetry to metric library for every 500ms from the master core.
Quoted 8 lines
The busy percentage is calculated by recording the
poll_countand when the count reaches a defined value the total cycles it took is measured and compared with minimum and maximum reference cycles and busy rate is set according to either 0% or 50% or 100%.Signed-off-by Reshma Pattan <[email protected]>Acked-by Anatoly Burakov <[email protected]>
Applied, thanks and enjoy your holidays :)