From: Harry van Haaren <harry.van.haaren@intel.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, mattias.ronnblom@ericsson.com,
honnappa.nagarahalli@arm.com,
Harry van Haaren <harry.van.haaren@intel.com>
Subject: [dpdk-dev] [PATCH v3 2/3] event/sw: add useful work done attribute
Date: Fri, 12 Feb 2021 16:58:13 +0000 [thread overview]
Message-ID: <20210212165814.2189305-2-harry.van.haaren@intel.com> (raw)
In-Reply-To: <20210212165814.2189305-1-harry.van.haaren@intel.com>
This commit exposes if useful work is done to the service
instance. The normal service_attr_get() API can be used to
retrieve the value of the attribute.
Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
---
drivers/event/sw/sw_evdev_scheduler.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/event/sw/sw_evdev_scheduler.c b/drivers/event/sw/sw_evdev_scheduler.c
index f747b3c6d4..c78f687446 100644
--- a/drivers/event/sw/sw_evdev_scheduler.c
+++ b/drivers/event/sw/sw_evdev_scheduler.c
@@ -5,6 +5,9 @@
#include <rte_ring.h>
#include <rte_hash_crc.h>
#include <rte_event_ring.h>
+
+#include <rte_service_component.h>
+
#include "sw_evdev.h"
#include "iq_chunk.h"
#include "event_ring.h"
@@ -559,6 +562,10 @@ sw_event_schedule(struct rte_eventdev *dev)
sw->sched_no_iq_enqueues += (in_pkts_total == 0);
sw->sched_no_cq_enqueues += (out_pkts_total == 0);
+ uint64_t work_done = (in_pkts_total + out_pkts_total) != 0;
+ rte_service_component_attr_set(sw->service_id,
+ RTE_SERVICE_ATTR_USEFUL_WORK_LAST_ITER, work_done);
+
/* push all the internal buffered QEs in port->cq_ring to the
* worker cores: aka, do the ring transfers batched.
*/
--
2.25.1
next prev parent reply other threads:[~2021-02-12 16:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-12 16:58 [dpdk-dev] [PATCH v3 1/3] service: add component useful work attribute Harry van Haaren
2021-02-12 16:58 ` Harry van Haaren [this message]
2021-02-12 16:58 ` [dpdk-dev] [PATCH v3 3/3] event/sw: add xstat for work done in last iteration Harry van Haaren
2021-03-03 10:56 ` [dpdk-dev] [PATCH v4] event/sw: add xstats to expose progress details Harry van Haaren
2021-03-04 11:02 ` Van Haaren, Harry
2021-03-08 7:52 ` Jerin Jacob
2021-03-08 9:22 ` [dpdk-dev] [PATCH v5] " Harry van Haaren
2021-03-08 16:54 ` Jerin Jacob
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=20210212165814.2189305-2-harry.van.haaren@intel.com \
--to=harry.van.haaren@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=honnappa.nagarahalli@arm.com \
--cc=mattias.ronnblom@ericsson.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).