From: Harry van Haaren <harry.van.haaren@intel.com>
To: dev@dpdk.org
Cc: david.marchand@dpdk.org, Harry van Haaren <harry.van.haaren@intel.com>
Subject: [dpdk-dev] [PATCH v2 2/2] event/sw: add useful work done attribute
Date: Mon, 14 Sep 2020 15:37:32 +0100 [thread overview]
Message-ID: <20200914143732.87907-2-harry.van.haaren@intel.com> (raw)
In-Reply-To: <20200914143732.87907-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 cff747da89..4e932612d5 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"
@@ -554,6 +557,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.17.1
next prev parent reply other threads:[~2020-09-14 14:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-07 16:21 [dpdk-dev] [PATCH 1/2] service: add component useful work attribute Harry van Haaren
2020-09-07 16:21 ` [dpdk-dev] [PATCH 2/2] event/sw: add useful work done attribute Harry van Haaren
2020-09-14 8:37 ` [dpdk-dev] [PATCH 1/2] service: add component useful work attribute David Marchand
2020-09-14 14:37 ` Van Haaren, Harry
2020-09-14 14:37 ` [dpdk-dev] [PATCH v2 " Harry van Haaren
2020-09-14 14:37 ` Harry van Haaren [this message]
2020-09-21 14:49 ` David Marchand
2020-09-21 15:17 ` Van Haaren, Harry
2020-09-21 23:47 ` Honnappa Nagarahalli
2020-09-23 11:39 ` Mattias Rönnblom
2020-09-23 14:16 ` Van Haaren, Harry
2020-10-05 16:45 ` Van Haaren, Harry
2020-10-16 12:20 ` David Marchand
2020-10-16 12:57 ` Van Haaren, Harry
2021-01-13 14:42 ` David Marchand
2021-01-14 12:15 ` Van Haaren, Harry
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=20200914143732.87907-2-harry.van.haaren@intel.com \
--to=harry.van.haaren@intel.com \
--cc=david.marchand@dpdk.org \
--cc=dev@dpdk.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 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).