aboutsummaryrefslogtreecommitdiffstats
path: root/lib/librte_bbdev/rte_bbdev.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@gmail.com>2018-08-14 18:52:30 +0100
committerLuca Boccassi <luca.boccassi@gmail.com>2018-08-14 18:53:17 +0100
commitb63264c8342e6a1b6971c79550d2af2024b6a4de (patch)
tree83114aac64286fe616506c0b3dfaec2ab86ef835 /lib/librte_bbdev/rte_bbdev.c
parentca33590b6af032bff57d9cc70455660466a654b2 (diff)
New upstream version 18.08upstream/18.08
Change-Id: I32fdf5e5016556d9c0a6d88ddaf1fc468961790a Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'lib/librte_bbdev/rte_bbdev.c')
-rw-r--r--lib/librte_bbdev/rte_bbdev.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/librte_bbdev/rte_bbdev.c b/lib/librte_bbdev/rte_bbdev.c
index 74ecc490..c4cc18d9 100644
--- a/lib/librte_bbdev/rte_bbdev.c
+++ b/lib/librte_bbdev/rte_bbdev.c
@@ -495,11 +495,20 @@ rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id,
conf->queue_size, queue_id, dev_id);
return -EINVAL;
}
- if (conf->priority > dev_info.max_queue_priority) {
+ if (conf->op_type == RTE_BBDEV_OP_TURBO_DEC &&
+ conf->priority > dev_info.max_ul_queue_priority) {
rte_bbdev_log(ERR,
"Priority (%u) of queue %u of bdev %u must be <= %u",
conf->priority, queue_id, dev_id,
- dev_info.max_queue_priority);
+ dev_info.max_ul_queue_priority);
+ return -EINVAL;
+ }
+ if (conf->op_type == RTE_BBDEV_OP_TURBO_ENC &&
+ conf->priority > dev_info.max_dl_queue_priority) {
+ rte_bbdev_log(ERR,
+ "Priority (%u) of queue %u of bdev %u must be <= %u",
+ conf->priority, queue_id, dev_id,
+ dev_info.max_dl_queue_priority);
return -EINVAL;
}
}
@@ -1116,9 +1125,7 @@ rte_bbdev_op_type_str(enum rte_bbdev_op_type op_type)
return NULL;
}
-RTE_INIT(rte_bbdev_init_log);
-static void
-rte_bbdev_init_log(void)
+RTE_INIT(rte_bbdev_init_log)
{
bbdev_logtype = rte_log_register("lib.bbdev");
if (bbdev_logtype >= 0)