From: Harry van Haaren <harry.van.haaren@intel.com> To: dev@dpdk.org Cc: Harry van Haaren <harry.van.haaren@intel.com>, jerinj@marvell.com Subject: [dpdk-dev] [PATCH 2/2] event/sw: add useful work done attribute Date: Mon, 7 Sep 2020 17:21:49 +0100 Message-ID: <20200907162149.31454-2-harry.van.haaren@intel.com> (raw) In-Reply-To: <20200907162149.31454-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> --- Cc: jerinj@marvell.com CC due to event/sw change, could be picked up by main tree as depends on 1/2? 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-07 16:20 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 ` Harry van Haaren [this message] 2020-09-14 8:37 ` 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 ` [dpdk-dev] [PATCH v2 2/2] event/sw: add useful work done attribute Harry van Haaren 2020-09-21 14:49 ` [dpdk-dev] [PATCH v2 1/2] service: add component useful work attribute 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=20200907162149.31454-2-harry.van.haaren@intel.com \ --to=harry.van.haaren@intel.com \ --cc=dev@dpdk.org \ --cc=jerinj@marvell.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
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git