#include <string.h>
#include <stdbool.h>
-#include <rte_compat.h>
#include <rte_common.h>
#include <rte_errno.h>
#include <rte_log.h>
-#include <rte_debug.h>
#include <rte_eal.h>
#include <rte_malloc.h>
#include <rte_mempool.h>
#include <rte_memzone.h>
#include <rte_lcore.h>
-#include <rte_dev.h>
#include <rte_spinlock.h>
-#include <rte_tailq.h>
#include <rte_interrupts.h>
#include "rte_bbdev_op.h"
/* BBDev library logging ID */
-RTE_LOG_REGISTER(bbdev_logtype, lib.bbdev, NOTICE);
+RTE_LOG_REGISTER_DEFAULT(bbdev_logtype, NOTICE);
/* Helper macro for logging */
#define rte_bbdev_log(level, fmt, ...) \
}
/*
- * Find data alocated for the device or if not found return first unused bbdev
+ * Find data allocated for the device or if not found return first unused bbdev
* data. If all structures are in use and none is used by the device return
* NULL.
*/
ret = dev->dev_ops->queue_setup(dev, queue_id, (conf != NULL) ?
conf : &dev_info.default_queue_conf);
if (ret < 0) {
- rte_bbdev_log(ERR,
- "Device %u queue %u setup failed", dev_id,
- queue_id);
+ /* This may happen when trying different priority levels */
+ rte_bbdev_log(INFO,
+ "Device %u queue %u setup failed",
+ dev_id, queue_id);
return ret;
}
VALID_QUEUE_OR_RET_ERR(queue_id, dev);
intr_handle = dev->intr_handle;
- if (!intr_handle || !intr_handle->intr_vec) {
+ if (intr_handle == NULL) {
rte_bbdev_log(ERR, "Device %u intr handle unset\n", dev_id);
return -ENOTSUP;
}
return -ENOTSUP;
}
- vec = intr_handle->intr_vec[queue_id];
+ vec = rte_intr_vec_list_index_get(intr_handle, queue_id);
ret = rte_intr_rx_ctl(intr_handle, epfd, op, vec, data);
if (ret && (ret != -EEXIST)) {
rte_bbdev_log(ERR,