[Accel-config] [PATCH v2 2/5] accel-config: Add ats_disable in config and json
Xiaochen Shen <xiaochen.shen at intel.com>
| Newsgroups | dev.linux.lists.accel-config |
|---|---|
| Message-ID | <[email protected]> |
Add support for ats_disable field in wq_table
Add support for ats_disable attribute in json interface
Signed-off-by: Xiaochen Shen <xiaochen.shen(a)intel.com>
---
accfg/config.c | 1 +
util/json.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/accfg/config.c b/accfg/config.c
index 49f5631..a98048e 100644
--- a/accfg/config.c
+++ b/accfg/config.c
@@ -101,6 +101,7 @@ static const struct wq_set_table wq_table[] = {
{ "max_transfer_size", NULL, accfg_wq_set_max_transfer_size, NULL, NULL },
{ "threshold", accfg_wq_set_threshold, NULL, NULL,
is_wq_threshold_writable },
+ { "ats_disable", accfg_wq_set_ats_disable, NULL, NULL, NULL },
};
static const struct engine_set_table engine_table[] = {
diff --git a/util/json.c b/util/json.c
index 4fb43d2..09d3a10 100644
--- a/util/json.c
+++ b/util/json.c
@@ -457,6 +457,10 @@ struct json_object *util_wq_to_json(struct accfg_wq *wq,
if (jobj)
json_object_object_add(jaccfg, "threshold", jobj);
+ jobj = json_object_new_int(accfg_wq_get_ats_disable(wq));
+ if (jobj)
+ json_object_object_add(jaccfg, "ats_disable", jobj);
+
if (!(flags & UTIL_JSON_SAVE)) {
switch (wq_state) {
--
1.8.3.1