[dpdk-dev,v2] baseband/turbo_sw: splitting Queue Groups
Checks
Commit Message
Splitting Queue Groups into UL/DL Groups in Turbo Software
Driver. The are independent for Decode/Encode
Signed-off-by: KamilX Chalupnik <kamilx.chalupnik@intel.com>
v2:
- logging macros fixed
---
app/test-bbdev/test_bbdev.c | 29 +++++++++---------------
drivers/baseband/null/bbdev_null.c | 3 ++-
drivers/baseband/turbo_sw/bbdev_turbo_software.c | 3 ++-
lib/librte_bbdev/rte_bbdev.c | 13 +++++++++--
lib/librte_bbdev/rte_bbdev.h | 6 +++--
5 files changed, 30 insertions(+), 24 deletions(-)
Comments
> -----Original Message-----
> From: Chalupnik, KamilX
> Sent: Tuesday 17 April 2018 15:40
> To: dev@dpdk.org
> Cc: Mokhtar, Amr <amr.mokhtar@intel.com>; Chalupnik, KamilX
> <kamilx.chalupnik@intel.com>
> Subject: [PATCH v2] baseband/turbo_sw: splitting Queue Groups
>
> Splitting Queue Groups into UL/DL Groups in Turbo Software
> Driver. The are independent for Decode/Encode
>
> Signed-off-by: KamilX Chalupnik <kamilx.chalupnik@intel.com>
>
> v2:
> - logging macros fixed
>
> ---
There is a dependency between (baseband/turbo_sw) patches. Should be applied in this order:
1. baseband/turbo_sw: splitting Queue Groups
2. baseband/turbo_sw: offload cost measurement test
3. baseband/turbo_sw: optimization of turbo software driver
4. baseband/turbo_sw: update Turbo Software driver
Acked-by: Amr Mokhtar <amr.mokhtar@intel.com>
Hi,
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of KamilX Chalupnik
> Sent: Tuesday, April 17, 2018 3:40 PM
> To: dev@dpdk.org
> Cc: Mokhtar, Amr <amr.mokhtar@intel.com>; Chalupnik, KamilX
> <kamilx.chalupnik@intel.com>
> Subject: [dpdk-dev] [PATCH v2] baseband/turbo_sw: splitting Queue Groups
>
This patch is mainly an API change, so title should be: "bbdev: split queue groups",
Since it mainly targets the library (which therefore, requires changes in the PMDs and the test app).
Also the commit message should be updated, not focusing on the Turbo SW driver.
> Splitting Queue Groups into UL/DL Groups in Turbo Software Driver. The are
> independent for Decode/Encode
>
> Signed-off-by: KamilX Chalupnik <kamilx.chalupnik@intel.com>
>
...
> - TEST_ASSERT(event_status == 0,
> + TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
> "Failed test for rte_bbdev_pmd_callback_process "
> "for RTE_BBDEV_EVENT_UNKNOWN ");
These changes making use of the EVENT macros should be in a separate patch,
as it doesn't look like they belong to this one.
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of De Lara Guarch, Pablo
> Sent: Tuesday, April 24, 2018 4:30 PM
> To: Chalupnik, KamilX <kamilx.chalupnik@intel.com>; dev@dpdk.org
> Cc: Mokhtar, Amr <amr.mokhtar@intel.com>; Chalupnik, KamilX
> <kamilx.chalupnik@intel.com>
> Subject: Re: [dpdk-dev] [PATCH v2] baseband/turbo_sw: splitting Queue Groups
>
> Hi,
>
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of KamilX Chalupnik
> > Sent: Tuesday, April 17, 2018 3:40 PM
> > To: dev@dpdk.org
> > Cc: Mokhtar, Amr <amr.mokhtar@intel.com>; Chalupnik, KamilX
> > <kamilx.chalupnik@intel.com>
> > Subject: [dpdk-dev] [PATCH v2] baseband/turbo_sw: splitting Queue
> > Groups
> >
>
> This patch is mainly an API change, so title should be: "bbdev: split queue
> groups", Since it mainly targets the library (which therefore, requires changes in
> the PMDs and the test app).
> Also the commit message should be updated, not focusing on the Turbo SW
> driver.
>
Could you also document this API change in release notes?
Thanks,
Pablo
>
> > Splitting Queue Groups into UL/DL Groups in Turbo Software Driver. The
> > are independent for Decode/Encode
> >
> > Signed-off-by: KamilX Chalupnik <kamilx.chalupnik@intel.com>
> >
>
> ...
>
> > - TEST_ASSERT(event_status == 0,
> > + TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
> > "Failed test for rte_bbdev_pmd_callback_process "
> > "for RTE_BBDEV_EVENT_UNKNOWN ");
>
> These changes making use of the EVENT macros should be in a separate patch,
> as it doesn't look like they belong to this one.
>
@@ -273,7 +273,7 @@ test_bbdev_configure_stop_queue(void)
/* Valid queue configuration */
ts_params->qconf.queue_size = info.drv.queue_size_lim;
- ts_params->qconf.priority = info.drv.max_queue_priority;
+ ts_params->qconf.priority = info.drv.max_ul_queue_priority;
/* Device - started; queue - started */
rte_bbdev_start(dev_id);
@@ -413,14 +413,7 @@ test_bbdev_configure_invalid_queue_configure(void)
ts_params->qconf.queue_size);
ts_params->qconf.queue_size = info.drv.queue_size_lim;
- ts_params->qconf.priority = info.drv.max_queue_priority + 1;
- TEST_ASSERT_FAIL(rte_bbdev_queue_configure(dev_id, queue_id,
- &ts_params->qconf),
- "Failed test for rte_bbdev_queue_configure: "
- "invalid value qconf.queue_size: %u",
- ts_params->qconf.queue_size);
-
- ts_params->qconf.priority = info.drv.max_queue_priority;
+ ts_params->qconf.priority = info.drv.max_ul_queue_priority;
queue_id = info.num_queues;
TEST_ASSERT_FAIL(rte_bbdev_queue_configure(dev_id, queue_id,
&ts_params->qconf),
@@ -902,12 +895,12 @@ test_bbdev_callback(void)
"Failed to callback rgstr for RTE_BBDEV_EVENT_UNKNOWN");
rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_UNKNOWN, NULL);
- TEST_ASSERT(event_status == 0,
+ TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
"Failed test for rte_bbdev_pmd_callback_process "
"for RTE_BBDEV_EVENT_UNKNOWN ");
rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_ERROR, NULL);
- TEST_ASSERT(event_status == 0,
+ TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
"Failed test for rte_bbdev_pmd_callback_process: "
"event RTE_BBDEV_EVENT_ERROR was not registered ");
@@ -926,12 +919,12 @@ test_bbdev_callback(void)
event_status = -1;
rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_UNKNOWN, NULL);
- TEST_ASSERT(event_status == 0,
+ TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
"Failed test for rte_bbdev_pmd_callback_process "
"for RTE_BBDEV_EVENT_UNKNOWN ");
rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_ERROR, NULL);
- TEST_ASSERT(event_status == 1,
+ TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_ERROR,
"Failed test for rte_bbdev_pmd_callback_process "
"for RTE_BBDEV_EVENT_ERROR ");
@@ -945,12 +938,12 @@ test_bbdev_callback(void)
event_status = -1;
rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_UNKNOWN, NULL);
- TEST_ASSERT(event_status == 0,
+ TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
"Failed test for rte_bbdev_pmd_callback_process "
"for RTE_BBDEV_EVENT_UNKNOWN ");
rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_ERROR, NULL);
- TEST_ASSERT(event_status == 0,
+ TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
"Failed test for rte_bbdev_pmd_callback_process: "
"event RTE_BBDEV_EVENT_ERROR was unregistered ");
@@ -999,7 +992,7 @@ test_bbdev_callback(void)
"for RTE_BBDEV_EVENT_ERROR ");
rte_bbdev_pmd_callback_process(dev2, RTE_BBDEV_EVENT_ERROR, NULL);
- TEST_ASSERT(event_status == 1,
+ TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_ERROR,
"Failed test for rte_bbdev_pmd_callback_process in dev2 "
"for RTE_BBDEV_EVENT_ERROR ");
@@ -1013,7 +1006,7 @@ test_bbdev_callback(void)
"in dev 2 ");
rte_bbdev_pmd_callback_process(dev2, RTE_BBDEV_EVENT_UNKNOWN, NULL);
- TEST_ASSERT(event_status == 0,
+ TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
"Failed test for rte_bbdev_pmd_callback_process in dev2"
" for RTE_BBDEV_EVENT_UNKNOWN ");
@@ -1033,7 +1026,7 @@ test_bbdev_callback(void)
" for RTE_BBDEV_EVENT_UNKNOWN ");
rte_bbdev_pmd_callback_process(dev1, RTE_BBDEV_EVENT_UNKNOWN, NULL);
- TEST_ASSERT(event_status == 0,
+ TEST_ASSERT(event_status == (int) RTE_BBDEV_EVENT_UNKNOWN,
"Failed test for rte_bbdev_pmd_callback_process in dev2 "
"for RTE_BBDEV_EVENT_UNKNOWN ");
@@ -71,7 +71,8 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
dev_info->max_num_queues = internals->max_nb_queues;
dev_info->queue_size_lim = RTE_BBDEV_QUEUE_SIZE_LIMIT;
dev_info->hardware_accelerated = false;
- dev_info->max_queue_priority = 0;
+ dev_info->max_dl_queue_priority = 0;
+ dev_info->max_ul_queue_priority = 0;
dev_info->default_queue_conf = default_queue_conf;
dev_info->capabilities = bbdev_capabilities;
dev_info->cpu_flag_reqs = NULL;
@@ -169,7 +169,8 @@ info_get(struct rte_bbdev *dev, struct rte_bbdev_driver_info *dev_info)
dev_info->max_num_queues = internals->max_nb_queues;
dev_info->queue_size_lim = RTE_BBDEV_QUEUE_SIZE_LIMIT;
dev_info->hardware_accelerated = false;
- dev_info->max_queue_priority = 0;
+ dev_info->max_dl_queue_priority = 0;
+ dev_info->max_ul_queue_priority = 0;
dev_info->default_queue_conf = default_queue_conf;
dev_info->capabilities = bbdev_capabilities;
dev_info->cpu_flag_reqs = &cpu_flag;
@@ -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;
}
}
@@ -283,8 +283,10 @@ struct rte_bbdev_driver_info {
uint32_t queue_size_lim;
/** Set if device off-loads operation to hardware */
bool hardware_accelerated;
- /** Max value supported by queue priority */
- uint8_t max_queue_priority;
+ /** Max value supported by queue priority for DL */
+ uint8_t max_dl_queue_priority;
+ /** Max value supported by queue priority for UL */
+ uint8_t max_ul_queue_priority;
/** Set if device supports per-queue interrupts */
bool queue_intr_supported;
/** Minimum alignment of buffers, in bytes */