-/*-
- * SPDX-License-Identifier: BSD-3-Clause
- * Copyright(c) 2010-2014 Intel Corporation
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2017 Intel Corporation
*/
#include <inttypes.h>
dev->data->dev_id,
queues[0],
p->id);
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
dev->data->dev_id,
num,
p->id);
- rte_errno = -EDQUOT;
+ rte_errno = EDQUOT;
return 0;
}
dev->data->dev_id,
p->id,
queues[0]);
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
p->id,
p->external_qid,
queues[0]);
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
dev->data->dev_id,
queues[0],
p->id);
- rte_errno = -EINVAL;
+ rte_errno = EINVAL;
return 0;
}
RTE_SET_USED(nb_unlinks);
}
}
/* Check if queue id has been setup already */
- for (uint32_t i = 0; i < device->nb_q_md; i++) {
+ uint32_t i;
+ for (i = 0; i < device->nb_q_md; i++) {
if (device->q_md[i].ext_id == queue_id) {
PMD_DRV_LOG(ERR, "DEV_ID:[%02d] : "
"queue id %u already setup\n",
fprintf(f,
"\n\n -- RING STATISTICS --\n");
-
- for (uint32_t i = 0; i < device->nb_opdls; i++)
+ uint32_t i;
+ for (i = 0; i < device->nb_opdls; i++)
opdl_ring_dump(device->opdl[i], f);
fprintf(f,
"Av. Grant Size Av. Cycles PP"
" Empty DEQs Non Empty DEQs Pkts Processed\n");
- for (uint32_t i = 0; i < device->max_port_nb; i++) {
+ for (i = 0; i < device->max_port_nb; i++) {
char queue_id[64];
char total_cyc[64];
const char *p_type;
else
p_type = "????";
- sprintf(queue_id, "%02u", port->external_qid);
+ snprintf(queue_id, sizeof(queue_id), "%02u",
+ port->external_qid);
if (port->p_type == OPDL_REGULAR_PORT ||
port->p_type == OPDL_ASYNC_PORT)
- sprintf(total_cyc,
+ snprintf(total_cyc, sizeof(total_cyc),
" %'16"PRIu64"",
(cpg != 0 ?
port->port_stat[total_cycles] / cpg
: 0));
else
- sprintf(total_cyc,
+ snprintf(total_cyc, sizeof(total_cyc),
" ----");
fprintf(f,
"%4s %10u %8u %9s %'16"PRIu64" %'16"PRIu64" %s "
static int
opdl_probe(struct rte_vdev_device *vdev)
{
- static const struct rte_eventdev_ops evdev_opdl_ops = {
+ static struct rte_eventdev_ops evdev_opdl_ops = {
.dev_configure = opdl_dev_configure,
.dev_infos_get = opdl_info_get,
.dev_close = opdl_close,
str_len = strlen(name);
memcpy(opdl->service_name, name, str_len);
+ if (do_test == 1)
+ test_result = opdl_selftest();
+
return test_result;
}
.remove = opdl_remove
};
-RTE_INIT(opdl_init_log);
-
-static void
-opdl_init_log(void)
+RTE_INIT(opdl_init_log)
{
- opdl_logtype_driver = rte_log_register("eventdev.opdl.driver");
+ opdl_logtype_driver = rte_log_register("pmd.event.opdl.driver");
if (opdl_logtype_driver >= 0)
rte_log_set_level(opdl_logtype_driver, RTE_LOG_INFO);
}