]> git.droids-corp.org - dpdk.git/commitdiff
raw/cnxk_gpio: read default queue configuration
authorTomasz Duszynski <tduszynski@marvell.com>
Thu, 17 Feb 2022 11:09:15 +0000 (12:09 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 18 Feb 2022 11:54:45 +0000 (12:54 +0100)
Add support for reading default queue configuration.

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

index 61069b218505d0fe0e464677a72a56b1be7b4d23..1f36f6e22c12b75256884337f71a8765e2fd3ee6 100644 (file)
@@ -146,8 +146,27 @@ cnxk_gpio_dev_close(struct rte_rawdev *dev)
        return 0;
 }
 
+static int
+cnxk_gpio_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_gpio_rawdev_ops = {
        .dev_close = cnxk_gpio_dev_close,
+       .queue_def_conf = cnxk_gpio_queue_def_conf,
 };
 
 static int