From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 68F5A56A1 for ; Wed, 9 May 2018 16:35:32 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2018 07:35:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,381,1520924400"; d="scan'208";a="53730764" Received: from kchalupx-mobl.ger.corp.intel.com ([10.103.104.151]) by fmsmga001.fm.intel.com with ESMTP; 09 May 2018 07:35:27 -0700 From: Kamil Chalupnik To: dev@dpdk.org Cc: amr.mokhtar@intel.com, pablo.de.lara.guarch@intel.com, KamilX Chalupnik Date: Wed, 9 May 2018 16:35:03 +0200 Message-Id: <20180509143503.22908-1-kamilx.chalupnik@intel.com> X-Mailer: git-send-email 2.9.0.windows.1 In-Reply-To: <20180426133008.12388-12-kamilx.chalupnik@intel.com> References: <20180426133008.12388-12-kamilx.chalupnik@intel.com> Subject: [dpdk-dev] [PATCH v2 08/14] bbdev: split queue groups X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 14:35:32 -0000 From: KamilX Chalupnik Splitting Queue Groups into UL/DL Groups in Turbo Software Driver. They are independent for Decode/Encode. Release note updated accordingly. Signed-off-by: Kamil Chalupnik --- app/test-bbdev/test_bbdev.c | 11 ++--------- doc/guides/rel_notes/release_18_05.rst | 6 ++++++ 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 ++++-- 6 files changed, 27 insertions(+), 15 deletions(-) diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c index 10579ea..5d325b6 100644 --- a/app/test-bbdev/test_bbdev.c +++ b/app/test-bbdev/test_bbdev.c @@ -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), diff --git a/doc/guides/rel_notes/release_18_05.rst b/doc/guides/rel_notes/release_18_05.rst index 427ce6d..86b669c 100644 --- a/doc/guides/rel_notes/release_18_05.rst +++ b/doc/guides/rel_notes/release_18_05.rst @@ -75,6 +75,12 @@ ABI Changes ``rte_bbdev_op_cap_turbo_dec`` structure to specify maximal LLR (likelihood ratio) absolute value. +* **Queue Groups split into UL/DL Groups** + + Queue Groups have been split into UL/DL Groups in Turbo Software Driver. + They are independent for Decode/Encode. ``rte_bbdev_driver_info`` reflects + introduced changes. + Removed Items ------------- diff --git a/drivers/baseband/null/bbdev_null.c b/drivers/baseband/null/bbdev_null.c index 6bc8491..e8e541f 100644 --- a/drivers/baseband/null/bbdev_null.c +++ b/drivers/baseband/null/bbdev_null.c @@ -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; diff --git a/drivers/baseband/turbo_sw/bbdev_turbo_software.c b/drivers/baseband/turbo_sw/bbdev_turbo_software.c index bbb4e40..696addf 100644 --- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c +++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c @@ -175,7 +175,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; diff --git a/lib/librte_bbdev/rte_bbdev.c b/lib/librte_bbdev/rte_bbdev.c index 74ecc49..28434e0 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; } } diff --git a/lib/librte_bbdev/rte_bbdev.h b/lib/librte_bbdev/rte_bbdev.h index bdcd1d0..6693de2 100644 --- a/lib/librte_bbdev/rte_bbdev.h +++ b/lib/librte_bbdev/rte_bbdev.h @@ -281,8 +281,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 */ -- 2.5.5