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 = accfg_wq_get_occupancy(wq); > + if (int_val >= 0) { > + jobj = json_object_new_int(int_val); > + if (jobj) > + json_object_object_add(jaccfg, "occupancy", jobj); > + } > + > if (!(flags & UTIL_JSON_SAVE)) { > > switch (wq_state) {