From: Bruce Richardson Date: Thu, 14 Oct 2021 10:49:04 +0000 (+0100) Subject: eal: limit telemetry to primary processes X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=e89463a36604c9fded482b0c1b066e90ef69d50f;p=dpdk.git eal: limit telemetry to primary processes Telemetry interface should be exposed for primary processes only, since secondary processes will conflict on socket creation, and since all data in secondary process is generally available to primary. For example, all device stats for ethdevs, cryptodevs, etc. will all be common across processes. Signed-off-by: Bruce Richardson Acked-by: Ciara Power Tested-by: Conor Walsh --- diff --git a/lib/eal/freebsd/eal.c b/lib/eal/freebsd/eal.c index fb734012a4..56a60f13e9 100644 --- a/lib/eal/freebsd/eal.c +++ b/lib/eal/freebsd/eal.c @@ -950,7 +950,7 @@ rte_eal_init(int argc, char **argv) rte_eal_init_alert("Cannot clear runtime directory"); return -1; } - if (!internal_conf->no_telemetry) { + if (rte_eal_process_type() == RTE_PROC_PRIMARY && !internal_conf->no_telemetry) { int tlog = rte_log_register_type_and_pick_level( "lib.telemetry", RTE_LOG_WARNING); if (tlog < 0) diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index 3577eaeaa4..0d0fc66668 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -1320,7 +1320,7 @@ rte_eal_init(int argc, char **argv) rte_eal_init_alert("Cannot clear runtime directory"); return -1; } - if (!internal_conf->no_telemetry) { + if (rte_eal_process_type() == RTE_PROC_PRIMARY && !internal_conf->no_telemetry) { int tlog = rte_log_register_type_and_pick_level( "lib.telemetry", RTE_LOG_WARNING); if (tlog < 0)