[dpdk-dev,2/8] bus/fslmc: support scanning and probing of QDMA devices

Message ID 1523114224-9852-3-git-send-email-nipun.gupta@nxp.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail apply issues

Commit Message

Nipun Gupta April 7, 2018, 3:16 p.m. UTC
  Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
---
 drivers/bus/fslmc/fslmc_bus.c  | 2 ++
 drivers/bus/fslmc/fslmc_vfio.c | 1 +
 drivers/bus/fslmc/rte_fslmc.h  | 2 ++
 3 files changed, 5 insertions(+)
  

Comments

Shreyansh Jain April 16, 2018, 11:58 a.m. UTC | #1
On Saturday 07 April 2018 08:46 PM, Nipun Gupta wrote:
> Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com>
> ---
>   drivers/bus/fslmc/fslmc_bus.c  | 2 ++
>   drivers/bus/fslmc/fslmc_vfio.c | 1 +
>   drivers/bus/fslmc/rte_fslmc.h  | 2 ++
>   3 files changed, 5 insertions(+)
> 

[...]
Can you please explain, in the commit message, the relation between 
'DPDMAI' and 'QDMA' devices? Your patch has both these tokens.

> diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h
> index 69d0fec..a454ef5 100644
> --- a/drivers/bus/fslmc/rte_fslmc.h
> +++ b/drivers/bus/fslmc/rte_fslmc.h
> @@ -61,6 +61,7 @@ enum rte_dpaa2_dev_type {
>   	DPAA2_IO,	/**< DPIO type device */
>   	DPAA2_CI,	/**< DPCI type device */
>   	DPAA2_MPORTAL,  /**< DPMCP type device */
> +	DPAA2_QDMA,     /**< DPDMAI type device */
>   	/* Unknown device placeholder */
>   	DPAA2_UNKNOWN,
>   	DPAA2_DEVTYPE_MAX,
> @@ -91,6 +92,7 @@ struct rte_dpaa2_device {
>   	union {
>   		struct rte_eth_dev *eth_dev;        /**< ethernet device */
>   		struct rte_cryptodev *cryptodev;    /**< Crypto Device */
> +		struct rte_rawdev *rawdev;          /**< DPAA2 raw Device */
                                                 /'''''''^^^^^^
                     just a 'Raw device' please./

>   	};
>   	enum rte_dpaa2_dev_type dev_type;   /**< Device Type */
>   	uint16_t object_id;                 /**< DPAA2 Object ID */
> 

Just the trivial issues noted above and after rebasing on master, please 
use:

Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
  

Patch

diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index d6806df..cd27630 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -164,6 +164,8 @@ 
 		dev->dev_type = DPAA2_CI;
 	else if (!strncmp("dpmcp", t_ptr, 5))
 		dev->dev_type = DPAA2_MPORTAL;
+	else if (!strncmp("dpdmai", t_ptr, 6))
+		dev->dev_type = DPAA2_QDMA;
 	else
 		dev->dev_type = DPAA2_UNKNOWN;
 
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 62499de..6708ad8 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -554,6 +554,7 @@  int rte_dpaa2_intr_disable(struct rte_intr_handle *intr_handle, int index)
 		switch (dev->dev_type) {
 		case DPAA2_ETH:
 		case DPAA2_CRYPTO:
+		case DPAA2_QDMA:
 			ret = fslmc_process_iodevices(dev);
 			if (ret) {
 				DPAA2_BUS_DEBUG("Dev (%s) init failed",
diff --git a/drivers/bus/fslmc/rte_fslmc.h b/drivers/bus/fslmc/rte_fslmc.h
index 69d0fec..a454ef5 100644
--- a/drivers/bus/fslmc/rte_fslmc.h
+++ b/drivers/bus/fslmc/rte_fslmc.h
@@ -61,6 +61,7 @@  enum rte_dpaa2_dev_type {
 	DPAA2_IO,	/**< DPIO type device */
 	DPAA2_CI,	/**< DPCI type device */
 	DPAA2_MPORTAL,  /**< DPMCP type device */
+	DPAA2_QDMA,     /**< DPDMAI type device */
 	/* Unknown device placeholder */
 	DPAA2_UNKNOWN,
 	DPAA2_DEVTYPE_MAX,
@@ -91,6 +92,7 @@  struct rte_dpaa2_device {
 	union {
 		struct rte_eth_dev *eth_dev;        /**< ethernet device */
 		struct rte_cryptodev *cryptodev;    /**< Crypto Device */
+		struct rte_rawdev *rawdev;          /**< DPAA2 raw Device */
 	};
 	enum rte_dpaa2_dev_type dev_type;   /**< Device Type */
 	uint16_t object_id;                 /**< DPAA2 Object ID */