DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
To: harry.van.haaren@intel.com, hemant.agrawal@nxp.com,
	jerin.jacob@caviumnetworks.com
Cc: dev@dpdk.org, Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Subject: [dpdk-dev] [PATCH v4 2/3] eventdev: extend queue attribute get function
Date: Wed, 25 Oct 2017 19:51:43 +0530	[thread overview]
Message-ID: <1508941304-11596-2-git-send-email-pbhagavatula@caviumnetworks.com> (raw)
In-Reply-To: <1508941304-11596-1-git-send-email-pbhagavatula@caviumnetworks.com>

Add schedule type queue attribute so that it can be queried along with
the queue config structure.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 v4 changes:
  - fix incorrect conditional check while returning queue schedule attribute.

 v2 changes:
  - return EOVERFLOW when schedule_type is requested and event_queue_cfg is set
  to *ALL_TYPES*.

 lib/librte_eventdev/rte_eventdev.c | 6 ++++++
 lib/librte_eventdev/rte_eventdev.h | 7 +++++++
 2 files changed, 13 insertions(+)

diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
index db96552..250bfc8 100644
--- a/lib/librte_eventdev/rte_eventdev.c
+++ b/lib/librte_eventdev/rte_eventdev.c
@@ -809,6 +809,12 @@ rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
 	case RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG:
 		*attr_value = conf->event_queue_cfg;
 		break;
+	case RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE:
+		if (conf->event_queue_cfg & RTE_EVENT_QUEUE_CFG_ALL_TYPES)
+			return -EOVERFLOW;
+
+		*attr_value = conf->schedule_type;
+		break;
 	default:
 		return -EINVAL;
 	};
diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h
index fa16f82..b9d1b98 100644
--- a/lib/librte_eventdev/rte_eventdev.h
+++ b/lib/librte_eventdev/rte_eventdev.h
@@ -632,6 +632,10 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
  * The cfg flags for the queue.
  */
 #define RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG 3
+/**
+ * The schedule type of the queue.
+ */
+#define RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE 4

 /**
  * Get an attribute from a queue.
@@ -645,6 +649,9 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
  * @retval 0 Successfully returned value
  *         -EINVAL invalid device, queue or attr_id provided, or attr_value
  *         was NULL
+ *         -EOVERFLOW returned when attr_id is set to
+ *         RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE and event_queue_cfg is set to
+ *         RTE_EVENT_QUEUE_CFG_ALL_TYPES
  */
 int
 rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
--
2.7.4

  reply	other threads:[~2017-10-25 14:22 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-12 13:15 [dpdk-dev] [PATCH 1/3] evendev: fix inconsistency in event queue config Pavan Nikhilesh
2017-10-12 13:15 ` [dpdk-dev] [PATCH 2/3] eventdev: extend queue attribute get function Pavan Nikhilesh
2017-10-12 13:15 ` [dpdk-dev] [PATCH 3/3] doc: update eventdev programmers guide Pavan Nikhilesh
2017-10-20  9:54 ` [dpdk-dev] [PATCH 1/3] evendev: fix inconsistency in event queue config Van Haaren, Harry
2017-10-20 10:30   ` Pavan Nikhilesh Bhagavatula
2017-10-20 16:38     ` Van Haaren, Harry
2017-10-20 19:09       ` Pavan Nikhilesh Bhagavatula
2017-10-21 17:27         ` Jerin Jacob
2017-10-23  8:04         ` Van Haaren, Harry
2017-10-23  8:41           ` Pavan Nikhilesh Bhagavatula
2017-10-23 14:45             ` Van Haaren, Harry
2017-10-23 14:54               ` Pavan Nikhilesh Bhagavatula
2017-10-21 15:05       ` Jerin Jacob
2017-10-23 16:29 ` [dpdk-dev] [PATCH v2 " Pavan Nikhilesh
2017-10-23 16:29   ` [dpdk-dev] [PATCH v2 2/3] eventdev: extend queue attribute get function Pavan Nikhilesh
2017-10-23 16:29   ` [dpdk-dev] [PATCH v2 3/3] doc: update eventdev programmers guide Pavan Nikhilesh
2017-10-23 17:40 ` [dpdk-dev] [PATCH v3 1/3] evendev: fix inconsistency in event queue config Pavan Nikhilesh
2017-10-23 17:40   ` [dpdk-dev] [PATCH v3 2/3] eventdev: extend queue attribute get function Pavan Nikhilesh
2017-10-25 13:43     ` Van Haaren, Harry
2017-10-25 13:58       ` Pavan Nikhilesh Bhagavatula
2017-10-23 17:40   ` [dpdk-dev] [PATCH v3 3/3] doc: update eventdev programmers guide Pavan Nikhilesh
2017-10-25 13:43     ` Van Haaren, Harry
2017-10-25 13:42   ` [dpdk-dev] [PATCH v3 1/3] evendev: fix inconsistency in event queue config Van Haaren, Harry
2017-10-25 14:21 ` [dpdk-dev] [PATCH v4 " Pavan Nikhilesh
2017-10-25 14:21   ` Pavan Nikhilesh [this message]
2017-10-25 14:21   ` [dpdk-dev] [PATCH v4 3/3] doc: update eventdev programmers guide Pavan Nikhilesh
2017-10-26 22:26   ` [dpdk-dev] [PATCH v4 1/3] evendev: fix inconsistency in event queue config Thomas Monjalon

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=1508941304-11596-2-git-send-email-pbhagavatula@caviumnetworks.com \
    --to=pbhagavatula@caviumnetworks.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=hemant.agrawal@nxp.com \
    --cc=jerin.jacob@caviumnetworks.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).