return 0;
}
+#define EVENT_QUEUE_SERVICE_PRIORITY_INVALID (0xdead)
+
static inline int
rte_event_dev_port_config(struct rte_eventdev *dev, uint8_t nb_ports)
{
"nb_ports %u", nb_ports);
return -(ENOMEM);
}
+ for (i = 0; i < nb_ports * RTE_EVENT_MAX_QUEUES_PER_DEV; i++)
+ dev->data->links_map[i] =
+ EVENT_QUEUE_SERVICE_PRIORITY_INVALID;
} else if (dev->data->ports != NULL && nb_ports != 0) {/* re-config */
RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->port_release, -ENOTSUP);
if (nb_ports > old_nb_ports) {
uint8_t new_ps = nb_ports - old_nb_ports;
+ unsigned int old_links_map_end =
+ old_nb_ports * RTE_EVENT_MAX_QUEUES_PER_DEV;
+ unsigned int links_map_end =
+ nb_ports * RTE_EVENT_MAX_QUEUES_PER_DEV;
memset(ports + old_nb_ports, 0,
sizeof(ports[0]) * new_ps);
sizeof(ports_dequeue_depth[0]) * new_ps);
memset(ports_enqueue_depth + old_nb_ports, 0,
sizeof(ports_enqueue_depth[0]) * new_ps);
- memset(links_map +
- (old_nb_ports * RTE_EVENT_MAX_QUEUES_PER_DEV),
- 0, sizeof(ports_enqueue_depth[0]) * new_ps);
+ for (i = old_links_map_end; i < links_map_end; i++)
+ links_map[i] =
+ EVENT_QUEUE_SERVICE_PRIORITY_INVALID;
}
dev->data->ports = ports;
return diag;
}
-#define EVENT_QUEUE_SERVICE_PRIORITY_INVALID (0xdead)
-
int
rte_event_port_unlink(uint8_t dev_id, uint8_t port_id,
uint8_t queues[], uint16_t nb_unlinks)