diff mbox series

[v3,24/32] raw/cnxk_bphy: support for reading bphy queue configuration

Message ID 20210621150449.19070-25-tduszynski@marvell.com (mailing list archive)
State Accepted
Delegated to: Thomas Monjalon
Headers show
Series add support for baseband phy | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tomasz Duszynski June 21, 2021, 3:04 p.m. UTC
Add support for reading baseband phy queue configuration.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
---
 drivers/raw/cnxk_bphy/cnxk_bphy.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
diff mbox series

Patch

diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy.c b/drivers/raw/cnxk_bphy/cnxk_bphy.c
index cd26b9717..00b6c5035 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy.c
@@ -29,7 +29,24 @@  bphy_rawdev_get_name(char *name, struct rte_pci_device *pci_dev)
 		 pci_dev->addr.function);
 }
 
+static int
+cnxk_bphy_irq_queue_def_conf(struct rte_rawdev *dev, uint16_t queue_id,
+			     rte_rawdev_obj_t queue_conf,
+			     size_t queue_conf_size)
+{
+	RTE_SET_USED(dev);
+	RTE_SET_USED(queue_id);
+
+	if (queue_conf_size != sizeof(unsigned int))
+		return -EINVAL;
+
+	*(unsigned int *)queue_conf = 1;
+
+	return 0;
+}
+
 static const struct rte_rawdev_ops bphy_rawdev_ops = {
+	.queue_def_conf = cnxk_bphy_irq_queue_def_conf,
 };
 
 static int