From: Hernan Vargas <hernan.vargas@intel.com>
To: dev@dpdk.org, gakhil@marvell.com, trix@redhat.com,
maxime.coquelin@redhat.com
Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com,
Hernan Vargas <hernan.vargas@intel.com>
Subject: [PATCH v3 04/12] baseband/acc: configure max queues per device
Date: Wed, 9 Oct 2024 14:12:54 -0700 [thread overview]
Message-ID: <20241009211302.177471-5-hernan.vargas@intel.com> (raw)
In-Reply-To: <20241009211302.177471-1-hernan.vargas@intel.com>
Configure max_queues based on the number of queue groups and numbers of
AQS per device variant.
Signed-off-by: Hernan Vargas <hernan.vargas@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
---
drivers/baseband/acc/rte_vrb_pmd.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/baseband/acc/rte_vrb_pmd.c b/drivers/baseband/acc/rte_vrb_pmd.c
index 7e967ba97ac2..519385e82ed3 100644
--- a/drivers/baseband/acc/rte_vrb_pmd.c
+++ b/drivers/baseband/acc/rte_vrb_pmd.c
@@ -545,7 +545,7 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
uint32_t phys_low, phys_high, value;
struct acc_device *d = dev->data->dev_private;
uint16_t queues_per_op, i;
- int ret;
+ int ret, max_queues = 0;
if (d->pf_device && !d->acc_conf.pf_mode_en) {
rte_bbdev_log(NOTICE,
@@ -672,10 +672,15 @@ vrb_setup_queues(struct rte_bbdev *dev, uint16_t num_queues, int socket_id)
value = log2_basic(d->sw_ring_size / ACC_RING_SIZE_GRANULARITY);
acc_reg_write(d, d->reg_addr->ring_size, value);
+ if (d->device_variant == VRB1_VARIANT)
+ max_queues = VRB1_NUM_QGRPS * VRB1_NUM_AQS;
+ else if (d->device_variant == VRB2_VARIANT)
+ max_queues = VRB2_NUM_QGRPS * VRB2_NUM_AQS;
+
/* Configure tail pointer for use when SDONE enabled. */
if (d->tail_ptrs == NULL)
d->tail_ptrs = rte_zmalloc_socket(dev->device->driver->name,
- VRB_MAX_QGRPS * VRB_MAX_AQS * sizeof(uint32_t),
+ max_queues * sizeof(uint32_t),
RTE_CACHE_LINE_SIZE, socket_id);
if (d->tail_ptrs == NULL) {
rte_bbdev_log(ERR, "Failed to allocate tail ptr for %s:%u",
--
2.37.1
next prev parent reply other threads:[~2024-10-09 21:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 21:12 [PATCH v3 00/12] acc baseband PMD fix and updates for 24.11 Hernan Vargas
2024-10-09 21:12 ` [PATCH v3 01/12] baseband/acc: fix access to deallocated mem Hernan Vargas
2024-10-09 21:12 ` [PATCH v3 02/12] baseband/acc: fix soft output bypass RM Hernan Vargas
2024-10-14 9:47 ` Maxime Coquelin
2024-10-09 21:12 ` [PATCH v3 03/12] baseband/acc: queue allocation refactor Hernan Vargas
2024-10-14 9:49 ` Maxime Coquelin
2024-10-09 21:12 ` Hernan Vargas [this message]
2024-10-09 21:12 ` [PATCH v3 05/12] baseband/acc: future proof structure comparison Hernan Vargas
2024-10-09 21:12 ` [PATCH v3 06/12] baseband/acc: enhance SW ring alignment Hernan Vargas
2024-10-14 11:01 ` Maxime Coquelin
2024-10-09 21:12 ` [PATCH v3 07/12] baseband/acc: algorithm tuning for LDPC decoder Hernan Vargas
2024-10-09 21:12 ` [PATCH v3 08/12] baseband/acc: remove check on HARQ memory Hernan Vargas
2024-10-09 21:12 ` [PATCH v3 09/12] baseband/acc: reset ring data valid bit Hernan Vargas
2024-10-09 21:13 ` [PATCH v3 10/12] baseband/acc: cosmetic changes Hernan Vargas
2024-10-14 11:02 ` Maxime Coquelin
2024-10-09 21:13 ` [PATCH v3 11/12] baseband/acc: rte free refactor Hernan Vargas
2024-10-14 11:03 ` Maxime Coquelin
2024-10-09 21:13 ` [PATCH v3 12/12] baseband/acc: clean up of VRB1 capabilities Hernan Vargas
2024-10-14 11:04 ` Maxime Coquelin
2024-10-14 11:43 ` [PATCH v3 00/12] acc baseband PMD fix and updates for 24.11 Maxime Coquelin
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=20241009211302.177471-5-hernan.vargas@intel.com \
--to=hernan.vargas@intel.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=maxime.coquelin@redhat.com \
--cc=nicolas.chautru@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=trix@redhat.com \
/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).