Skip to content

Commit 56cc18f

Browse files
committed
More Intel Architecture codes. Timeout for Labee module
1 parent dac5d20 commit 56cc18f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/driver-labee.c

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
#include "error.h"
3939
#include "timer.h"
4040

41+
// CURL Options
42+
#define CURLOPT_DEFAULT_TIMEOUT_MS 500L
43+
4144
// Confuse CFG options
4245
#define LABEE_HOSTNAME_CFG "hostname"
4346
#define LABEE_NODELIST_FILENAME_CFG "nodelist_file"
@@ -109,6 +112,7 @@ static enum emlError get_xml(struct xml_content * xc) {
109112
curl_easy_setopt(curl, CURLOPT_URL, labee_api_url);
110113
curl_easy_setopt(curl, CURLOPT_USERNAME, api_user);
111114
curl_easy_setopt(curl, CURLOPT_PASSWORD, api_passwd);
115+
curl_easy_setopt(curl, CURLOPT_TIMEOUT_MS, CURLOPT_DEFAULT_TIMEOUT_MS);
112116

113117
struct curl_slist * list = 0;
114118
list = curl_slist_append(list, "Content-type: application/xml");

src/driver-rapl.c

+18
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,15 @@ static int is_cpu_model_supported(int model) {
157157
CPU_HASWELL_2 = 69,
158158
CPU_HASWELL_3 = 70,
159159
CPU_HASWELL_EP = 63,
160+
CPU_BROADWELL_1 = 61,
161+
CPU_BROADWELL_2 = 71,
162+
CPU_BROADWELL_EP = 79,
163+
CPU_BROADWELL_DE = 86,
164+
CPU_SKYLAKE_1 = 78,
165+
CPU_SKYLAKE_2 = 94,
166+
CPU_SKYLAKE_3 = 85,
167+
CPU_KABYLAKE_1 = 142,
168+
CPU_KABYLAKE_2 = 158,
160169
};
161170

162171
switch(model) {
@@ -168,6 +177,15 @@ static int is_cpu_model_supported(int model) {
168177
case CPU_HASWELL_2:
169178
case CPU_HASWELL_3:
170179
case CPU_HASWELL_EP:
180+
case CPU_BROADWELL_1:
181+
case CPU_BROADWELL_2:
182+
case CPU_BROADWELL_EP:
183+
case CPU_BROADWELL_DE:
184+
case CPU_SKYLAKE_1:
185+
case CPU_SKYLAKE_2:
186+
case CPU_SKYLAKE_3:
187+
case CPU_KABYLAKE_1:
188+
case CPU_KABYLAKE_2:
171189
return 1;
172190
default:
173191
return 0;

0 commit comments

Comments
 (0)