[dpdk-dev,2/3] eventdev: extend queue attribute get function

Message ID 1507814147-8223-2-git-send-email-pbhagavatula@caviumnetworks.com (mailing list archive)
State Superseded, archived
Delegated to: Jerin Jacob
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Pavan Nikhilesh Oct. 12, 2017, 1:15 p.m. UTC
  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>
---
 lib/librte_eventdev/rte_eventdev.c | 3 +++
 lib/librte_eventdev/rte_eventdev.h | 4 ++++
 2 files changed, 7 insertions(+)
  

Patch

diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
index db96552..bf2ec61 100644
--- a/lib/librte_eventdev/rte_eventdev.c
+++ b/lib/librte_eventdev/rte_eventdev.c
@@ -809,6 +809,9 @@  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:
+		*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..b5cc29a 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.