]> git.droids-corp.org - dpdk.git/commitdiff
raw/cnxk_gpio: read queue count
authorTomasz Duszynski <tduszynski@marvell.com>
Thu, 17 Feb 2022 11:09:16 +0000 (12:09 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 18 Feb 2022 11:54:45 +0000 (12:54 +0100)
Add support for reading number of available queues. Single queue
corresponds to GPIO.

Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
drivers/raw/cnxk_gpio/cnxk_gpio.c

index 1f36f6e22c12b75256884337f71a8765e2fd3ee6..cee75e389aea38212c0651a0eb0315ff9bc2764d 100644 (file)
@@ -164,9 +164,18 @@ cnxk_gpio_queue_def_conf(struct rte_rawdev *dev, uint16_t queue_id,
        return 0;
 }
 
+static uint16_t
+cnxk_gpio_queue_count(struct rte_rawdev *dev)
+{
+       struct cnxk_gpiochip *gpiochip = dev->dev_private;
+
+       return gpiochip->num_gpios;
+}
+
 static const struct rte_rawdev_ops cnxk_gpio_rawdev_ops = {
        .dev_close = cnxk_gpio_dev_close,
        .queue_def_conf = cnxk_gpio_queue_def_conf,
+       .queue_count = cnxk_gpio_queue_count,
 };
 
 static int