All of lore.kernel.org
 help / color / mirror / Atom feed
* [Accel-config] [PATCH v2 2/5] accel-config: Add ats_disable in config and json
@ 2021-07-09  5:18 Xiaochen Shen
  0 siblings, 0 replies; only message in thread
From: Xiaochen Shen @ 2021-07-09  5:18 UTC (permalink / raw)
  To: accel-config

[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-09  5:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09  5:18 [Accel-config] [PATCH v2 2/5] accel-config: Add ats_disable in config and json Xiaochen Shen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.