Content-Type: multipart/mixed; boundary="===============7548151834013936891==" MIME-Version: 1.0 From: Dave Jiang Subject: [Accel-config] Re: [PATCH 2/2] accel-config: Add occupancy attribute to json wq object Date: Wed, 11 Aug 2021 08:28:17 -0700 Message-ID: In-Reply-To: 20210811025735.1182805-3-ramesh.thomas@intel.com To: accel-config@lists.01.org List-ID: --===============7548151834013936891== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 8/10/2021 7:57 PM, ramesh.thomas(a)intel.com wrote: > From: Ramesh Thomas > > Add a json object for occupancy attribute in wq properties. Not sure if we should bother. This value is only useful in the moment. = There's not much value to display the stale output. > > Signed-off-by: Ramesh Thomas > --- > util/json.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/util/json.c b/util/json.c > index 09d3a10..bd3f1ba 100644 > --- a/util/json.c > +++ b/util/json.c > @@ -461,6 +461,13 @@ struct json_object *util_wq_to_json(struct accfg_wq = *wq, > if (jobj) > json_object_object_add(jaccfg, "ats_disable", jobj); > = > + int_val =3D accfg_wq_get_occupancy(wq); > + if (int_val >=3D 0) { > + jobj =3D json_object_new_int(int_val); > + if (jobj) > + json_object_object_add(jaccfg, "occupancy", jobj); > + } > + > if (!(flags & UTIL_JSON_SAVE)) { > = > switch (wq_state) { --===============7548151834013936891==--