[10/28] raw/cnxk_bphy: add support for reading queue configuration

Message ID 20210531214142.30167-11-tduszynski@marvell.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series add support for baseband phy |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Tomasz Duszynski May 31, 2021, 9:41 p.m. UTC
  Add support for reading queue configuration. Single queue represents
a logical mac available on rpm/cgx.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Signed-off-by: Jakub Palider <jpalider@marvell.com>
---
 drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
  

Patch

diff --git a/drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c b/drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c
index e537888f9..016f9f02c 100644
--- a/drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c
+++ b/drivers/raw/cnxk_bphy/cnxk_bphy_cgx.c
@@ -27,7 +27,27 @@  cnxk_bphy_cgx_format_name(char *name, unsigned int len,
 		 pci_dev->addr.devid, pci_dev->addr.function);
 }
 
+static int
+cnxk_bphy_cgx_queue_def_conf(struct rte_rawdev *dev, uint16_t queue_id,
+			     rte_rawdev_obj_t queue_conf,
+			     size_t queue_conf_size)
+{
+	unsigned int *conf;
+
+	RTE_SET_USED(dev);
+	RTE_SET_USED(queue_id);
+
+	if (queue_conf_size != sizeof(*conf))
+		return -EINVAL;
+
+	conf = (unsigned int *)queue_conf;
+	*conf = 1;
+
+	return 0;
+}
+
 static const struct rte_rawdev_ops cnxk_bphy_cgx_rawdev_ops = {
+	.queue_def_conf = cnxk_bphy_cgx_queue_def_conf,
 };
 
 static void