From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8010783105552184645==" MIME-Version: 1.0 From: Xiaochen Shen 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 Message-ID: <1625807906-11570-3-git-send-email-xiaochen.shen@intel.com> In-Reply-To: 1625807906-11570-1-git-send-email-xiaochen.shen@intel.com To: accel-config@lists.01.org List-ID: --===============8010783105552184645== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Add support for ats_disable field in wq_table Add support for ats_disable attribute in json interface Signed-off-by: Xiaochen Shen --- 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[] =3D { { "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[] =3D { 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 *w= q, if (jobj) json_object_object_add(jaccfg, "threshold", jobj); = + jobj =3D 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 --===============8010783105552184645==--