Thread (104 messages) 104 messages, 3 authors, 2021-07-05

[dpdk-dev] [PATCH 11/28] raw/cnxk_bphy: add support for reading queue count

From: Tomasz Duszynski <hidden>
Date: 2021-05-31 21:43:05
Subsystem: the rest · Maintainer: Linus Torvalds

Add support for reading number of available queues i.e number
of available logical macs (LMACs).

Signed-off-by: Tomasz Duszynski <redacted>
Signed-off-by: Jakub Palider <redacted>
---
 drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c | 9 +++++++++
 1 file changed, 9 insertions(+)
diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c b/drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c
index 016f9f02c..da4372642 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c
@@ -46,8 +46,17 @@ cnxk_bphy_cgx_queue_def_conf(struct rte_rawdev *dev, uint16_t queue_id,
 	return 0;
 }
 
+static uint16_t
+cnxk_bphy_cgx_queue_count(struct rte_rawdev *dev)
+{
+	struct cnxk_bphy_cgx *cgx = dev->dev_private;
+
+	return cgx->num_queues;
+}
+
 static const struct rte_rawdev_ops cnxk_bphy_cgx_rawdev_ops = {
 	.queue_def_conf = cnxk_bphy_cgx_queue_def_conf,
+	.queue_count = cnxk_bphy_cgx_queue_count,
 };
 
 static void
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help