* *rte_event*. If the return value is less than *nb_events*, the remaining
* events at the end of ev[] are not consumed and the caller has to take care
* of them, and rte_errno is set accordingly. Possible errno values include:
- * - -EINVAL The port ID is invalid, device ID is invalid, an event's queue
+ * - EINVAL The port ID is invalid, device ID is invalid, an event's queue
* ID is invalid, or an event's sched type doesn't match the
* capabilities of the destination queue.
- * - -ENOSPC The event port was backpressured and unable to enqueue
+ * - ENOSPC The event port was backpressured and unable to enqueue
* one or more events. This error code is only applicable to
* closed systems.
*/
#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
if (dev_id >= RTE_EVENT_MAX_DEVS ||
!rte_eventdevs[dev_id].attached) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
if (port_id >= dev->data->nb_ports) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
#endif
&adapter->data->caps,
&adapter->ops);
if (ret < 0) {
- rte_errno = ret;
+ rte_errno = -ret;
goto free_memzone;
}
if (!(adapter->data->caps &
RTE_EVENT_TIMER_ADAPTER_CAP_INTERNAL_PORT)) {
- FUNC_PTR_OR_NULL_RET_WITH_ERRNO(conf_cb, -EINVAL);
+ FUNC_PTR_OR_NULL_RET_WITH_ERRNO(conf_cb, EINVAL);
ret = conf_cb(adapter->data->id, adapter->data->event_dev_id,
&adapter->data->event_port_id, conf_arg);
if (ret < 0) {
- rte_errno = ret;
+ rte_errno = -ret;
goto free_memzone;
}
}
adapter->ops = &swtim_ops;
/* Allow driver to do some setup */
- FUNC_PTR_OR_NULL_RET_WITH_ERRNO(adapter->ops->init, -ENOTSUP);
+ FUNC_PTR_OR_NULL_RET_WITH_ERRNO(adapter->ops->init, ENOTSUP);
ret = adapter->ops->init(adapter);
if (ret < 0) {
- rte_errno = ret;
+ rte_errno = -ret;
goto free_memzone;
}
*nb_events_flushed = rte_event_enqueue_burst(dev_id, port_id,
&events[tail_idx], n);
if (*nb_events_flushed != n) {
- if (rte_errno == -EINVAL) {
+ if (rte_errno == EINVAL) {
EVTIM_LOG_ERR("failed to enqueue invalid event - "
"dropping it");
(*nb_events_inv)++;
- } else if (rte_errno == -ENOSPC)
+ } else if (rte_errno == ENOSPC)
rte_pause();
}
if (ret < 0) {
if (ret != -EALREADY) {
EVTIM_LOG_ERR("failed to initialize timer subsystem");
- rte_errno = ret;
+ rte_errno = -ret;
goto free_mempool;
}
}
ret = rte_timer_data_alloc(&sw->timer_data_id);
if (ret < 0) {
EVTIM_LOG_ERR("failed to allocate timer data instance");
- rte_errno = ret;
+ rte_errno = -ret;
goto free_mempool;
}
uint16_t *links_map;
int i, diag;
- RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, -EINVAL, 0);
+ RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, EINVAL, 0);
dev = &rte_eventdevs[dev_id];
if (*dev->dev_ops->port_link == NULL) {
RTE_EDEV_LOG_ERR("Function not supported\n");
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
return 0;
}
if (!is_valid_port(dev, port_id)) {
RTE_EDEV_LOG_ERR("Invalid port_id=%" PRIu8, port_id);
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
for (i = 0; i < nb_links; i++)
if (queues[i] >= dev->data->nb_queues) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
int i, diag, j;
uint16_t *links_map;
- RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, -EINVAL, 0);
+ RTE_EVENTDEV_VALID_DEVID_OR_ERRNO_RET(dev_id, EINVAL, 0);
dev = &rte_eventdevs[dev_id];
if (*dev->dev_ops->port_unlink == NULL) {
RTE_EDEV_LOG_ERR("Function not supported");
- rte_errno = -ENOTSUP;
+ rte_errno = ENOTSUP;
return 0;
}
if (!is_valid_port(dev, port_id)) {
RTE_EDEV_LOG_ERR("Invalid port_id=%" PRIu8, port_id);
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
nb_unlinks = j;
for (i = 0; i < nb_unlinks; i++)
if (queues[i] >= dev->data->nb_queues) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
if (dev_id >= RTE_EVENT_MAX_DEVS || !rte_eventdevs[dev_id].attached) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
if (port_id >= dev->data->nb_ports) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
#endif
* *rte_event*. If the return value is less than *nb_events*, the remaining
* events at the end of ev[] are not consumed and the caller has to take care
* of them, and rte_errno is set accordingly. Possible errno values include:
- * - -EINVAL The port ID is invalid, device ID is invalid, an event's queue
+ * - EINVAL The port ID is invalid, device ID is invalid, an event's queue
* ID is invalid, or an event's sched type doesn't match the
* capabilities of the destination queue.
- * - -ENOSPC The event port was backpressured and unable to enqueue
+ * - ENOSPC The event port was backpressured and unable to enqueue
* one or more events. This error code is only applicable to
* closed systems.
* @see rte_event_port_attr_get(), RTE_EVENT_PORT_ATTR_ENQ_DEPTH
* *rte_event*. If the return value is less than *nb_events*, the remaining
* events at the end of ev[] are not consumed and the caller has to take care
* of them, and rte_errno is set accordingly. Possible errno values include:
- * - -EINVAL The port ID is invalid, device ID is invalid, an event's queue
+ * - EINVAL The port ID is invalid, device ID is invalid, an event's queue
* ID is invalid, or an event's sched type doesn't match the
* capabilities of the destination queue.
- * - -ENOSPC The event port was backpressured and unable to enqueue
+ * - ENOSPC The event port was backpressured and unable to enqueue
* one or more events. This error code is only applicable to
* closed systems.
* @see rte_event_port_attr_get(), RTE_EVENT_PORT_ATTR_ENQ_DEPTH
* *rte_event*. If the return value is less than *nb_events*, the remaining
* events at the end of ev[] are not consumed and the caller has to take care
* of them, and rte_errno is set accordingly. Possible errno values include:
- * - -EINVAL The port ID is invalid, device ID is invalid, an event's queue
+ * - EINVAL The port ID is invalid, device ID is invalid, an event's queue
* ID is invalid, or an event's sched type doesn't match the
* capabilities of the destination queue.
- * - -ENOSPC The event port was backpressured and unable to enqueue
+ * - ENOSPC The event port was backpressured and unable to enqueue
* one or more events. This error code is only applicable to
* closed systems.
* @see rte_event_port_attr_get(), RTE_EVENT_PORT_ATTR_ENQ_DEPTH
#ifdef RTE_LIBRTE_EVENTDEV_DEBUG
if (dev_id >= RTE_EVENT_MAX_DEVS || !rte_eventdevs[dev_id].attached) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
if (port_id >= dev->data->nb_ports) {
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
#endif
* of link[] are not established, and the caller has to take care of them.
* If return value is less than *nb_links* then implementation shall update the
* rte_errno accordingly, Possible rte_errno values are
- * (-EDQUOT) Quota exceeded(Application tried to link the queue configured with
+ * (EDQUOT) Quota exceeded(Application tried to link the queue configured with
* RTE_EVENT_QUEUE_CFG_SINGLE_LINK to more than one event ports)
- * (-EINVAL) Invalid parameter
+ * (EINVAL) Invalid parameter
*
*/
int
* end of queues[] are not unlinked, and the caller has to take care of them.
* If return value is less than *nb_unlinks* then implementation shall update
* the rte_errno accordingly, Possible rte_errno values are
- * (-EINVAL) Invalid parameter
+ * (EINVAL) Invalid parameter
*/
int
rte_event_port_unlink(uint8_t dev_id, uint8_t port_id,