if (!internal_config.no_telemetry) {
const char *error_str;
if (rte_telemetry_init(rte_eal_get_runtime_dir(),
- &error_str) != 0) {
+ &internal_config.ctrl_cpuset, &error_str)
+ != 0) {
rte_eal_init_alert(error_str);
return -1;
}
if (!internal_config.no_telemetry) {
const char *error_str;
if (rte_telemetry_init(rte_eal_get_runtime_dir(),
- &error_str) != 0) {
+ &internal_config.ctrl_cpuset, &error_str)
+ != 0) {
rte_eal_init_alert(error_str);
return -1;
}
}
static int
-telemetry_legacy_init(const char *runtime_dir)
+telemetry_legacy_init(const char *runtime_dir, rte_cpuset_t *cpuset)
{
pthread_t t_old;
if (v1_socket.sock < 0)
return -1;
pthread_create(&t_old, NULL, socket_listener, &v1_socket);
+ pthread_setaffinity_np(t_old, sizeof(*cpuset), cpuset);
return 0;
}
static int
-telemetry_v2_init(const char *runtime_dir)
+telemetry_v2_init(const char *runtime_dir, rte_cpuset_t *cpuset)
{
pthread_t t_new;
if (v2_socket.sock < 0)
return -1;
pthread_create(&t_new, NULL, socket_listener, &v2_socket);
+ pthread_setaffinity_np(t_new, sizeof(*cpuset), cpuset);
atexit(unlink_sockets);
return 0;
}
int32_t
-rte_telemetry_init(const char *runtime_dir, const char **err_str)
+rte_telemetry_init(const char *runtime_dir, rte_cpuset_t *cpuset,
+ const char **err_str)
{
- if (telemetry_v2_init(runtime_dir) != 0) {
+ if (telemetry_v2_init(runtime_dir, cpuset) != 0) {
*err_str = telemetry_log_error;
printf("Error initialising telemetry - %s\n", *err_str);
return -1;
}
- if (telemetry_legacy_init(runtime_dir) != 0) {
+ if (telemetry_legacy_init(runtime_dir, cpuset) != 0) {
*err_str = telemetry_log_error;
printf("No telemetry legacy support - %s\n", *err_str);
}