eventdev: extend queue attribute get function
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>
This commit is contained in:
parent
13370a3877
commit
2b3bb4d028
@ -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:
|
case RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG:
|
||||||
*attr_value = conf->event_queue_cfg;
|
*attr_value = conf->event_queue_cfg;
|
||||||
break;
|
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:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
};
|
};
|
||||||
|
@ -632,6 +632,10 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id,
|
|||||||
* The cfg flags for the queue.
|
* The cfg flags for the queue.
|
||||||
*/
|
*/
|
||||||
#define RTE_EVENT_QUEUE_ATTR_EVENT_QUEUE_CFG 3
|
#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.
|
* 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
|
* @retval 0 Successfully returned value
|
||||||
* -EINVAL invalid device, queue or attr_id provided, or attr_value
|
* -EINVAL invalid device, queue or attr_id provided, or attr_value
|
||||||
* was NULL
|
* 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
|
int
|
||||||
rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
|
rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user