DPDK patches and discussions
 help / color / mirror / Atom feed
From: KamilX Chalupnik <kamilx.chalupnik@intel.com>
To: dev@dpdk.org
Cc: amr.mokhtar@intel.com, KamilX Chalupnik <kamilx.chalupnik@intel.com>
Subject: [dpdk-dev] [PATCH v2] baseband/turbo_sw: splitting Queue Groups
Date: Tue, 17 Apr 2018 16:39:53 +0200	[thread overview]
Message-ID: <20180417143953.22356-1-kamilx.chalupnik@intel.com> (raw)
In-Reply-To: <20180404140602.9344-4-kamilx.chalupnik@intel.com>

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(-)

diff --git a/app/test-bbdev/test_bbdev.c b/app/test-bbdev/test_bbdev.c
index 10579ea..a914817 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),
@@ -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 ");
 
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 8c41ed5..de78e23 100644
--- a/drivers/baseband/turbo_sw/bbdev_turbo_software.c
+++ b/drivers/baseband/turbo_sw/bbdev_turbo_software.c
@@ -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;
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 395acf6..dd3b0be 100644
--- a/lib/librte_bbdev/rte_bbdev.h
+++ b/lib/librte_bbdev/rte_bbdev.h
@@ -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 */
-- 
2.5.5

--------------------------------------------------------------
Intel Research and Development Ireland Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263


This e-mail and any attachments may contain confidential material for the sole
use of the intended recipient(s). Any review or distribution by others is
strictly prohibited. If you are not the intended recipient, please contact the
sender and delete all copies.

  parent reply	other threads:[~2018-04-17 14:41 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-04 14:05 [dpdk-dev] [PATCH] doc: update bbdev library documentation KamilX Chalupnik
2018-04-04 14:05 ` [dpdk-dev] [PATCH] baseband/turbo_sw: offload cost measurement test KamilX Chalupnik
2018-04-13 23:18   ` Mokhtar, Amr
2018-04-13 23:37   ` Mokhtar, Amr
2018-04-17 14:27   ` [dpdk-dev] [PATCH v2] " KamilX Chalupnik
2018-04-17 16:50     ` Mokhtar, Amr
2018-04-24 17:44     ` De Lara Guarch, Pablo
2018-04-24 19:09       ` Mokhtar, Amr
2018-04-25  7:45         ` De Lara Guarch, Pablo
2018-04-04 14:05 ` [dpdk-dev] [PATCH] baseband/turbo_sw: optimization of turbo software driver KamilX Chalupnik
2018-04-13 19:56   ` Mokhtar, Amr
2018-04-17 14:34   ` [dpdk-dev] [PATCH v2] " KamilX Chalupnik
2018-04-17 16:55     ` Mokhtar, Amr
2018-04-24 17:53     ` De Lara Guarch, Pablo
     [not found]       ` <EEA9FF629BF25B47BD67ADE995041EE23CF5C650@IRSMSX103.ger.corp.intel.com>
2018-04-25 10:00         ` De Lara Guarch, Pablo
2018-04-04 14:05 ` [dpdk-dev] [PATCH] baseband/turbo_sw: splitting Queue Groups KamilX Chalupnik
2018-04-13 23:19   ` Mokhtar, Amr
2018-04-17 14:39   ` KamilX Chalupnik [this message]
2018-04-17 16:55     ` [dpdk-dev] [PATCH v2] " Mokhtar, Amr
2018-04-24 15:30     ` De Lara Guarch, Pablo
2018-04-24 17:20       ` De Lara Guarch, Pablo
2018-04-04 14:05 ` [dpdk-dev] [PATCH] baseband/turbo_sw: update Turbo Software driver KamilX Chalupnik
2018-04-13 19:58   ` Mokhtar, Amr
2018-04-17 14:43   ` [dpdk-dev] [PATCH v2] " KamilX Chalupnik
2018-04-17 16:56     ` Mokhtar, Amr
2018-04-19 14:31       ` De Lara Guarch, Pablo
2018-04-24 17:55     ` De Lara Guarch, Pablo
2018-04-24 18:53       ` Mokhtar, Amr
2018-04-25  7:37         ` De Lara Guarch, Pablo
2018-04-04 14:06 ` [dpdk-dev] [PATCH] app/bbdev: remove improper WARNING printouts KamilX Chalupnik
2018-04-13 23:20   ` Mokhtar, Amr
2018-04-18  9:26   ` [dpdk-dev] [PATCH v2] " KamilX Chalupnik
2018-04-18 14:16     ` Mokhtar, Amr
2018-04-24 14:10     ` De Lara Guarch, Pablo
2018-04-04 14:06 ` [dpdk-dev] [PATCH] app/bbdev: update test vectors KamilX Chalupnik
2018-04-13 23:22   ` Mokhtar, Amr
2018-04-24 14:56   ` De Lara Guarch, Pablo
2018-04-24 15:41     ` Mokhtar, Amr
2018-04-04 14:06 ` [dpdk-dev] [PATCH] app/bbdev: dynamic lib support KamilX Chalupnik
2018-04-17 17:01   ` Mokhtar, Amr
2018-04-24 14:18   ` De Lara Guarch, Pablo
     [not found]     ` <EEA9FF629BF25B47BD67ADE995041EE23CF5B5C4@IRSMSX103.ger.corp.intel.com>
2018-04-25 16:10       ` De Lara Guarch, Pablo
     [not found]         ` <EEA9FF629BF25B47BD67ADE995041EE23CF5DBFE@IRSMSX103.ger.corp.intel.com>
2018-04-26  9:47           ` De Lara Guarch, Pablo
2018-04-26 11:28           ` De Lara Guarch, Pablo
     [not found]             ` <EEA9FF629BF25B47BD67ADE995041EE23CF5DD78@IRSMSX103.ger.corp.intel.com>
2018-04-26 13:22               ` De Lara Guarch, Pablo
     [not found]                 ` <EEA9FF629BF25B47BD67ADE995041EE23CF5DE21@IRSMSX103.ger.corp.intel.com>
2018-04-26 14:29                   ` De Lara Guarch, Pablo
2018-04-13 19:30 ` [dpdk-dev] [PATCH] doc: update bbdev library documentation Mokhtar, Amr
2018-04-19 14:29   ` De Lara Guarch, Pablo
2018-04-22 20:17 ` Thomas Monjalon
2018-04-23 10:24   ` De Lara Guarch, Pablo
2018-04-23 10:56   ` Mokhtar, Amr
2018-04-23 11:12     ` Thomas Monjalon
2018-04-23 12:15       ` Mokhtar, Amr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180417143953.22356-1-kamilx.chalupnik@intel.com \
    --to=kamilx.chalupnik@intel.com \
    --cc=amr.mokhtar@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).