All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiaochen Shen <xiaochen.shen at intel.com>
To: accel-config@lists.01.org
Subject: [Accel-config] [PATCH v2 2/5] accel-config: Add ats_disable in config and json
Date: Fri, 09 Jul 2021 13:18:23 +0800	[thread overview]
Message-ID: <1625807906-11570-3-git-send-email-xiaochen.shen@intel.com> (raw)
In-Reply-To: 1625807906-11570-1-git-send-email-xiaochen.shen@intel.com

[-- 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

                 reply	other threads:[~2021-07-09  5:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1625807906-11570-3-git-send-email-xiaochen.shen@intel.com \
    --to=accel-config@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.