DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] Update FSLMC bus firmware
@ 2019-04-03 14:23 Shreyansh Jain
  2019-04-03 14:23 ` Shreyansh Jain
                   ` (4 more replies)
  0 siblings, 5 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-03 14:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

Based on net-next: 69f805ac18abe

All the patches are strictly within DPAA2/FSLMC driver area.

MC firmware is the core component of FSLMC bus which enables
all the dpaa2 devices (eth, crypto etc).
With recent release of NXP's layerscape SDK, the MC firmware
has been bumped up. These patches updates only necessary
changes so as to maintain version compatibility.

Shreyansh Jain (3):
  bus/fslmc: cleanup unused firmware code
  drivers: update MC firmware version for FSLMC bus
  doc: bump SDK support version for dpaa2

 doc/guides/nics/dpaa2.rst           |  4 +-
 drivers/bus/fslmc/mc/dpci.c         | 75 --------------------------
 drivers/bus/fslmc/mc/dpcon.c        | 30 -----------
 drivers/bus/fslmc/mc/fsl_dpci.h     | 21 --------
 drivers/bus/fslmc/mc/fsl_dpcon.h    | 19 -------
 drivers/bus/fslmc/mc/fsl_dpmng.h    |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c    |  1 +
 drivers/net/dpaa2/mc/dpni.c         | 15 +++++-
 drivers/net/dpaa2/mc/fsl_dpni.h     | 84 ++++++++++++++++++++++-------
 drivers/net/dpaa2/mc/fsl_dpni_cmd.h | 40 ++++++++++----
 10 files changed, 112 insertions(+), 179 deletions(-)

-- 
2.19.1

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH 0/3] Update FSLMC bus firmware
  2019-04-03 14:23 [dpdk-dev] [PATCH 0/3] Update FSLMC bus firmware Shreyansh Jain
@ 2019-04-03 14:23 ` Shreyansh Jain
  2019-04-03 14:23 ` [dpdk-dev] [PATCH 1/3] bus/fslmc: cleanup unused firmware code Shreyansh Jain
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-03 14:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

Based on net-next: 69f805ac18abe

All the patches are strictly within DPAA2/FSLMC driver area.

MC firmware is the core component of FSLMC bus which enables
all the dpaa2 devices (eth, crypto etc).
With recent release of NXP's layerscape SDK, the MC firmware
has been bumped up. These patches updates only necessary
changes so as to maintain version compatibility.

Shreyansh Jain (3):
  bus/fslmc: cleanup unused firmware code
  drivers: update MC firmware version for FSLMC bus
  doc: bump SDK support version for dpaa2

 doc/guides/nics/dpaa2.rst           |  4 +-
 drivers/bus/fslmc/mc/dpci.c         | 75 --------------------------
 drivers/bus/fslmc/mc/dpcon.c        | 30 -----------
 drivers/bus/fslmc/mc/fsl_dpci.h     | 21 --------
 drivers/bus/fslmc/mc/fsl_dpcon.h    | 19 -------
 drivers/bus/fslmc/mc/fsl_dpmng.h    |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c    |  1 +
 drivers/net/dpaa2/mc/dpni.c         | 15 +++++-
 drivers/net/dpaa2/mc/fsl_dpni.h     | 84 ++++++++++++++++++++++-------
 drivers/net/dpaa2/mc/fsl_dpni_cmd.h | 40 ++++++++++----
 10 files changed, 112 insertions(+), 179 deletions(-)

-- 
2.19.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-03 14:23 [dpdk-dev] [PATCH 0/3] Update FSLMC bus firmware Shreyansh Jain
  2019-04-03 14:23 ` Shreyansh Jain
@ 2019-04-03 14:23 ` Shreyansh Jain
  2019-04-03 14:23   ` Shreyansh Jain
  2019-04-03 14:23 ` [dpdk-dev] [PATCH 2/3] drivers: update MC firmware version for FSLMC bus Shreyansh Jain
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-03 14:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

Removes some unused firmware code which was added in last bump
of the firmware version. No current features uses these APIs.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/bus/fslmc/mc/dpci.c      | 75 --------------------------------
 drivers/bus/fslmc/mc/dpcon.c     | 30 -------------
 drivers/bus/fslmc/mc/fsl_dpci.h  | 21 ---------
 drivers/bus/fslmc/mc/fsl_dpcon.h | 19 --------
 4 files changed, 145 deletions(-)

diff --git a/drivers/bus/fslmc/mc/dpci.c b/drivers/bus/fslmc/mc/dpci.c
index 95edae9d9..2874a6196 100644
--- a/drivers/bus/fslmc/mc/dpci.c
+++ b/drivers/bus/fslmc/mc/dpci.c
@@ -301,81 +301,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
 	return 0;
 }
 
-/**
- * dpci_get_peer_attributes() - Retrieve peer DPCI attributes.
- * @mc_io:	Pointer to MC portal's I/O object
- * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:	Token of DPCI object
- * @attr:	Returned peer attributes
- *
- * Return:	'0' on Success; Error code otherwise.
- */
-int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
-			     uint32_t cmd_flags,
-			     uint16_t token,
-			     struct dpci_peer_attr *attr)
-{
-	struct dpci_rsp_get_peer_attr *rsp_params;
-	struct mc_command cmd = { 0 };
-	int err;
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_PEER_ATTR,
-					  cmd_flags,
-					  token);
-
-	/* send command to mc*/
-	err = mc_send_command(mc_io, &cmd);
-	if (err)
-		return err;
-
-	/* retrieve response parameters */
-	rsp_params = (struct dpci_rsp_get_peer_attr *)cmd.params;
-	attr->peer_id = le32_to_cpu(rsp_params->id);
-	attr->num_of_priorities = rsp_params->num_of_priorities;
-
-	return 0;
-}
-
-/**
- * dpci_get_link_state() - Retrieve the DPCI link state.
- * @mc_io:	Pointer to MC portal's I/O object
- * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:	Token of DPCI object
- * @up:		Returned link state; returns '1' if link is up, '0' otherwise
- *
- * DPCI can be connected to another DPCI, together they
- * create a 'link'. In order to use the DPCI Tx and Rx queues,
- * both objects must be enabled.
- *
- * Return:	'0' on Success; Error code otherwise.
- */
-int dpci_get_link_state(struct fsl_mc_io *mc_io,
-			uint32_t cmd_flags,
-			uint16_t token,
-			int *up)
-{
-	struct dpci_rsp_get_link_state *rsp_params;
-	struct mc_command cmd = { 0 };
-	int err;
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_LINK_STATE,
-					  cmd_flags,
-					  token);
-
-	/* send command to mc*/
-	err = mc_send_command(mc_io, &cmd);
-	if (err)
-		return err;
-
-	/* retrieve response parameters */
-	rsp_params = (struct dpci_rsp_get_link_state *)cmd.params;
-	*up = dpci_get_field(rsp_params->up, UP);
-
-	return 0;
-}
-
 /**
  * dpci_set_rx_queue() - Set Rx queue configuration
  * @mc_io:	Pointer to MC portal's I/O object
diff --git a/drivers/bus/fslmc/mc/dpcon.c b/drivers/bus/fslmc/mc/dpcon.c
index 92bd26512..3f6e04b97 100644
--- a/drivers/bus/fslmc/mc/dpcon.c
+++ b/drivers/bus/fslmc/mc/dpcon.c
@@ -295,36 +295,6 @@ int dpcon_get_attributes(struct fsl_mc_io *mc_io,
 	return 0;
 }
 
-/**
- * dpcon_set_notification() - Set DPCON notification destination
- * @mc_io:	Pointer to MC portal's I/O object
- * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:	Token of DPCON object
- * @cfg:	Notification parameters
- *
- * Return:	'0' on Success; Error code otherwise
- */
-int dpcon_set_notification(struct fsl_mc_io *mc_io,
-			   uint32_t cmd_flags,
-			   uint16_t token,
-			   struct dpcon_notification_cfg *cfg)
-{
-	struct dpcon_cmd_set_notification *dpcon_cmd;
-	struct mc_command cmd = { 0 };
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPCON_CMDID_SET_NOTIFICATION,
-					  cmd_flags,
-					  token);
-	dpcon_cmd = (struct dpcon_cmd_set_notification *)cmd.params;
-	dpcon_cmd->dpio_id = cpu_to_le32(cfg->dpio_id);
-	dpcon_cmd->priority = cfg->priority;
-	dpcon_cmd->user_ctx = cpu_to_le64(cfg->user_ctx);
-
-	/* send command to mc*/
-	return mc_send_command(mc_io, &cmd);
-}
-
 /**
  * dpcon_get_api_version - Get Data Path Concentrator API version
  * @mc_io:	Pointer to MC portal's DPCON object
diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
index 9af9097e5..cf3d15267 100644
--- a/drivers/bus/fslmc/mc/fsl_dpci.h
+++ b/drivers/bus/fslmc/mc/fsl_dpci.h
@@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
 			uint16_t token,
 			struct dpci_attr *attr);
 
-/**
- * struct dpci_peer_attr - Structure representing the peer DPCI attributes
- * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
- * @num_of_priorities:	The pper's number of receive priorities; determines the
- *			number of transmit priorities for the local DPCI object
- */
-struct dpci_peer_attr {
-	int peer_id;
-	uint8_t num_of_priorities;
-};
-
-int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
-			     uint32_t cmd_flags,
-			     uint16_t token,
-			     struct dpci_peer_attr *attr);
-
-int dpci_get_link_state(struct fsl_mc_io *mc_io,
-			uint32_t cmd_flags,
-			uint16_t token,
-			int *up);
-
 /**
  * enum dpci_dest - DPCI destination types
  * @DPCI_DEST_NONE:	Unassigned destination; The queue is set in parked mode
diff --git a/drivers/bus/fslmc/mc/fsl_dpcon.h b/drivers/bus/fslmc/mc/fsl_dpcon.h
index fc0430dc1..36dd5f3c1 100644
--- a/drivers/bus/fslmc/mc/fsl_dpcon.h
+++ b/drivers/bus/fslmc/mc/fsl_dpcon.h
@@ -81,25 +81,6 @@ int dpcon_get_attributes(struct fsl_mc_io *mc_io,
 			 uint16_t token,
 			 struct dpcon_attr *attr);
 
-/**
- * struct dpcon_notification_cfg - Structure representing notification params
- * @dpio_id:	DPIO object ID; must be configured with a notification channel;
- *		to disable notifications set it to 'DPCON_INVALID_DPIO_ID';
- * @priority:	Priority selection within the DPIO channel; valid values
- *		are 0-7, depending on the number of priorities in that channel
- * @user_ctx:	User context value provided with each CDAN message
- */
-struct dpcon_notification_cfg {
-	int dpio_id;
-	uint8_t priority;
-	uint64_t user_ctx;
-};
-
-int dpcon_set_notification(struct fsl_mc_io *mc_io,
-			   uint32_t cmd_flags,
-			   uint16_t token,
-			   struct dpcon_notification_cfg *cfg);
-
 int dpcon_get_api_version(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
 			  uint16_t *major_ver,
-- 
2.19.1

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-03 14:23 ` [dpdk-dev] [PATCH 1/3] bus/fslmc: cleanup unused firmware code Shreyansh Jain
@ 2019-04-03 14:23   ` Shreyansh Jain
  0 siblings, 0 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-03 14:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

Removes some unused firmware code which was added in last bump
of the firmware version. No current features uses these APIs.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/bus/fslmc/mc/dpci.c      | 75 --------------------------------
 drivers/bus/fslmc/mc/dpcon.c     | 30 -------------
 drivers/bus/fslmc/mc/fsl_dpci.h  | 21 ---------
 drivers/bus/fslmc/mc/fsl_dpcon.h | 19 --------
 4 files changed, 145 deletions(-)

diff --git a/drivers/bus/fslmc/mc/dpci.c b/drivers/bus/fslmc/mc/dpci.c
index 95edae9d9..2874a6196 100644
--- a/drivers/bus/fslmc/mc/dpci.c
+++ b/drivers/bus/fslmc/mc/dpci.c
@@ -301,81 +301,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
 	return 0;
 }
 
-/**
- * dpci_get_peer_attributes() - Retrieve peer DPCI attributes.
- * @mc_io:	Pointer to MC portal's I/O object
- * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:	Token of DPCI object
- * @attr:	Returned peer attributes
- *
- * Return:	'0' on Success; Error code otherwise.
- */
-int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
-			     uint32_t cmd_flags,
-			     uint16_t token,
-			     struct dpci_peer_attr *attr)
-{
-	struct dpci_rsp_get_peer_attr *rsp_params;
-	struct mc_command cmd = { 0 };
-	int err;
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_PEER_ATTR,
-					  cmd_flags,
-					  token);
-
-	/* send command to mc*/
-	err = mc_send_command(mc_io, &cmd);
-	if (err)
-		return err;
-
-	/* retrieve response parameters */
-	rsp_params = (struct dpci_rsp_get_peer_attr *)cmd.params;
-	attr->peer_id = le32_to_cpu(rsp_params->id);
-	attr->num_of_priorities = rsp_params->num_of_priorities;
-
-	return 0;
-}
-
-/**
- * dpci_get_link_state() - Retrieve the DPCI link state.
- * @mc_io:	Pointer to MC portal's I/O object
- * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:	Token of DPCI object
- * @up:		Returned link state; returns '1' if link is up, '0' otherwise
- *
- * DPCI can be connected to another DPCI, together they
- * create a 'link'. In order to use the DPCI Tx and Rx queues,
- * both objects must be enabled.
- *
- * Return:	'0' on Success; Error code otherwise.
- */
-int dpci_get_link_state(struct fsl_mc_io *mc_io,
-			uint32_t cmd_flags,
-			uint16_t token,
-			int *up)
-{
-	struct dpci_rsp_get_link_state *rsp_params;
-	struct mc_command cmd = { 0 };
-	int err;
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_LINK_STATE,
-					  cmd_flags,
-					  token);
-
-	/* send command to mc*/
-	err = mc_send_command(mc_io, &cmd);
-	if (err)
-		return err;
-
-	/* retrieve response parameters */
-	rsp_params = (struct dpci_rsp_get_link_state *)cmd.params;
-	*up = dpci_get_field(rsp_params->up, UP);
-
-	return 0;
-}
-
 /**
  * dpci_set_rx_queue() - Set Rx queue configuration
  * @mc_io:	Pointer to MC portal's I/O object
diff --git a/drivers/bus/fslmc/mc/dpcon.c b/drivers/bus/fslmc/mc/dpcon.c
index 92bd26512..3f6e04b97 100644
--- a/drivers/bus/fslmc/mc/dpcon.c
+++ b/drivers/bus/fslmc/mc/dpcon.c
@@ -295,36 +295,6 @@ int dpcon_get_attributes(struct fsl_mc_io *mc_io,
 	return 0;
 }
 
-/**
- * dpcon_set_notification() - Set DPCON notification destination
- * @mc_io:	Pointer to MC portal's I/O object
- * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:	Token of DPCON object
- * @cfg:	Notification parameters
- *
- * Return:	'0' on Success; Error code otherwise
- */
-int dpcon_set_notification(struct fsl_mc_io *mc_io,
-			   uint32_t cmd_flags,
-			   uint16_t token,
-			   struct dpcon_notification_cfg *cfg)
-{
-	struct dpcon_cmd_set_notification *dpcon_cmd;
-	struct mc_command cmd = { 0 };
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPCON_CMDID_SET_NOTIFICATION,
-					  cmd_flags,
-					  token);
-	dpcon_cmd = (struct dpcon_cmd_set_notification *)cmd.params;
-	dpcon_cmd->dpio_id = cpu_to_le32(cfg->dpio_id);
-	dpcon_cmd->priority = cfg->priority;
-	dpcon_cmd->user_ctx = cpu_to_le64(cfg->user_ctx);
-
-	/* send command to mc*/
-	return mc_send_command(mc_io, &cmd);
-}
-
 /**
  * dpcon_get_api_version - Get Data Path Concentrator API version
  * @mc_io:	Pointer to MC portal's DPCON object
diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
index 9af9097e5..cf3d15267 100644
--- a/drivers/bus/fslmc/mc/fsl_dpci.h
+++ b/drivers/bus/fslmc/mc/fsl_dpci.h
@@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
 			uint16_t token,
 			struct dpci_attr *attr);
 
-/**
- * struct dpci_peer_attr - Structure representing the peer DPCI attributes
- * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
- * @num_of_priorities:	The pper's number of receive priorities; determines the
- *			number of transmit priorities for the local DPCI object
- */
-struct dpci_peer_attr {
-	int peer_id;
-	uint8_t num_of_priorities;
-};
-
-int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
-			     uint32_t cmd_flags,
-			     uint16_t token,
-			     struct dpci_peer_attr *attr);
-
-int dpci_get_link_state(struct fsl_mc_io *mc_io,
-			uint32_t cmd_flags,
-			uint16_t token,
-			int *up);
-
 /**
  * enum dpci_dest - DPCI destination types
  * @DPCI_DEST_NONE:	Unassigned destination; The queue is set in parked mode
diff --git a/drivers/bus/fslmc/mc/fsl_dpcon.h b/drivers/bus/fslmc/mc/fsl_dpcon.h
index fc0430dc1..36dd5f3c1 100644
--- a/drivers/bus/fslmc/mc/fsl_dpcon.h
+++ b/drivers/bus/fslmc/mc/fsl_dpcon.h
@@ -81,25 +81,6 @@ int dpcon_get_attributes(struct fsl_mc_io *mc_io,
 			 uint16_t token,
 			 struct dpcon_attr *attr);
 
-/**
- * struct dpcon_notification_cfg - Structure representing notification params
- * @dpio_id:	DPIO object ID; must be configured with a notification channel;
- *		to disable notifications set it to 'DPCON_INVALID_DPIO_ID';
- * @priority:	Priority selection within the DPIO channel; valid values
- *		are 0-7, depending on the number of priorities in that channel
- * @user_ctx:	User context value provided with each CDAN message
- */
-struct dpcon_notification_cfg {
-	int dpio_id;
-	uint8_t priority;
-	uint64_t user_ctx;
-};
-
-int dpcon_set_notification(struct fsl_mc_io *mc_io,
-			   uint32_t cmd_flags,
-			   uint16_t token,
-			   struct dpcon_notification_cfg *cfg);
-
 int dpcon_get_api_version(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
 			  uint16_t *major_ver,
-- 
2.19.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH 2/3] drivers: update MC firmware version for FSLMC bus
  2019-04-03 14:23 [dpdk-dev] [PATCH 0/3] Update FSLMC bus firmware Shreyansh Jain
  2019-04-03 14:23 ` Shreyansh Jain
  2019-04-03 14:23 ` [dpdk-dev] [PATCH 1/3] bus/fslmc: cleanup unused firmware code Shreyansh Jain
@ 2019-04-03 14:23 ` Shreyansh Jain
  2019-04-03 14:23   ` Shreyansh Jain
  2019-04-03 14:23 ` [dpdk-dev] [PATCH 3/3] doc: bump SDK support version for dpaa2 Shreyansh Jain
  2019-04-04  7:23 ` [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware Shreyansh Jain
  4 siblings, 1 reply; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-03 14:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

MC firmware is the core component of FSLMC bus and DPAA2 devices.
Prior to this patch, MC firmware supported 10.10.x version. This
patch bumps the min supported version to 10.14.x.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/mc/fsl_dpmng.h    |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c    |  1 +
 drivers/net/dpaa2/mc/dpni.c         | 15 +++++-
 drivers/net/dpaa2/mc/fsl_dpni.h     | 84 ++++++++++++++++++++++-------
 drivers/net/dpaa2/mc/fsl_dpni_cmd.h | 40 ++++++++++----
 5 files changed, 110 insertions(+), 32 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_dpmng.h b/drivers/bus/fslmc/mc/fsl_dpmng.h
index 8559bef87..bef2ef095 100644
--- a/drivers/bus/fslmc/mc/fsl_dpmng.h
+++ b/drivers/bus/fslmc/mc/fsl_dpmng.h
@@ -18,7 +18,7 @@ struct fsl_mc_io;
  * Management Complex firmware version information
  */
 #define MC_VER_MAJOR 10
-#define MC_VER_MINOR 10
+#define MC_VER_MINOR 14
 
 /**
  * struct mc_version
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 3fbc82977..98ef8a5f5 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -665,6 +665,7 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev,
 					 DPNI_CONG_OPT_WRITE_MEM_ON_ENTER |
 					 DPNI_CONG_OPT_WRITE_MEM_ON_EXIT |
 					 DPNI_CONG_OPT_COHERENT_WRITE;
+		cong_notif_cfg.cg_point = DPNI_CP_QUEUE;
 
 		ret = dpni_set_congestion_notification(dpni, CMD_PRI_LOW,
 						       priv->token,
diff --git a/drivers/net/dpaa2/mc/dpni.c b/drivers/net/dpaa2/mc/dpni.c
index 6c12a0ae1..d9feb1427 100644
--- a/drivers/net/dpaa2/mc/dpni.c
+++ b/drivers/net/dpaa2/mc/dpni.c
@@ -125,6 +125,7 @@ int dpni_create(struct fsl_mc_io *mc_io,
 	cmd_params->vlan_filter_entries =  cfg->vlan_filter_entries;
 	cmd_params->qos_entries = cfg->qos_entries;
 	cmd_params->fs_entries = cpu_to_le16(cfg->fs_entries);
+	cmd_params->num_cgs = cfg->num_cgs;
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -199,7 +200,7 @@ int dpni_set_pools(struct fsl_mc_io *mc_io,
 					  token);
 	cmd_params = (struct dpni_cmd_set_pools *)cmd.params;
 	cmd_params->num_dpbp = cfg->num_dpbp;
-	for (i = 0; i < cmd_params->num_dpbp; i++) {
+	for (i = 0; i < DPNI_MAX_DPBP; i++) {
 		cmd_params->pool[i].dpbp_id =
 			cpu_to_le16(cfg->pools[i].dpbp_id);
 		cmd_params->pool[i].priority_mask =
@@ -593,6 +594,7 @@ int dpni_get_attributes(struct fsl_mc_io *mc_io,
 	attr->qos_key_size = rsp_params->qos_key_size;
 	attr->fs_key_size = rsp_params->fs_key_size;
 	attr->wriop_version = le16_to_cpu(rsp_params->wriop_version);
+	attr->num_cgs = rsp_params->num_cgs;
 
 	return 0;
 }
@@ -1800,6 +1802,8 @@ int dpni_set_congestion_notification(struct fsl_mc_io *mc_io,
 	cmd_params = (struct dpni_cmd_set_congestion_notification *)cmd.params;
 	cmd_params->qtype = qtype;
 	cmd_params->tc = tc_id;
+	cmd_params->congestion_point = cfg->cg_point;
+	cmd_params->cgid = (uint8_t)cfg->cgid;
 	cmd_params->dest_id = cpu_to_le32(cfg->dest_cfg.dest_id);
 	cmd_params->notification_mode = cpu_to_le16(cfg->notification_mode);
 	cmd_params->dest_priority = cfg->dest_cfg.priority;
@@ -1850,6 +1854,8 @@ int dpni_get_congestion_notification(struct fsl_mc_io *mc_io,
 	cmd_params = (struct dpni_cmd_get_congestion_notification *)cmd.params;
 	cmd_params->qtype = qtype;
 	cmd_params->tc = tc_id;
+	cmd_params->congestion_point = cfg->cg_point;
+	cmd_params->cgid = cfg->cgid;
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -1949,6 +1955,7 @@ int dpni_set_queue(struct fsl_mc_io *mc_io,
 		       queue->destination.hold_active);
 	cmd_params->flc = cpu_to_le64(queue->flc.value);
 	cmd_params->user_context = cpu_to_le64(queue->user_context);
+	cmd_params->cgid = queue->cgid;
 
 	/* send command to mc */
 	return mc_send_command(mc_io, &cmd);
@@ -2010,6 +2017,10 @@ int dpni_get_queue(struct fsl_mc_io *mc_io,
 	queue->user_context = le64_to_cpu(rsp_params->user_context);
 	qid->fqid = le32_to_cpu(rsp_params->fqid);
 	qid->qdbin = le16_to_cpu(rsp_params->qdbin);
+	if (dpni_get_field(rsp_params->flags, CGID_VALID))
+		queue->cgid = rsp_params->cgid;
+	else
+		queue->cgid = -1;
 
 	return 0;
 }
@@ -2031,7 +2042,7 @@ int dpni_get_statistics(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
 			uint8_t page,
-			uint8_t param,
+			uint16_t param,
 			union dpni_statistics *stat)
 {
 	struct mc_command cmd = { 0 };
diff --git a/drivers/net/dpaa2/mc/fsl_dpni.h b/drivers/net/dpaa2/mc/fsl_dpni.h
index aecdc8d1f..8b1cfbac7 100644
--- a/drivers/net/dpaa2/mc/fsl_dpni.h
+++ b/drivers/net/dpaa2/mc/fsl_dpni.h
@@ -91,6 +91,10 @@ struct fsl_mc_io;
  * All Tx traffic classes will use a single sender (ignore num_queueus for tx)
  */
 #define DPNI_OPT_SINGLE_SENDER			0x000100
+/**
+ * Define a custom number of congestion groups
+ */
+#define DPNI_OPT_CUSTOM_CG				0x000200
 
 int dpni_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
@@ -172,6 +176,7 @@ struct dpni_cfg {
 	uint8_t  num_tcs;
 	uint8_t  num_rx_tcs;
 	uint8_t  qos_entries;
+	uint8_t  num_cgs;
 };
 
 int dpni_create(struct fsl_mc_io *mc_io,
@@ -326,6 +331,7 @@ struct dpni_attr {
 	uint8_t  qos_key_size;
 	uint8_t  fs_key_size;
 	uint16_t wriop_version;
+	uint8_t  num_cgs;
 };
 
 int dpni_get_attributes(struct fsl_mc_io *mc_io,
@@ -638,6 +644,36 @@ union dpni_statistics {
  */
 #define DPNI_LINK_OPT_PFC_PAUSE	0x0000000000000010ULL
 
+/**
+ * Advertise 10MB full duplex
+ */
+#define DPNI_ADVERTISED_10BASET_FULL           0x0000000000000001ULL
+/**
+ * Advertise 100MB full duplex
+ */
+#define DPNI_ADVERTISED_100BASET_FULL          0x0000000000000002ULL
+/**
+ * Advertise 1GB full duplex
+ */
+#define DPNI_ADVERTISED_1000BASET_FULL         0x0000000000000004ULL
+/**
+ * Advertise auto-negotiation enable
+ */
+#define DPNI_ADVERTISED_AUTONEG                0x0000000000000008ULL
+/**
+ * Advertise 10GB full duplex
+ */
+#define DPNI_ADVERTISED_10000BASET_FULL        0x0000000000000010ULL
+/**
+ * Advertise 2.5GB full duplex
+ */
+#define DPNI_ADVERTISED_2500BASEX_FULL         0x0000000000000020ULL
+/**
+ * Advertise 5GB full duplex
+ */
+#define DPNI_ADVERTISED_5000BASET_FULL         0x0000000000000040ULL
+
+
 /**
  * struct - Structure representing DPNI link configuration
  * @rate: Rate
@@ -668,7 +704,7 @@ struct dpni_link_state {
 	uint32_t rate;
 	uint64_t options;
 	int up;
-	int     state_valid;
+	int state_valid;
 	uint64_t supported;
 	uint64_t advertising;
 };
@@ -850,7 +886,6 @@ enum dpni_congestion_unit {
 	DPNI_CONGESTION_UNIT_FRAMES
 };
 
-
 /**
  * enum dpni_dest - DPNI destination types
  * @DPNI_DEST_NONE: Unassigned destination; The queue is set in parked mode and
@@ -924,6 +959,25 @@ struct dpni_dest_cfg {
  */
 #define DPNI_CONG_OPT_FLOW_CONTROL	0x00000040
 
+/**
+ * enum dpni_congestion_point - Structure representing congestion point
+ * @DPNI_CP_QUEUE:	Set congestion per queue, identified by QUEUE_TYPE, TC
+ *			and QUEUE_INDEX
+ * @DPNI_CP_GROUP:	Set congestion per queue group. Depending on options
+ *			used to define the DPNI this can be either per
+ *			TC (default) or per interface
+ *			(DPNI_OPT_SHARED_CONGESTION set at DPNI create).
+ *			QUEUE_INDEX is ignored if this type is used.
+ * @DPNI_CP_CONGESTION_GROUP: Set per congestion group id. This will work
+ *		only if the DPNI is created with  DPNI_OPT_CUSTOM_CG option
+ */
+
+enum dpni_congestion_point {
+	DPNI_CP_QUEUE,
+	DPNI_CP_GROUP,
+	DPNI_CP_CONGESTION_GROUP,
+};
+
 /**
  * struct dpni_congestion_notification_cfg - congestion notification
  *		configuration
@@ -937,6 +991,8 @@ struct dpni_dest_cfg {
  *	contained in 'options'
  * @dest_cfg: CSCN can be send to either DPIO or DPCON WQ channel
  * @notification_mode: Mask of available options; use 'DPNI_CONG_OPT_<X>' values
+ * @cg_point: Congestion point settings
+ * @cgid: id of the congestion group. The index is relative to dpni.
  */
 
 struct dpni_congestion_notification_cfg {
@@ -947,6 +1003,8 @@ struct dpni_congestion_notification_cfg {
 	uint64_t message_iova;
 	struct dpni_dest_cfg dest_cfg;
 	uint16_t notification_mode;
+	enum dpni_congestion_point cg_point;
+	int cgid;
 };
 
 int dpni_set_congestion_notification(struct fsl_mc_io *mc_io,
@@ -1016,6 +1074,7 @@ int dpni_get_congestion_notification(struct fsl_mc_io *mc_io,
  *      FD[OFFSET].
  *      For more details check the Frame Descriptor section in the
  *      hardware documentation.
+ *@cgid :indicate the cgid to set relative to dpni
  */
 struct dpni_queue {
 	struct {
@@ -1029,6 +1088,7 @@ struct dpni_queue {
 		uint64_t value;
 		char stash_control;
 	} flc;
+	int cgid;
 };
 
 /**
@@ -1218,6 +1278,9 @@ int dpni_get_api_version(struct fsl_mc_io *mc_io,
  */
 #define DPNI_QUEUE_OPT_HOLD_ACTIVE	0x00000008
 
+#define DPNI_QUEUE_OPT_SET_CGID				0x00000040
+#define DPNI_QUEUE_OPT_CLEAR_CGID			0x00000080
+
 int dpni_set_queue(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint16_t token,
@@ -1240,28 +1303,13 @@ int dpni_get_statistics(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
 			uint8_t page,
-			uint8_t param,
+			uint16_t param,
 			union dpni_statistics *stat);
 
 int dpni_reset_statistics(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
 			  uint16_t token);
 
-/**
- * enum dpni_congestion_point - Structure representing congestion point
- * @DPNI_CP_QUEUE:	Set taildrop per queue, identified by QUEUE_TYPE, TC and
- *				QUEUE_INDEX
- * @DPNI_CP_GROUP:	Set taildrop per queue group. Depending on options used
- *				to define the DPNI this can be either per
- *				TC (default) or per interface
- *				(DPNI_OPT_SHARED_CONGESTION set at DPNI create).
- *				QUEUE_INDEX is ignored if this type is used.
- */
-enum dpni_congestion_point {
-	DPNI_CP_QUEUE,
-	DPNI_CP_GROUP,
-};
-
 /**
  * struct dpni_taildrop - Structure representing the taildrop
  * @enable:	Indicates whether the taildrop is active or not.
diff --git a/drivers/net/dpaa2/mc/fsl_dpni_cmd.h b/drivers/net/dpaa2/mc/fsl_dpni_cmd.h
index 9116e417e..5effbb300 100644
--- a/drivers/net/dpaa2/mc/fsl_dpni_cmd.h
+++ b/drivers/net/dpaa2/mc/fsl_dpni_cmd.h
@@ -9,7 +9,7 @@
 
 /* DPNI Version */
 #define DPNI_VER_MAJOR				7
-#define DPNI_VER_MINOR				8
+#define DPNI_VER_MINOR				9
 
 #define DPNI_CMD_BASE_VERSION			1
 #define DPNI_CMD_VERSION_2			2
@@ -23,13 +23,13 @@
 /* Command IDs */
 #define DPNI_CMDID_OPEN				DPNI_CMD(0x801)
 #define DPNI_CMDID_CLOSE			DPNI_CMD(0x800)
-#define DPNI_CMDID_CREATE			DPNI_CMD_V2(0x901)
+#define DPNI_CMDID_CREATE			DPNI_CMD_V3(0x901)
 #define DPNI_CMDID_DESTROY			DPNI_CMD(0x981)
 #define DPNI_CMDID_GET_API_VERSION		DPNI_CMD(0xa01)
 
 #define DPNI_CMDID_ENABLE			DPNI_CMD(0x002)
 #define DPNI_CMDID_DISABLE			DPNI_CMD(0x003)
-#define DPNI_CMDID_GET_ATTR			DPNI_CMD_V2(0x004)
+#define DPNI_CMDID_GET_ATTR			DPNI_CMD_V3(0x004)
 #define DPNI_CMDID_RESET			DPNI_CMD(0x005)
 #define DPNI_CMDID_IS_ENABLED			DPNI_CMD(0x006)
 
@@ -77,10 +77,10 @@
 #define DPNI_CMDID_REMOVE_FS_ENT		DPNI_CMD(0x245)
 #define DPNI_CMDID_CLR_FS_ENT			DPNI_CMD(0x246)
 
-#define DPNI_CMDID_GET_STATISTICS		DPNI_CMD_V2(0x25D)
+#define DPNI_CMDID_GET_STATISTICS		DPNI_CMD_V3(0x25D)
 #define DPNI_CMDID_RESET_STATISTICS		DPNI_CMD(0x25E)
-#define DPNI_CMDID_GET_QUEUE			DPNI_CMD(0x25F)
-#define DPNI_CMDID_SET_QUEUE			DPNI_CMD(0x260)
+#define DPNI_CMDID_GET_QUEUE			DPNI_CMD_V2(0x25F)
+#define DPNI_CMDID_SET_QUEUE			DPNI_CMD_V2(0x260)
 #define DPNI_CMDID_GET_TAILDROP			DPNI_CMD_V2(0x261)
 #define DPNI_CMDID_SET_TAILDROP			DPNI_CMD_V2(0x262)
 
@@ -89,8 +89,8 @@
 #define DPNI_CMDID_GET_BUFFER_LAYOUT		DPNI_CMD_V2(0x264)
 #define DPNI_CMDID_SET_BUFFER_LAYOUT		DPNI_CMD_V2(0x265)
 
-#define DPNI_CMDID_SET_CONGESTION_NOTIFICATION	DPNI_CMD(0x267)
-#define DPNI_CMDID_GET_CONGESTION_NOTIFICATION	DPNI_CMD(0x268)
+#define DPNI_CMDID_SET_CONGESTION_NOTIFICATION	DPNI_CMD_V2(0x267)
+#define DPNI_CMDID_GET_CONGESTION_NOTIFICATION	DPNI_CMD_V2(0x268)
 #define DPNI_CMDID_SET_EARLY_DROP		DPNI_CMD_V2(0x269)
 #define DPNI_CMDID_GET_EARLY_DROP		DPNI_CMD_V2(0x26A)
 #define DPNI_CMDID_GET_OFFLOAD			DPNI_CMD(0x26B)
@@ -131,6 +131,8 @@ struct dpni_cmd_create {
 	uint8_t pad3;
 	uint16_t fs_entries;
 	uint8_t num_rx_tcs;
+	uint8_t pad4;
+	uint8_t num_cgs;
 };
 
 struct dpni_cmd_destroy {
@@ -222,6 +224,7 @@ struct dpni_rsp_get_attr {
 	uint8_t qos_key_size;
 	uint8_t fs_key_size;
 	uint16_t wriop_version;
+	uint8_t num_cgs;
 };
 
 #define DPNI_ERROR_ACTION_SHIFT		0
@@ -315,7 +318,7 @@ struct dpni_rsp_get_tx_data_offset {
 
 struct dpni_cmd_get_statistics {
 	uint8_t page_number;
-	uint8_t param;
+	uint16_t param;
 };
 
 struct dpni_rsp_get_statistics {
@@ -464,6 +467,8 @@ struct dpni_cmd_get_queue {
 
 #define DPNI_DEST_TYPE_SHIFT		0
 #define DPNI_DEST_TYPE_SIZE		4
+#define DPNI_CGID_VALID_SHIFT		5
+#define DPNI_CGID_VALID_SIZE		1
 #define DPNI_STASH_CTRL_SHIFT		6
 #define DPNI_STASH_CTRL_SIZE		1
 #define DPNI_HOLD_ACTIVE_SHIFT		7
@@ -476,7 +481,9 @@ struct dpni_rsp_get_queue {
 	uint32_t dest_id;
 	uint16_t pad1;
 	uint8_t dest_prio;
-	/* From LSB: dest_type:4, pad:2, flc_stash_ctrl:1, hold_active:1 */
+	/* From LSB:
+	 * dest_type:4, pad:1, cgid_valid:1, flc_stash_ctrl:1, hold_active:1
+	 */
 	uint8_t flags;
 	/* response word 2 */
 	uint64_t flc;
@@ -485,6 +492,9 @@ struct dpni_rsp_get_queue {
 	/* response word 4 */
 	uint32_t fqid;
 	uint16_t qdbin;
+	uint16_t pad2;
+	/* response word 5*/
+	uint8_t cgid;
 };
 
 struct dpni_cmd_set_queue {
@@ -503,6 +513,8 @@ struct dpni_cmd_set_queue {
 	uint64_t flc;
 	/* cmd word 3 */
 	uint64_t user_context;
+	/* cmd word 4 */
+	uint8_t cgid;
 };
 
 #define DPNI_DISCARD_ON_MISS_SHIFT	0
@@ -655,7 +667,10 @@ struct dpni_tx_confirmation_mode {
 struct dpni_cmd_set_congestion_notification {
 	uint8_t qtype;
 	uint8_t tc;
-	uint8_t pad[6];
+	uint8_t pad;
+	uint8_t congestion_point;
+	uint8_t cgid;
+	uint8_t pad2[3];
 	uint32_t dest_id;
 	uint16_t notification_mode;
 	uint8_t dest_priority;
@@ -670,6 +685,9 @@ struct dpni_cmd_set_congestion_notification {
 struct dpni_cmd_get_congestion_notification {
 	uint8_t qtype;
 	uint8_t tc;
+	uint8_t pad;
+	uint8_t congestion_point;
+	uint8_t cgid;
 };
 
 struct dpni_rsp_get_congestion_notification {
-- 
2.19.1

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH 2/3] drivers: update MC firmware version for FSLMC bus
  2019-04-03 14:23 ` [dpdk-dev] [PATCH 2/3] drivers: update MC firmware version for FSLMC bus Shreyansh Jain
@ 2019-04-03 14:23   ` Shreyansh Jain
  0 siblings, 0 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-03 14:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

MC firmware is the core component of FSLMC bus and DPAA2 devices.
Prior to this patch, MC firmware supported 10.10.x version. This
patch bumps the min supported version to 10.14.x.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/mc/fsl_dpmng.h    |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c    |  1 +
 drivers/net/dpaa2/mc/dpni.c         | 15 +++++-
 drivers/net/dpaa2/mc/fsl_dpni.h     | 84 ++++++++++++++++++++++-------
 drivers/net/dpaa2/mc/fsl_dpni_cmd.h | 40 ++++++++++----
 5 files changed, 110 insertions(+), 32 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_dpmng.h b/drivers/bus/fslmc/mc/fsl_dpmng.h
index 8559bef87..bef2ef095 100644
--- a/drivers/bus/fslmc/mc/fsl_dpmng.h
+++ b/drivers/bus/fslmc/mc/fsl_dpmng.h
@@ -18,7 +18,7 @@ struct fsl_mc_io;
  * Management Complex firmware version information
  */
 #define MC_VER_MAJOR 10
-#define MC_VER_MINOR 10
+#define MC_VER_MINOR 14
 
 /**
  * struct mc_version
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 3fbc82977..98ef8a5f5 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -665,6 +665,7 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev,
 					 DPNI_CONG_OPT_WRITE_MEM_ON_ENTER |
 					 DPNI_CONG_OPT_WRITE_MEM_ON_EXIT |
 					 DPNI_CONG_OPT_COHERENT_WRITE;
+		cong_notif_cfg.cg_point = DPNI_CP_QUEUE;
 
 		ret = dpni_set_congestion_notification(dpni, CMD_PRI_LOW,
 						       priv->token,
diff --git a/drivers/net/dpaa2/mc/dpni.c b/drivers/net/dpaa2/mc/dpni.c
index 6c12a0ae1..d9feb1427 100644
--- a/drivers/net/dpaa2/mc/dpni.c
+++ b/drivers/net/dpaa2/mc/dpni.c
@@ -125,6 +125,7 @@ int dpni_create(struct fsl_mc_io *mc_io,
 	cmd_params->vlan_filter_entries =  cfg->vlan_filter_entries;
 	cmd_params->qos_entries = cfg->qos_entries;
 	cmd_params->fs_entries = cpu_to_le16(cfg->fs_entries);
+	cmd_params->num_cgs = cfg->num_cgs;
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -199,7 +200,7 @@ int dpni_set_pools(struct fsl_mc_io *mc_io,
 					  token);
 	cmd_params = (struct dpni_cmd_set_pools *)cmd.params;
 	cmd_params->num_dpbp = cfg->num_dpbp;
-	for (i = 0; i < cmd_params->num_dpbp; i++) {
+	for (i = 0; i < DPNI_MAX_DPBP; i++) {
 		cmd_params->pool[i].dpbp_id =
 			cpu_to_le16(cfg->pools[i].dpbp_id);
 		cmd_params->pool[i].priority_mask =
@@ -593,6 +594,7 @@ int dpni_get_attributes(struct fsl_mc_io *mc_io,
 	attr->qos_key_size = rsp_params->qos_key_size;
 	attr->fs_key_size = rsp_params->fs_key_size;
 	attr->wriop_version = le16_to_cpu(rsp_params->wriop_version);
+	attr->num_cgs = rsp_params->num_cgs;
 
 	return 0;
 }
@@ -1800,6 +1802,8 @@ int dpni_set_congestion_notification(struct fsl_mc_io *mc_io,
 	cmd_params = (struct dpni_cmd_set_congestion_notification *)cmd.params;
 	cmd_params->qtype = qtype;
 	cmd_params->tc = tc_id;
+	cmd_params->congestion_point = cfg->cg_point;
+	cmd_params->cgid = (uint8_t)cfg->cgid;
 	cmd_params->dest_id = cpu_to_le32(cfg->dest_cfg.dest_id);
 	cmd_params->notification_mode = cpu_to_le16(cfg->notification_mode);
 	cmd_params->dest_priority = cfg->dest_cfg.priority;
@@ -1850,6 +1854,8 @@ int dpni_get_congestion_notification(struct fsl_mc_io *mc_io,
 	cmd_params = (struct dpni_cmd_get_congestion_notification *)cmd.params;
 	cmd_params->qtype = qtype;
 	cmd_params->tc = tc_id;
+	cmd_params->congestion_point = cfg->cg_point;
+	cmd_params->cgid = cfg->cgid;
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -1949,6 +1955,7 @@ int dpni_set_queue(struct fsl_mc_io *mc_io,
 		       queue->destination.hold_active);
 	cmd_params->flc = cpu_to_le64(queue->flc.value);
 	cmd_params->user_context = cpu_to_le64(queue->user_context);
+	cmd_params->cgid = queue->cgid;
 
 	/* send command to mc */
 	return mc_send_command(mc_io, &cmd);
@@ -2010,6 +2017,10 @@ int dpni_get_queue(struct fsl_mc_io *mc_io,
 	queue->user_context = le64_to_cpu(rsp_params->user_context);
 	qid->fqid = le32_to_cpu(rsp_params->fqid);
 	qid->qdbin = le16_to_cpu(rsp_params->qdbin);
+	if (dpni_get_field(rsp_params->flags, CGID_VALID))
+		queue->cgid = rsp_params->cgid;
+	else
+		queue->cgid = -1;
 
 	return 0;
 }
@@ -2031,7 +2042,7 @@ int dpni_get_statistics(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
 			uint8_t page,
-			uint8_t param,
+			uint16_t param,
 			union dpni_statistics *stat)
 {
 	struct mc_command cmd = { 0 };
diff --git a/drivers/net/dpaa2/mc/fsl_dpni.h b/drivers/net/dpaa2/mc/fsl_dpni.h
index aecdc8d1f..8b1cfbac7 100644
--- a/drivers/net/dpaa2/mc/fsl_dpni.h
+++ b/drivers/net/dpaa2/mc/fsl_dpni.h
@@ -91,6 +91,10 @@ struct fsl_mc_io;
  * All Tx traffic classes will use a single sender (ignore num_queueus for tx)
  */
 #define DPNI_OPT_SINGLE_SENDER			0x000100
+/**
+ * Define a custom number of congestion groups
+ */
+#define DPNI_OPT_CUSTOM_CG				0x000200
 
 int dpni_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
@@ -172,6 +176,7 @@ struct dpni_cfg {
 	uint8_t  num_tcs;
 	uint8_t  num_rx_tcs;
 	uint8_t  qos_entries;
+	uint8_t  num_cgs;
 };
 
 int dpni_create(struct fsl_mc_io *mc_io,
@@ -326,6 +331,7 @@ struct dpni_attr {
 	uint8_t  qos_key_size;
 	uint8_t  fs_key_size;
 	uint16_t wriop_version;
+	uint8_t  num_cgs;
 };
 
 int dpni_get_attributes(struct fsl_mc_io *mc_io,
@@ -638,6 +644,36 @@ union dpni_statistics {
  */
 #define DPNI_LINK_OPT_PFC_PAUSE	0x0000000000000010ULL
 
+/**
+ * Advertise 10MB full duplex
+ */
+#define DPNI_ADVERTISED_10BASET_FULL           0x0000000000000001ULL
+/**
+ * Advertise 100MB full duplex
+ */
+#define DPNI_ADVERTISED_100BASET_FULL          0x0000000000000002ULL
+/**
+ * Advertise 1GB full duplex
+ */
+#define DPNI_ADVERTISED_1000BASET_FULL         0x0000000000000004ULL
+/**
+ * Advertise auto-negotiation enable
+ */
+#define DPNI_ADVERTISED_AUTONEG                0x0000000000000008ULL
+/**
+ * Advertise 10GB full duplex
+ */
+#define DPNI_ADVERTISED_10000BASET_FULL        0x0000000000000010ULL
+/**
+ * Advertise 2.5GB full duplex
+ */
+#define DPNI_ADVERTISED_2500BASEX_FULL         0x0000000000000020ULL
+/**
+ * Advertise 5GB full duplex
+ */
+#define DPNI_ADVERTISED_5000BASET_FULL         0x0000000000000040ULL
+
+
 /**
  * struct - Structure representing DPNI link configuration
  * @rate: Rate
@@ -668,7 +704,7 @@ struct dpni_link_state {
 	uint32_t rate;
 	uint64_t options;
 	int up;
-	int     state_valid;
+	int state_valid;
 	uint64_t supported;
 	uint64_t advertising;
 };
@@ -850,7 +886,6 @@ enum dpni_congestion_unit {
 	DPNI_CONGESTION_UNIT_FRAMES
 };
 
-
 /**
  * enum dpni_dest - DPNI destination types
  * @DPNI_DEST_NONE: Unassigned destination; The queue is set in parked mode and
@@ -924,6 +959,25 @@ struct dpni_dest_cfg {
  */
 #define DPNI_CONG_OPT_FLOW_CONTROL	0x00000040
 
+/**
+ * enum dpni_congestion_point - Structure representing congestion point
+ * @DPNI_CP_QUEUE:	Set congestion per queue, identified by QUEUE_TYPE, TC
+ *			and QUEUE_INDEX
+ * @DPNI_CP_GROUP:	Set congestion per queue group. Depending on options
+ *			used to define the DPNI this can be either per
+ *			TC (default) or per interface
+ *			(DPNI_OPT_SHARED_CONGESTION set at DPNI create).
+ *			QUEUE_INDEX is ignored if this type is used.
+ * @DPNI_CP_CONGESTION_GROUP: Set per congestion group id. This will work
+ *		only if the DPNI is created with  DPNI_OPT_CUSTOM_CG option
+ */
+
+enum dpni_congestion_point {
+	DPNI_CP_QUEUE,
+	DPNI_CP_GROUP,
+	DPNI_CP_CONGESTION_GROUP,
+};
+
 /**
  * struct dpni_congestion_notification_cfg - congestion notification
  *		configuration
@@ -937,6 +991,8 @@ struct dpni_dest_cfg {
  *	contained in 'options'
  * @dest_cfg: CSCN can be send to either DPIO or DPCON WQ channel
  * @notification_mode: Mask of available options; use 'DPNI_CONG_OPT_<X>' values
+ * @cg_point: Congestion point settings
+ * @cgid: id of the congestion group. The index is relative to dpni.
  */
 
 struct dpni_congestion_notification_cfg {
@@ -947,6 +1003,8 @@ struct dpni_congestion_notification_cfg {
 	uint64_t message_iova;
 	struct dpni_dest_cfg dest_cfg;
 	uint16_t notification_mode;
+	enum dpni_congestion_point cg_point;
+	int cgid;
 };
 
 int dpni_set_congestion_notification(struct fsl_mc_io *mc_io,
@@ -1016,6 +1074,7 @@ int dpni_get_congestion_notification(struct fsl_mc_io *mc_io,
  *      FD[OFFSET].
  *      For more details check the Frame Descriptor section in the
  *      hardware documentation.
+ *@cgid :indicate the cgid to set relative to dpni
  */
 struct dpni_queue {
 	struct {
@@ -1029,6 +1088,7 @@ struct dpni_queue {
 		uint64_t value;
 		char stash_control;
 	} flc;
+	int cgid;
 };
 
 /**
@@ -1218,6 +1278,9 @@ int dpni_get_api_version(struct fsl_mc_io *mc_io,
  */
 #define DPNI_QUEUE_OPT_HOLD_ACTIVE	0x00000008
 
+#define DPNI_QUEUE_OPT_SET_CGID				0x00000040
+#define DPNI_QUEUE_OPT_CLEAR_CGID			0x00000080
+
 int dpni_set_queue(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint16_t token,
@@ -1240,28 +1303,13 @@ int dpni_get_statistics(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
 			uint8_t page,
-			uint8_t param,
+			uint16_t param,
 			union dpni_statistics *stat);
 
 int dpni_reset_statistics(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
 			  uint16_t token);
 
-/**
- * enum dpni_congestion_point - Structure representing congestion point
- * @DPNI_CP_QUEUE:	Set taildrop per queue, identified by QUEUE_TYPE, TC and
- *				QUEUE_INDEX
- * @DPNI_CP_GROUP:	Set taildrop per queue group. Depending on options used
- *				to define the DPNI this can be either per
- *				TC (default) or per interface
- *				(DPNI_OPT_SHARED_CONGESTION set at DPNI create).
- *				QUEUE_INDEX is ignored if this type is used.
- */
-enum dpni_congestion_point {
-	DPNI_CP_QUEUE,
-	DPNI_CP_GROUP,
-};
-
 /**
  * struct dpni_taildrop - Structure representing the taildrop
  * @enable:	Indicates whether the taildrop is active or not.
diff --git a/drivers/net/dpaa2/mc/fsl_dpni_cmd.h b/drivers/net/dpaa2/mc/fsl_dpni_cmd.h
index 9116e417e..5effbb300 100644
--- a/drivers/net/dpaa2/mc/fsl_dpni_cmd.h
+++ b/drivers/net/dpaa2/mc/fsl_dpni_cmd.h
@@ -9,7 +9,7 @@
 
 /* DPNI Version */
 #define DPNI_VER_MAJOR				7
-#define DPNI_VER_MINOR				8
+#define DPNI_VER_MINOR				9
 
 #define DPNI_CMD_BASE_VERSION			1
 #define DPNI_CMD_VERSION_2			2
@@ -23,13 +23,13 @@
 /* Command IDs */
 #define DPNI_CMDID_OPEN				DPNI_CMD(0x801)
 #define DPNI_CMDID_CLOSE			DPNI_CMD(0x800)
-#define DPNI_CMDID_CREATE			DPNI_CMD_V2(0x901)
+#define DPNI_CMDID_CREATE			DPNI_CMD_V3(0x901)
 #define DPNI_CMDID_DESTROY			DPNI_CMD(0x981)
 #define DPNI_CMDID_GET_API_VERSION		DPNI_CMD(0xa01)
 
 #define DPNI_CMDID_ENABLE			DPNI_CMD(0x002)
 #define DPNI_CMDID_DISABLE			DPNI_CMD(0x003)
-#define DPNI_CMDID_GET_ATTR			DPNI_CMD_V2(0x004)
+#define DPNI_CMDID_GET_ATTR			DPNI_CMD_V3(0x004)
 #define DPNI_CMDID_RESET			DPNI_CMD(0x005)
 #define DPNI_CMDID_IS_ENABLED			DPNI_CMD(0x006)
 
@@ -77,10 +77,10 @@
 #define DPNI_CMDID_REMOVE_FS_ENT		DPNI_CMD(0x245)
 #define DPNI_CMDID_CLR_FS_ENT			DPNI_CMD(0x246)
 
-#define DPNI_CMDID_GET_STATISTICS		DPNI_CMD_V2(0x25D)
+#define DPNI_CMDID_GET_STATISTICS		DPNI_CMD_V3(0x25D)
 #define DPNI_CMDID_RESET_STATISTICS		DPNI_CMD(0x25E)
-#define DPNI_CMDID_GET_QUEUE			DPNI_CMD(0x25F)
-#define DPNI_CMDID_SET_QUEUE			DPNI_CMD(0x260)
+#define DPNI_CMDID_GET_QUEUE			DPNI_CMD_V2(0x25F)
+#define DPNI_CMDID_SET_QUEUE			DPNI_CMD_V2(0x260)
 #define DPNI_CMDID_GET_TAILDROP			DPNI_CMD_V2(0x261)
 #define DPNI_CMDID_SET_TAILDROP			DPNI_CMD_V2(0x262)
 
@@ -89,8 +89,8 @@
 #define DPNI_CMDID_GET_BUFFER_LAYOUT		DPNI_CMD_V2(0x264)
 #define DPNI_CMDID_SET_BUFFER_LAYOUT		DPNI_CMD_V2(0x265)
 
-#define DPNI_CMDID_SET_CONGESTION_NOTIFICATION	DPNI_CMD(0x267)
-#define DPNI_CMDID_GET_CONGESTION_NOTIFICATION	DPNI_CMD(0x268)
+#define DPNI_CMDID_SET_CONGESTION_NOTIFICATION	DPNI_CMD_V2(0x267)
+#define DPNI_CMDID_GET_CONGESTION_NOTIFICATION	DPNI_CMD_V2(0x268)
 #define DPNI_CMDID_SET_EARLY_DROP		DPNI_CMD_V2(0x269)
 #define DPNI_CMDID_GET_EARLY_DROP		DPNI_CMD_V2(0x26A)
 #define DPNI_CMDID_GET_OFFLOAD			DPNI_CMD(0x26B)
@@ -131,6 +131,8 @@ struct dpni_cmd_create {
 	uint8_t pad3;
 	uint16_t fs_entries;
 	uint8_t num_rx_tcs;
+	uint8_t pad4;
+	uint8_t num_cgs;
 };
 
 struct dpni_cmd_destroy {
@@ -222,6 +224,7 @@ struct dpni_rsp_get_attr {
 	uint8_t qos_key_size;
 	uint8_t fs_key_size;
 	uint16_t wriop_version;
+	uint8_t num_cgs;
 };
 
 #define DPNI_ERROR_ACTION_SHIFT		0
@@ -315,7 +318,7 @@ struct dpni_rsp_get_tx_data_offset {
 
 struct dpni_cmd_get_statistics {
 	uint8_t page_number;
-	uint8_t param;
+	uint16_t param;
 };
 
 struct dpni_rsp_get_statistics {
@@ -464,6 +467,8 @@ struct dpni_cmd_get_queue {
 
 #define DPNI_DEST_TYPE_SHIFT		0
 #define DPNI_DEST_TYPE_SIZE		4
+#define DPNI_CGID_VALID_SHIFT		5
+#define DPNI_CGID_VALID_SIZE		1
 #define DPNI_STASH_CTRL_SHIFT		6
 #define DPNI_STASH_CTRL_SIZE		1
 #define DPNI_HOLD_ACTIVE_SHIFT		7
@@ -476,7 +481,9 @@ struct dpni_rsp_get_queue {
 	uint32_t dest_id;
 	uint16_t pad1;
 	uint8_t dest_prio;
-	/* From LSB: dest_type:4, pad:2, flc_stash_ctrl:1, hold_active:1 */
+	/* From LSB:
+	 * dest_type:4, pad:1, cgid_valid:1, flc_stash_ctrl:1, hold_active:1
+	 */
 	uint8_t flags;
 	/* response word 2 */
 	uint64_t flc;
@@ -485,6 +492,9 @@ struct dpni_rsp_get_queue {
 	/* response word 4 */
 	uint32_t fqid;
 	uint16_t qdbin;
+	uint16_t pad2;
+	/* response word 5*/
+	uint8_t cgid;
 };
 
 struct dpni_cmd_set_queue {
@@ -503,6 +513,8 @@ struct dpni_cmd_set_queue {
 	uint64_t flc;
 	/* cmd word 3 */
 	uint64_t user_context;
+	/* cmd word 4 */
+	uint8_t cgid;
 };
 
 #define DPNI_DISCARD_ON_MISS_SHIFT	0
@@ -655,7 +667,10 @@ struct dpni_tx_confirmation_mode {
 struct dpni_cmd_set_congestion_notification {
 	uint8_t qtype;
 	uint8_t tc;
-	uint8_t pad[6];
+	uint8_t pad;
+	uint8_t congestion_point;
+	uint8_t cgid;
+	uint8_t pad2[3];
 	uint32_t dest_id;
 	uint16_t notification_mode;
 	uint8_t dest_priority;
@@ -670,6 +685,9 @@ struct dpni_cmd_set_congestion_notification {
 struct dpni_cmd_get_congestion_notification {
 	uint8_t qtype;
 	uint8_t tc;
+	uint8_t pad;
+	uint8_t congestion_point;
+	uint8_t cgid;
 };
 
 struct dpni_rsp_get_congestion_notification {
-- 
2.19.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH 3/3] doc: bump SDK support version for dpaa2
  2019-04-03 14:23 [dpdk-dev] [PATCH 0/3] Update FSLMC bus firmware Shreyansh Jain
                   ` (2 preceding siblings ...)
  2019-04-03 14:23 ` [dpdk-dev] [PATCH 2/3] drivers: update MC firmware version for FSLMC bus Shreyansh Jain
@ 2019-04-03 14:23 ` Shreyansh Jain
  2019-04-03 14:23   ` Shreyansh Jain
  2019-04-04  7:23 ` [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware Shreyansh Jain
  4 siblings, 1 reply; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-03 14:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

With the change in MC firmware, minimum supported version of
the Layerscape SDK too needs to be changed.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 doc/guides/nics/dpaa2.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/dpaa2.rst b/doc/guides/nics/dpaa2.rst
index 392ab0580..d74d8f899 100644
--- a/doc/guides/nics/dpaa2.rst
+++ b/doc/guides/nics/dpaa2.rst
@@ -421,8 +421,8 @@ See :doc:`../platform/dpaa2` for setup information
 
 Currently supported by DPDK:
 
-- NXP SDK **18.09+**.
-- MC Firmware version **10.10.0** and higher.
+- NXP SDK **18.11+**.
+- MC Firmware version **10.14.0** and higher.
 - Supported architectures:  **arm64 LE**.
 
 - Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup the basic DPDK environment.
-- 
2.19.1

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH 3/3] doc: bump SDK support version for dpaa2
  2019-04-03 14:23 ` [dpdk-dev] [PATCH 3/3] doc: bump SDK support version for dpaa2 Shreyansh Jain
@ 2019-04-03 14:23   ` Shreyansh Jain
  0 siblings, 0 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-03 14:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

With the change in MC firmware, minimum supported version of
the Layerscape SDK too needs to be changed.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 doc/guides/nics/dpaa2.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/dpaa2.rst b/doc/guides/nics/dpaa2.rst
index 392ab0580..d74d8f899 100644
--- a/doc/guides/nics/dpaa2.rst
+++ b/doc/guides/nics/dpaa2.rst
@@ -421,8 +421,8 @@ See :doc:`../platform/dpaa2` for setup information
 
 Currently supported by DPDK:
 
-- NXP SDK **18.09+**.
-- MC Firmware version **10.10.0** and higher.
+- NXP SDK **18.11+**.
+- MC Firmware version **10.14.0** and higher.
 - Supported architectures:  **arm64 LE**.
 
 - Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup the basic DPDK environment.
-- 
2.19.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware
  2019-04-03 14:23 [dpdk-dev] [PATCH 0/3] Update FSLMC bus firmware Shreyansh Jain
                   ` (3 preceding siblings ...)
  2019-04-03 14:23 ` [dpdk-dev] [PATCH 3/3] doc: bump SDK support version for dpaa2 Shreyansh Jain
@ 2019-04-04  7:23 ` Shreyansh Jain
  2019-04-04  7:23   ` Shreyansh Jain
                     ` (4 more replies)
  4 siblings, 5 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-04  7:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

Based on net-next: 69f805ac18abe

All the patches are strictly within DPAA2/FSLMC driver area.

MC firmware is the core component of FSLMC bus which enables
all the dpaa2 devices (eth, crypto etc).
With recent release of NXP's layerscape SDK, the MC firmware
has been bumped up. These patches updates only necessary
changes so as to maintain version compatibility.

v1->v2:
 - In last patch (patch 2), one of a recent fix (e94be227b7)
   was overwritten. Restoring that change.

Shreyansh Jain (3):
  bus/fslmc: cleanup unused firmware code
  drivers: update MC firmware version for FSLMC bus
  doc: bump SDK support version for dpaa2

 doc/guides/nics/dpaa2.rst           |  4 +-
 drivers/bus/fslmc/mc/dpci.c         | 75 --------------------------
 drivers/bus/fslmc/mc/dpcon.c        | 30 -----------
 drivers/bus/fslmc/mc/fsl_dpci.h     | 21 --------
 drivers/bus/fslmc/mc/fsl_dpcon.h    | 19 -------
 drivers/bus/fslmc/mc/fsl_dpmng.h    |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c    |  1 +
 drivers/net/dpaa2/mc/dpni.c         | 13 ++++-
 drivers/net/dpaa2/mc/fsl_dpni.h     | 84 ++++++++++++++++++++++-------
 drivers/net/dpaa2/mc/fsl_dpni_cmd.h | 40 ++++++++++----
 10 files changed, 111 insertions(+), 178 deletions(-)

-- 
2.19.1

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware
  2019-04-04  7:23 ` [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware Shreyansh Jain
@ 2019-04-04  7:23   ` Shreyansh Jain
  2019-04-04  7:23   ` [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code Shreyansh Jain
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-04  7:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

Based on net-next: 69f805ac18abe

All the patches are strictly within DPAA2/FSLMC driver area.

MC firmware is the core component of FSLMC bus which enables
all the dpaa2 devices (eth, crypto etc).
With recent release of NXP's layerscape SDK, the MC firmware
has been bumped up. These patches updates only necessary
changes so as to maintain version compatibility.

v1->v2:
 - In last patch (patch 2), one of a recent fix (e94be227b7)
   was overwritten. Restoring that change.

Shreyansh Jain (3):
  bus/fslmc: cleanup unused firmware code
  drivers: update MC firmware version for FSLMC bus
  doc: bump SDK support version for dpaa2

 doc/guides/nics/dpaa2.rst           |  4 +-
 drivers/bus/fslmc/mc/dpci.c         | 75 --------------------------
 drivers/bus/fslmc/mc/dpcon.c        | 30 -----------
 drivers/bus/fslmc/mc/fsl_dpci.h     | 21 --------
 drivers/bus/fslmc/mc/fsl_dpcon.h    | 19 -------
 drivers/bus/fslmc/mc/fsl_dpmng.h    |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c    |  1 +
 drivers/net/dpaa2/mc/dpni.c         | 13 ++++-
 drivers/net/dpaa2/mc/fsl_dpni.h     | 84 ++++++++++++++++++++++-------
 drivers/net/dpaa2/mc/fsl_dpni_cmd.h | 40 ++++++++++----
 10 files changed, 111 insertions(+), 178 deletions(-)

-- 
2.19.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-04  7:23 ` [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware Shreyansh Jain
  2019-04-04  7:23   ` Shreyansh Jain
@ 2019-04-04  7:23   ` Shreyansh Jain
  2019-04-04  7:23     ` Shreyansh Jain
  2019-04-04 21:29     ` Ferruh Yigit
  2019-04-04  7:23   ` [dpdk-dev] [PATCH v2 2/3] drivers: update MC firmware version for FSLMC bus Shreyansh Jain
                     ` (2 subsequent siblings)
  4 siblings, 2 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-04  7:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

Removes some unused firmware code which was added in last bump
of the firmware version. No current features uses these APIs.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/bus/fslmc/mc/dpci.c      | 75 --------------------------------
 drivers/bus/fslmc/mc/dpcon.c     | 30 -------------
 drivers/bus/fslmc/mc/fsl_dpci.h  | 21 ---------
 drivers/bus/fslmc/mc/fsl_dpcon.h | 19 --------
 4 files changed, 145 deletions(-)

diff --git a/drivers/bus/fslmc/mc/dpci.c b/drivers/bus/fslmc/mc/dpci.c
index 95edae9d9..2874a6196 100644
--- a/drivers/bus/fslmc/mc/dpci.c
+++ b/drivers/bus/fslmc/mc/dpci.c
@@ -301,81 +301,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
 	return 0;
 }
 
-/**
- * dpci_get_peer_attributes() - Retrieve peer DPCI attributes.
- * @mc_io:	Pointer to MC portal's I/O object
- * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:	Token of DPCI object
- * @attr:	Returned peer attributes
- *
- * Return:	'0' on Success; Error code otherwise.
- */
-int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
-			     uint32_t cmd_flags,
-			     uint16_t token,
-			     struct dpci_peer_attr *attr)
-{
-	struct dpci_rsp_get_peer_attr *rsp_params;
-	struct mc_command cmd = { 0 };
-	int err;
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_PEER_ATTR,
-					  cmd_flags,
-					  token);
-
-	/* send command to mc*/
-	err = mc_send_command(mc_io, &cmd);
-	if (err)
-		return err;
-
-	/* retrieve response parameters */
-	rsp_params = (struct dpci_rsp_get_peer_attr *)cmd.params;
-	attr->peer_id = le32_to_cpu(rsp_params->id);
-	attr->num_of_priorities = rsp_params->num_of_priorities;
-
-	return 0;
-}
-
-/**
- * dpci_get_link_state() - Retrieve the DPCI link state.
- * @mc_io:	Pointer to MC portal's I/O object
- * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:	Token of DPCI object
- * @up:		Returned link state; returns '1' if link is up, '0' otherwise
- *
- * DPCI can be connected to another DPCI, together they
- * create a 'link'. In order to use the DPCI Tx and Rx queues,
- * both objects must be enabled.
- *
- * Return:	'0' on Success; Error code otherwise.
- */
-int dpci_get_link_state(struct fsl_mc_io *mc_io,
-			uint32_t cmd_flags,
-			uint16_t token,
-			int *up)
-{
-	struct dpci_rsp_get_link_state *rsp_params;
-	struct mc_command cmd = { 0 };
-	int err;
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_LINK_STATE,
-					  cmd_flags,
-					  token);
-
-	/* send command to mc*/
-	err = mc_send_command(mc_io, &cmd);
-	if (err)
-		return err;
-
-	/* retrieve response parameters */
-	rsp_params = (struct dpci_rsp_get_link_state *)cmd.params;
-	*up = dpci_get_field(rsp_params->up, UP);
-
-	return 0;
-}
-
 /**
  * dpci_set_rx_queue() - Set Rx queue configuration
  * @mc_io:	Pointer to MC portal's I/O object
diff --git a/drivers/bus/fslmc/mc/dpcon.c b/drivers/bus/fslmc/mc/dpcon.c
index 92bd26512..3f6e04b97 100644
--- a/drivers/bus/fslmc/mc/dpcon.c
+++ b/drivers/bus/fslmc/mc/dpcon.c
@@ -295,36 +295,6 @@ int dpcon_get_attributes(struct fsl_mc_io *mc_io,
 	return 0;
 }
 
-/**
- * dpcon_set_notification() - Set DPCON notification destination
- * @mc_io:	Pointer to MC portal's I/O object
- * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:	Token of DPCON object
- * @cfg:	Notification parameters
- *
- * Return:	'0' on Success; Error code otherwise
- */
-int dpcon_set_notification(struct fsl_mc_io *mc_io,
-			   uint32_t cmd_flags,
-			   uint16_t token,
-			   struct dpcon_notification_cfg *cfg)
-{
-	struct dpcon_cmd_set_notification *dpcon_cmd;
-	struct mc_command cmd = { 0 };
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPCON_CMDID_SET_NOTIFICATION,
-					  cmd_flags,
-					  token);
-	dpcon_cmd = (struct dpcon_cmd_set_notification *)cmd.params;
-	dpcon_cmd->dpio_id = cpu_to_le32(cfg->dpio_id);
-	dpcon_cmd->priority = cfg->priority;
-	dpcon_cmd->user_ctx = cpu_to_le64(cfg->user_ctx);
-
-	/* send command to mc*/
-	return mc_send_command(mc_io, &cmd);
-}
-
 /**
  * dpcon_get_api_version - Get Data Path Concentrator API version
  * @mc_io:	Pointer to MC portal's DPCON object
diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
index 9af9097e5..cf3d15267 100644
--- a/drivers/bus/fslmc/mc/fsl_dpci.h
+++ b/drivers/bus/fslmc/mc/fsl_dpci.h
@@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
 			uint16_t token,
 			struct dpci_attr *attr);
 
-/**
- * struct dpci_peer_attr - Structure representing the peer DPCI attributes
- * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
- * @num_of_priorities:	The pper's number of receive priorities; determines the
- *			number of transmit priorities for the local DPCI object
- */
-struct dpci_peer_attr {
-	int peer_id;
-	uint8_t num_of_priorities;
-};
-
-int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
-			     uint32_t cmd_flags,
-			     uint16_t token,
-			     struct dpci_peer_attr *attr);
-
-int dpci_get_link_state(struct fsl_mc_io *mc_io,
-			uint32_t cmd_flags,
-			uint16_t token,
-			int *up);
-
 /**
  * enum dpci_dest - DPCI destination types
  * @DPCI_DEST_NONE:	Unassigned destination; The queue is set in parked mode
diff --git a/drivers/bus/fslmc/mc/fsl_dpcon.h b/drivers/bus/fslmc/mc/fsl_dpcon.h
index fc0430dc1..36dd5f3c1 100644
--- a/drivers/bus/fslmc/mc/fsl_dpcon.h
+++ b/drivers/bus/fslmc/mc/fsl_dpcon.h
@@ -81,25 +81,6 @@ int dpcon_get_attributes(struct fsl_mc_io *mc_io,
 			 uint16_t token,
 			 struct dpcon_attr *attr);
 
-/**
- * struct dpcon_notification_cfg - Structure representing notification params
- * @dpio_id:	DPIO object ID; must be configured with a notification channel;
- *		to disable notifications set it to 'DPCON_INVALID_DPIO_ID';
- * @priority:	Priority selection within the DPIO channel; valid values
- *		are 0-7, depending on the number of priorities in that channel
- * @user_ctx:	User context value provided with each CDAN message
- */
-struct dpcon_notification_cfg {
-	int dpio_id;
-	uint8_t priority;
-	uint64_t user_ctx;
-};
-
-int dpcon_set_notification(struct fsl_mc_io *mc_io,
-			   uint32_t cmd_flags,
-			   uint16_t token,
-			   struct dpcon_notification_cfg *cfg);
-
 int dpcon_get_api_version(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
 			  uint16_t *major_ver,
-- 
2.19.1

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-04  7:23   ` [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code Shreyansh Jain
@ 2019-04-04  7:23     ` Shreyansh Jain
  2019-04-04 21:29     ` Ferruh Yigit
  1 sibling, 0 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-04  7:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

Removes some unused firmware code which was added in last bump
of the firmware version. No current features uses these APIs.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 drivers/bus/fslmc/mc/dpci.c      | 75 --------------------------------
 drivers/bus/fslmc/mc/dpcon.c     | 30 -------------
 drivers/bus/fslmc/mc/fsl_dpci.h  | 21 ---------
 drivers/bus/fslmc/mc/fsl_dpcon.h | 19 --------
 4 files changed, 145 deletions(-)

diff --git a/drivers/bus/fslmc/mc/dpci.c b/drivers/bus/fslmc/mc/dpci.c
index 95edae9d9..2874a6196 100644
--- a/drivers/bus/fslmc/mc/dpci.c
+++ b/drivers/bus/fslmc/mc/dpci.c
@@ -301,81 +301,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
 	return 0;
 }
 
-/**
- * dpci_get_peer_attributes() - Retrieve peer DPCI attributes.
- * @mc_io:	Pointer to MC portal's I/O object
- * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:	Token of DPCI object
- * @attr:	Returned peer attributes
- *
- * Return:	'0' on Success; Error code otherwise.
- */
-int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
-			     uint32_t cmd_flags,
-			     uint16_t token,
-			     struct dpci_peer_attr *attr)
-{
-	struct dpci_rsp_get_peer_attr *rsp_params;
-	struct mc_command cmd = { 0 };
-	int err;
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_PEER_ATTR,
-					  cmd_flags,
-					  token);
-
-	/* send command to mc*/
-	err = mc_send_command(mc_io, &cmd);
-	if (err)
-		return err;
-
-	/* retrieve response parameters */
-	rsp_params = (struct dpci_rsp_get_peer_attr *)cmd.params;
-	attr->peer_id = le32_to_cpu(rsp_params->id);
-	attr->num_of_priorities = rsp_params->num_of_priorities;
-
-	return 0;
-}
-
-/**
- * dpci_get_link_state() - Retrieve the DPCI link state.
- * @mc_io:	Pointer to MC portal's I/O object
- * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:	Token of DPCI object
- * @up:		Returned link state; returns '1' if link is up, '0' otherwise
- *
- * DPCI can be connected to another DPCI, together they
- * create a 'link'. In order to use the DPCI Tx and Rx queues,
- * both objects must be enabled.
- *
- * Return:	'0' on Success; Error code otherwise.
- */
-int dpci_get_link_state(struct fsl_mc_io *mc_io,
-			uint32_t cmd_flags,
-			uint16_t token,
-			int *up)
-{
-	struct dpci_rsp_get_link_state *rsp_params;
-	struct mc_command cmd = { 0 };
-	int err;
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_LINK_STATE,
-					  cmd_flags,
-					  token);
-
-	/* send command to mc*/
-	err = mc_send_command(mc_io, &cmd);
-	if (err)
-		return err;
-
-	/* retrieve response parameters */
-	rsp_params = (struct dpci_rsp_get_link_state *)cmd.params;
-	*up = dpci_get_field(rsp_params->up, UP);
-
-	return 0;
-}
-
 /**
  * dpci_set_rx_queue() - Set Rx queue configuration
  * @mc_io:	Pointer to MC portal's I/O object
diff --git a/drivers/bus/fslmc/mc/dpcon.c b/drivers/bus/fslmc/mc/dpcon.c
index 92bd26512..3f6e04b97 100644
--- a/drivers/bus/fslmc/mc/dpcon.c
+++ b/drivers/bus/fslmc/mc/dpcon.c
@@ -295,36 +295,6 @@ int dpcon_get_attributes(struct fsl_mc_io *mc_io,
 	return 0;
 }
 
-/**
- * dpcon_set_notification() - Set DPCON notification destination
- * @mc_io:	Pointer to MC portal's I/O object
- * @cmd_flags:	Command flags; one or more of 'MC_CMD_FLAG_'
- * @token:	Token of DPCON object
- * @cfg:	Notification parameters
- *
- * Return:	'0' on Success; Error code otherwise
- */
-int dpcon_set_notification(struct fsl_mc_io *mc_io,
-			   uint32_t cmd_flags,
-			   uint16_t token,
-			   struct dpcon_notification_cfg *cfg)
-{
-	struct dpcon_cmd_set_notification *dpcon_cmd;
-	struct mc_command cmd = { 0 };
-
-	/* prepare command */
-	cmd.header = mc_encode_cmd_header(DPCON_CMDID_SET_NOTIFICATION,
-					  cmd_flags,
-					  token);
-	dpcon_cmd = (struct dpcon_cmd_set_notification *)cmd.params;
-	dpcon_cmd->dpio_id = cpu_to_le32(cfg->dpio_id);
-	dpcon_cmd->priority = cfg->priority;
-	dpcon_cmd->user_ctx = cpu_to_le64(cfg->user_ctx);
-
-	/* send command to mc*/
-	return mc_send_command(mc_io, &cmd);
-}
-
 /**
  * dpcon_get_api_version - Get Data Path Concentrator API version
  * @mc_io:	Pointer to MC portal's DPCON object
diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
index 9af9097e5..cf3d15267 100644
--- a/drivers/bus/fslmc/mc/fsl_dpci.h
+++ b/drivers/bus/fslmc/mc/fsl_dpci.h
@@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
 			uint16_t token,
 			struct dpci_attr *attr);
 
-/**
- * struct dpci_peer_attr - Structure representing the peer DPCI attributes
- * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
- * @num_of_priorities:	The pper's number of receive priorities; determines the
- *			number of transmit priorities for the local DPCI object
- */
-struct dpci_peer_attr {
-	int peer_id;
-	uint8_t num_of_priorities;
-};
-
-int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
-			     uint32_t cmd_flags,
-			     uint16_t token,
-			     struct dpci_peer_attr *attr);
-
-int dpci_get_link_state(struct fsl_mc_io *mc_io,
-			uint32_t cmd_flags,
-			uint16_t token,
-			int *up);
-
 /**
  * enum dpci_dest - DPCI destination types
  * @DPCI_DEST_NONE:	Unassigned destination; The queue is set in parked mode
diff --git a/drivers/bus/fslmc/mc/fsl_dpcon.h b/drivers/bus/fslmc/mc/fsl_dpcon.h
index fc0430dc1..36dd5f3c1 100644
--- a/drivers/bus/fslmc/mc/fsl_dpcon.h
+++ b/drivers/bus/fslmc/mc/fsl_dpcon.h
@@ -81,25 +81,6 @@ int dpcon_get_attributes(struct fsl_mc_io *mc_io,
 			 uint16_t token,
 			 struct dpcon_attr *attr);
 
-/**
- * struct dpcon_notification_cfg - Structure representing notification params
- * @dpio_id:	DPIO object ID; must be configured with a notification channel;
- *		to disable notifications set it to 'DPCON_INVALID_DPIO_ID';
- * @priority:	Priority selection within the DPIO channel; valid values
- *		are 0-7, depending on the number of priorities in that channel
- * @user_ctx:	User context value provided with each CDAN message
- */
-struct dpcon_notification_cfg {
-	int dpio_id;
-	uint8_t priority;
-	uint64_t user_ctx;
-};
-
-int dpcon_set_notification(struct fsl_mc_io *mc_io,
-			   uint32_t cmd_flags,
-			   uint16_t token,
-			   struct dpcon_notification_cfg *cfg);
-
 int dpcon_get_api_version(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
 			  uint16_t *major_ver,
-- 
2.19.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH v2 2/3] drivers: update MC firmware version for FSLMC bus
  2019-04-04  7:23 ` [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware Shreyansh Jain
  2019-04-04  7:23   ` Shreyansh Jain
  2019-04-04  7:23   ` [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code Shreyansh Jain
@ 2019-04-04  7:23   ` Shreyansh Jain
  2019-04-04  7:23     ` Shreyansh Jain
  2019-04-04  7:23   ` [dpdk-dev] [PATCH v2 3/3] doc: bump SDK support version for dpaa2 Shreyansh Jain
  2019-04-04 21:08   ` [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware Thomas Monjalon
  4 siblings, 1 reply; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-04  7:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

MC firmware is the core component of FSLMC bus and DPAA2 devices.
Prior to this patch, MC firmware supported 10.10.x version. This
patch bumps the min supported version to 10.14.x.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/mc/fsl_dpmng.h    |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c    |  1 +
 drivers/net/dpaa2/mc/dpni.c         | 13 ++++-
 drivers/net/dpaa2/mc/fsl_dpni.h     | 84 ++++++++++++++++++++++-------
 drivers/net/dpaa2/mc/fsl_dpni_cmd.h | 40 ++++++++++----
 5 files changed, 109 insertions(+), 31 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_dpmng.h b/drivers/bus/fslmc/mc/fsl_dpmng.h
index 8559bef87..bef2ef095 100644
--- a/drivers/bus/fslmc/mc/fsl_dpmng.h
+++ b/drivers/bus/fslmc/mc/fsl_dpmng.h
@@ -18,7 +18,7 @@ struct fsl_mc_io;
  * Management Complex firmware version information
  */
 #define MC_VER_MAJOR 10
-#define MC_VER_MINOR 10
+#define MC_VER_MINOR 14
 
 /**
  * struct mc_version
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 3fbc82977..98ef8a5f5 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -665,6 +665,7 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev,
 					 DPNI_CONG_OPT_WRITE_MEM_ON_ENTER |
 					 DPNI_CONG_OPT_WRITE_MEM_ON_EXIT |
 					 DPNI_CONG_OPT_COHERENT_WRITE;
+		cong_notif_cfg.cg_point = DPNI_CP_QUEUE;
 
 		ret = dpni_set_congestion_notification(dpni, CMD_PRI_LOW,
 						       priv->token,
diff --git a/drivers/net/dpaa2/mc/dpni.c b/drivers/net/dpaa2/mc/dpni.c
index 6c12a0ae1..362cd476f 100644
--- a/drivers/net/dpaa2/mc/dpni.c
+++ b/drivers/net/dpaa2/mc/dpni.c
@@ -125,6 +125,7 @@ int dpni_create(struct fsl_mc_io *mc_io,
 	cmd_params->vlan_filter_entries =  cfg->vlan_filter_entries;
 	cmd_params->qos_entries = cfg->qos_entries;
 	cmd_params->fs_entries = cpu_to_le16(cfg->fs_entries);
+	cmd_params->num_cgs = cfg->num_cgs;
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -593,6 +594,7 @@ int dpni_get_attributes(struct fsl_mc_io *mc_io,
 	attr->qos_key_size = rsp_params->qos_key_size;
 	attr->fs_key_size = rsp_params->fs_key_size;
 	attr->wriop_version = le16_to_cpu(rsp_params->wriop_version);
+	attr->num_cgs = rsp_params->num_cgs;
 
 	return 0;
 }
@@ -1800,6 +1802,8 @@ int dpni_set_congestion_notification(struct fsl_mc_io *mc_io,
 	cmd_params = (struct dpni_cmd_set_congestion_notification *)cmd.params;
 	cmd_params->qtype = qtype;
 	cmd_params->tc = tc_id;
+	cmd_params->congestion_point = cfg->cg_point;
+	cmd_params->cgid = (uint8_t)cfg->cgid;
 	cmd_params->dest_id = cpu_to_le32(cfg->dest_cfg.dest_id);
 	cmd_params->notification_mode = cpu_to_le16(cfg->notification_mode);
 	cmd_params->dest_priority = cfg->dest_cfg.priority;
@@ -1850,6 +1854,8 @@ int dpni_get_congestion_notification(struct fsl_mc_io *mc_io,
 	cmd_params = (struct dpni_cmd_get_congestion_notification *)cmd.params;
 	cmd_params->qtype = qtype;
 	cmd_params->tc = tc_id;
+	cmd_params->congestion_point = cfg->cg_point;
+	cmd_params->cgid = cfg->cgid;
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -1949,6 +1955,7 @@ int dpni_set_queue(struct fsl_mc_io *mc_io,
 		       queue->destination.hold_active);
 	cmd_params->flc = cpu_to_le64(queue->flc.value);
 	cmd_params->user_context = cpu_to_le64(queue->user_context);
+	cmd_params->cgid = queue->cgid;
 
 	/* send command to mc */
 	return mc_send_command(mc_io, &cmd);
@@ -2010,6 +2017,10 @@ int dpni_get_queue(struct fsl_mc_io *mc_io,
 	queue->user_context = le64_to_cpu(rsp_params->user_context);
 	qid->fqid = le32_to_cpu(rsp_params->fqid);
 	qid->qdbin = le16_to_cpu(rsp_params->qdbin);
+	if (dpni_get_field(rsp_params->flags, CGID_VALID))
+		queue->cgid = rsp_params->cgid;
+	else
+		queue->cgid = -1;
 
 	return 0;
 }
@@ -2031,7 +2042,7 @@ int dpni_get_statistics(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
 			uint8_t page,
-			uint8_t param,
+			uint16_t param,
 			union dpni_statistics *stat)
 {
 	struct mc_command cmd = { 0 };
diff --git a/drivers/net/dpaa2/mc/fsl_dpni.h b/drivers/net/dpaa2/mc/fsl_dpni.h
index aecdc8d1f..8b1cfbac7 100644
--- a/drivers/net/dpaa2/mc/fsl_dpni.h
+++ b/drivers/net/dpaa2/mc/fsl_dpni.h
@@ -91,6 +91,10 @@ struct fsl_mc_io;
  * All Tx traffic classes will use a single sender (ignore num_queueus for tx)
  */
 #define DPNI_OPT_SINGLE_SENDER			0x000100
+/**
+ * Define a custom number of congestion groups
+ */
+#define DPNI_OPT_CUSTOM_CG				0x000200
 
 int dpni_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
@@ -172,6 +176,7 @@ struct dpni_cfg {
 	uint8_t  num_tcs;
 	uint8_t  num_rx_tcs;
 	uint8_t  qos_entries;
+	uint8_t  num_cgs;
 };
 
 int dpni_create(struct fsl_mc_io *mc_io,
@@ -326,6 +331,7 @@ struct dpni_attr {
 	uint8_t  qos_key_size;
 	uint8_t  fs_key_size;
 	uint16_t wriop_version;
+	uint8_t  num_cgs;
 };
 
 int dpni_get_attributes(struct fsl_mc_io *mc_io,
@@ -638,6 +644,36 @@ union dpni_statistics {
  */
 #define DPNI_LINK_OPT_PFC_PAUSE	0x0000000000000010ULL
 
+/**
+ * Advertise 10MB full duplex
+ */
+#define DPNI_ADVERTISED_10BASET_FULL           0x0000000000000001ULL
+/**
+ * Advertise 100MB full duplex
+ */
+#define DPNI_ADVERTISED_100BASET_FULL          0x0000000000000002ULL
+/**
+ * Advertise 1GB full duplex
+ */
+#define DPNI_ADVERTISED_1000BASET_FULL         0x0000000000000004ULL
+/**
+ * Advertise auto-negotiation enable
+ */
+#define DPNI_ADVERTISED_AUTONEG                0x0000000000000008ULL
+/**
+ * Advertise 10GB full duplex
+ */
+#define DPNI_ADVERTISED_10000BASET_FULL        0x0000000000000010ULL
+/**
+ * Advertise 2.5GB full duplex
+ */
+#define DPNI_ADVERTISED_2500BASEX_FULL         0x0000000000000020ULL
+/**
+ * Advertise 5GB full duplex
+ */
+#define DPNI_ADVERTISED_5000BASET_FULL         0x0000000000000040ULL
+
+
 /**
  * struct - Structure representing DPNI link configuration
  * @rate: Rate
@@ -668,7 +704,7 @@ struct dpni_link_state {
 	uint32_t rate;
 	uint64_t options;
 	int up;
-	int     state_valid;
+	int state_valid;
 	uint64_t supported;
 	uint64_t advertising;
 };
@@ -850,7 +886,6 @@ enum dpni_congestion_unit {
 	DPNI_CONGESTION_UNIT_FRAMES
 };
 
-
 /**
  * enum dpni_dest - DPNI destination types
  * @DPNI_DEST_NONE: Unassigned destination; The queue is set in parked mode and
@@ -924,6 +959,25 @@ struct dpni_dest_cfg {
  */
 #define DPNI_CONG_OPT_FLOW_CONTROL	0x00000040
 
+/**
+ * enum dpni_congestion_point - Structure representing congestion point
+ * @DPNI_CP_QUEUE:	Set congestion per queue, identified by QUEUE_TYPE, TC
+ *			and QUEUE_INDEX
+ * @DPNI_CP_GROUP:	Set congestion per queue group. Depending on options
+ *			used to define the DPNI this can be either per
+ *			TC (default) or per interface
+ *			(DPNI_OPT_SHARED_CONGESTION set at DPNI create).
+ *			QUEUE_INDEX is ignored if this type is used.
+ * @DPNI_CP_CONGESTION_GROUP: Set per congestion group id. This will work
+ *		only if the DPNI is created with  DPNI_OPT_CUSTOM_CG option
+ */
+
+enum dpni_congestion_point {
+	DPNI_CP_QUEUE,
+	DPNI_CP_GROUP,
+	DPNI_CP_CONGESTION_GROUP,
+};
+
 /**
  * struct dpni_congestion_notification_cfg - congestion notification
  *		configuration
@@ -937,6 +991,8 @@ struct dpni_dest_cfg {
  *	contained in 'options'
  * @dest_cfg: CSCN can be send to either DPIO or DPCON WQ channel
  * @notification_mode: Mask of available options; use 'DPNI_CONG_OPT_<X>' values
+ * @cg_point: Congestion point settings
+ * @cgid: id of the congestion group. The index is relative to dpni.
  */
 
 struct dpni_congestion_notification_cfg {
@@ -947,6 +1003,8 @@ struct dpni_congestion_notification_cfg {
 	uint64_t message_iova;
 	struct dpni_dest_cfg dest_cfg;
 	uint16_t notification_mode;
+	enum dpni_congestion_point cg_point;
+	int cgid;
 };
 
 int dpni_set_congestion_notification(struct fsl_mc_io *mc_io,
@@ -1016,6 +1074,7 @@ int dpni_get_congestion_notification(struct fsl_mc_io *mc_io,
  *      FD[OFFSET].
  *      For more details check the Frame Descriptor section in the
  *      hardware documentation.
+ *@cgid :indicate the cgid to set relative to dpni
  */
 struct dpni_queue {
 	struct {
@@ -1029,6 +1088,7 @@ struct dpni_queue {
 		uint64_t value;
 		char stash_control;
 	} flc;
+	int cgid;
 };
 
 /**
@@ -1218,6 +1278,9 @@ int dpni_get_api_version(struct fsl_mc_io *mc_io,
  */
 #define DPNI_QUEUE_OPT_HOLD_ACTIVE	0x00000008
 
+#define DPNI_QUEUE_OPT_SET_CGID				0x00000040
+#define DPNI_QUEUE_OPT_CLEAR_CGID			0x00000080
+
 int dpni_set_queue(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint16_t token,
@@ -1240,28 +1303,13 @@ int dpni_get_statistics(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
 			uint8_t page,
-			uint8_t param,
+			uint16_t param,
 			union dpni_statistics *stat);
 
 int dpni_reset_statistics(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
 			  uint16_t token);
 
-/**
- * enum dpni_congestion_point - Structure representing congestion point
- * @DPNI_CP_QUEUE:	Set taildrop per queue, identified by QUEUE_TYPE, TC and
- *				QUEUE_INDEX
- * @DPNI_CP_GROUP:	Set taildrop per queue group. Depending on options used
- *				to define the DPNI this can be either per
- *				TC (default) or per interface
- *				(DPNI_OPT_SHARED_CONGESTION set at DPNI create).
- *				QUEUE_INDEX is ignored if this type is used.
- */
-enum dpni_congestion_point {
-	DPNI_CP_QUEUE,
-	DPNI_CP_GROUP,
-};
-
 /**
  * struct dpni_taildrop - Structure representing the taildrop
  * @enable:	Indicates whether the taildrop is active or not.
diff --git a/drivers/net/dpaa2/mc/fsl_dpni_cmd.h b/drivers/net/dpaa2/mc/fsl_dpni_cmd.h
index 9116e417e..5effbb300 100644
--- a/drivers/net/dpaa2/mc/fsl_dpni_cmd.h
+++ b/drivers/net/dpaa2/mc/fsl_dpni_cmd.h
@@ -9,7 +9,7 @@
 
 /* DPNI Version */
 #define DPNI_VER_MAJOR				7
-#define DPNI_VER_MINOR				8
+#define DPNI_VER_MINOR				9
 
 #define DPNI_CMD_BASE_VERSION			1
 #define DPNI_CMD_VERSION_2			2
@@ -23,13 +23,13 @@
 /* Command IDs */
 #define DPNI_CMDID_OPEN				DPNI_CMD(0x801)
 #define DPNI_CMDID_CLOSE			DPNI_CMD(0x800)
-#define DPNI_CMDID_CREATE			DPNI_CMD_V2(0x901)
+#define DPNI_CMDID_CREATE			DPNI_CMD_V3(0x901)
 #define DPNI_CMDID_DESTROY			DPNI_CMD(0x981)
 #define DPNI_CMDID_GET_API_VERSION		DPNI_CMD(0xa01)
 
 #define DPNI_CMDID_ENABLE			DPNI_CMD(0x002)
 #define DPNI_CMDID_DISABLE			DPNI_CMD(0x003)
-#define DPNI_CMDID_GET_ATTR			DPNI_CMD_V2(0x004)
+#define DPNI_CMDID_GET_ATTR			DPNI_CMD_V3(0x004)
 #define DPNI_CMDID_RESET			DPNI_CMD(0x005)
 #define DPNI_CMDID_IS_ENABLED			DPNI_CMD(0x006)
 
@@ -77,10 +77,10 @@
 #define DPNI_CMDID_REMOVE_FS_ENT		DPNI_CMD(0x245)
 #define DPNI_CMDID_CLR_FS_ENT			DPNI_CMD(0x246)
 
-#define DPNI_CMDID_GET_STATISTICS		DPNI_CMD_V2(0x25D)
+#define DPNI_CMDID_GET_STATISTICS		DPNI_CMD_V3(0x25D)
 #define DPNI_CMDID_RESET_STATISTICS		DPNI_CMD(0x25E)
-#define DPNI_CMDID_GET_QUEUE			DPNI_CMD(0x25F)
-#define DPNI_CMDID_SET_QUEUE			DPNI_CMD(0x260)
+#define DPNI_CMDID_GET_QUEUE			DPNI_CMD_V2(0x25F)
+#define DPNI_CMDID_SET_QUEUE			DPNI_CMD_V2(0x260)
 #define DPNI_CMDID_GET_TAILDROP			DPNI_CMD_V2(0x261)
 #define DPNI_CMDID_SET_TAILDROP			DPNI_CMD_V2(0x262)
 
@@ -89,8 +89,8 @@
 #define DPNI_CMDID_GET_BUFFER_LAYOUT		DPNI_CMD_V2(0x264)
 #define DPNI_CMDID_SET_BUFFER_LAYOUT		DPNI_CMD_V2(0x265)
 
-#define DPNI_CMDID_SET_CONGESTION_NOTIFICATION	DPNI_CMD(0x267)
-#define DPNI_CMDID_GET_CONGESTION_NOTIFICATION	DPNI_CMD(0x268)
+#define DPNI_CMDID_SET_CONGESTION_NOTIFICATION	DPNI_CMD_V2(0x267)
+#define DPNI_CMDID_GET_CONGESTION_NOTIFICATION	DPNI_CMD_V2(0x268)
 #define DPNI_CMDID_SET_EARLY_DROP		DPNI_CMD_V2(0x269)
 #define DPNI_CMDID_GET_EARLY_DROP		DPNI_CMD_V2(0x26A)
 #define DPNI_CMDID_GET_OFFLOAD			DPNI_CMD(0x26B)
@@ -131,6 +131,8 @@ struct dpni_cmd_create {
 	uint8_t pad3;
 	uint16_t fs_entries;
 	uint8_t num_rx_tcs;
+	uint8_t pad4;
+	uint8_t num_cgs;
 };
 
 struct dpni_cmd_destroy {
@@ -222,6 +224,7 @@ struct dpni_rsp_get_attr {
 	uint8_t qos_key_size;
 	uint8_t fs_key_size;
 	uint16_t wriop_version;
+	uint8_t num_cgs;
 };
 
 #define DPNI_ERROR_ACTION_SHIFT		0
@@ -315,7 +318,7 @@ struct dpni_rsp_get_tx_data_offset {
 
 struct dpni_cmd_get_statistics {
 	uint8_t page_number;
-	uint8_t param;
+	uint16_t param;
 };
 
 struct dpni_rsp_get_statistics {
@@ -464,6 +467,8 @@ struct dpni_cmd_get_queue {
 
 #define DPNI_DEST_TYPE_SHIFT		0
 #define DPNI_DEST_TYPE_SIZE		4
+#define DPNI_CGID_VALID_SHIFT		5
+#define DPNI_CGID_VALID_SIZE		1
 #define DPNI_STASH_CTRL_SHIFT		6
 #define DPNI_STASH_CTRL_SIZE		1
 #define DPNI_HOLD_ACTIVE_SHIFT		7
@@ -476,7 +481,9 @@ struct dpni_rsp_get_queue {
 	uint32_t dest_id;
 	uint16_t pad1;
 	uint8_t dest_prio;
-	/* From LSB: dest_type:4, pad:2, flc_stash_ctrl:1, hold_active:1 */
+	/* From LSB:
+	 * dest_type:4, pad:1, cgid_valid:1, flc_stash_ctrl:1, hold_active:1
+	 */
 	uint8_t flags;
 	/* response word 2 */
 	uint64_t flc;
@@ -485,6 +492,9 @@ struct dpni_rsp_get_queue {
 	/* response word 4 */
 	uint32_t fqid;
 	uint16_t qdbin;
+	uint16_t pad2;
+	/* response word 5*/
+	uint8_t cgid;
 };
 
 struct dpni_cmd_set_queue {
@@ -503,6 +513,8 @@ struct dpni_cmd_set_queue {
 	uint64_t flc;
 	/* cmd word 3 */
 	uint64_t user_context;
+	/* cmd word 4 */
+	uint8_t cgid;
 };
 
 #define DPNI_DISCARD_ON_MISS_SHIFT	0
@@ -655,7 +667,10 @@ struct dpni_tx_confirmation_mode {
 struct dpni_cmd_set_congestion_notification {
 	uint8_t qtype;
 	uint8_t tc;
-	uint8_t pad[6];
+	uint8_t pad;
+	uint8_t congestion_point;
+	uint8_t cgid;
+	uint8_t pad2[3];
 	uint32_t dest_id;
 	uint16_t notification_mode;
 	uint8_t dest_priority;
@@ -670,6 +685,9 @@ struct dpni_cmd_set_congestion_notification {
 struct dpni_cmd_get_congestion_notification {
 	uint8_t qtype;
 	uint8_t tc;
+	uint8_t pad;
+	uint8_t congestion_point;
+	uint8_t cgid;
 };
 
 struct dpni_rsp_get_congestion_notification {
-- 
2.19.1

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH v2 2/3] drivers: update MC firmware version for FSLMC bus
  2019-04-04  7:23   ` [dpdk-dev] [PATCH v2 2/3] drivers: update MC firmware version for FSLMC bus Shreyansh Jain
@ 2019-04-04  7:23     ` Shreyansh Jain
  0 siblings, 0 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-04  7:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

MC firmware is the core component of FSLMC bus and DPAA2 devices.
Prior to this patch, MC firmware supported 10.10.x version. This
patch bumps the min supported version to 10.14.x.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
 drivers/bus/fslmc/mc/fsl_dpmng.h    |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c    |  1 +
 drivers/net/dpaa2/mc/dpni.c         | 13 ++++-
 drivers/net/dpaa2/mc/fsl_dpni.h     | 84 ++++++++++++++++++++++-------
 drivers/net/dpaa2/mc/fsl_dpni_cmd.h | 40 ++++++++++----
 5 files changed, 109 insertions(+), 31 deletions(-)

diff --git a/drivers/bus/fslmc/mc/fsl_dpmng.h b/drivers/bus/fslmc/mc/fsl_dpmng.h
index 8559bef87..bef2ef095 100644
--- a/drivers/bus/fslmc/mc/fsl_dpmng.h
+++ b/drivers/bus/fslmc/mc/fsl_dpmng.h
@@ -18,7 +18,7 @@ struct fsl_mc_io;
  * Management Complex firmware version information
  */
 #define MC_VER_MAJOR 10
-#define MC_VER_MINOR 10
+#define MC_VER_MINOR 14
 
 /**
  * struct mc_version
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 3fbc82977..98ef8a5f5 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -665,6 +665,7 @@ dpaa2_dev_tx_queue_setup(struct rte_eth_dev *dev,
 					 DPNI_CONG_OPT_WRITE_MEM_ON_ENTER |
 					 DPNI_CONG_OPT_WRITE_MEM_ON_EXIT |
 					 DPNI_CONG_OPT_COHERENT_WRITE;
+		cong_notif_cfg.cg_point = DPNI_CP_QUEUE;
 
 		ret = dpni_set_congestion_notification(dpni, CMD_PRI_LOW,
 						       priv->token,
diff --git a/drivers/net/dpaa2/mc/dpni.c b/drivers/net/dpaa2/mc/dpni.c
index 6c12a0ae1..362cd476f 100644
--- a/drivers/net/dpaa2/mc/dpni.c
+++ b/drivers/net/dpaa2/mc/dpni.c
@@ -125,6 +125,7 @@ int dpni_create(struct fsl_mc_io *mc_io,
 	cmd_params->vlan_filter_entries =  cfg->vlan_filter_entries;
 	cmd_params->qos_entries = cfg->qos_entries;
 	cmd_params->fs_entries = cpu_to_le16(cfg->fs_entries);
+	cmd_params->num_cgs = cfg->num_cgs;
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -593,6 +594,7 @@ int dpni_get_attributes(struct fsl_mc_io *mc_io,
 	attr->qos_key_size = rsp_params->qos_key_size;
 	attr->fs_key_size = rsp_params->fs_key_size;
 	attr->wriop_version = le16_to_cpu(rsp_params->wriop_version);
+	attr->num_cgs = rsp_params->num_cgs;
 
 	return 0;
 }
@@ -1800,6 +1802,8 @@ int dpni_set_congestion_notification(struct fsl_mc_io *mc_io,
 	cmd_params = (struct dpni_cmd_set_congestion_notification *)cmd.params;
 	cmd_params->qtype = qtype;
 	cmd_params->tc = tc_id;
+	cmd_params->congestion_point = cfg->cg_point;
+	cmd_params->cgid = (uint8_t)cfg->cgid;
 	cmd_params->dest_id = cpu_to_le32(cfg->dest_cfg.dest_id);
 	cmd_params->notification_mode = cpu_to_le16(cfg->notification_mode);
 	cmd_params->dest_priority = cfg->dest_cfg.priority;
@@ -1850,6 +1854,8 @@ int dpni_get_congestion_notification(struct fsl_mc_io *mc_io,
 	cmd_params = (struct dpni_cmd_get_congestion_notification *)cmd.params;
 	cmd_params->qtype = qtype;
 	cmd_params->tc = tc_id;
+	cmd_params->congestion_point = cfg->cg_point;
+	cmd_params->cgid = cfg->cgid;
 
 	/* send command to mc*/
 	err = mc_send_command(mc_io, &cmd);
@@ -1949,6 +1955,7 @@ int dpni_set_queue(struct fsl_mc_io *mc_io,
 		       queue->destination.hold_active);
 	cmd_params->flc = cpu_to_le64(queue->flc.value);
 	cmd_params->user_context = cpu_to_le64(queue->user_context);
+	cmd_params->cgid = queue->cgid;
 
 	/* send command to mc */
 	return mc_send_command(mc_io, &cmd);
@@ -2010,6 +2017,10 @@ int dpni_get_queue(struct fsl_mc_io *mc_io,
 	queue->user_context = le64_to_cpu(rsp_params->user_context);
 	qid->fqid = le32_to_cpu(rsp_params->fqid);
 	qid->qdbin = le16_to_cpu(rsp_params->qdbin);
+	if (dpni_get_field(rsp_params->flags, CGID_VALID))
+		queue->cgid = rsp_params->cgid;
+	else
+		queue->cgid = -1;
 
 	return 0;
 }
@@ -2031,7 +2042,7 @@ int dpni_get_statistics(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
 			uint8_t page,
-			uint8_t param,
+			uint16_t param,
 			union dpni_statistics *stat)
 {
 	struct mc_command cmd = { 0 };
diff --git a/drivers/net/dpaa2/mc/fsl_dpni.h b/drivers/net/dpaa2/mc/fsl_dpni.h
index aecdc8d1f..8b1cfbac7 100644
--- a/drivers/net/dpaa2/mc/fsl_dpni.h
+++ b/drivers/net/dpaa2/mc/fsl_dpni.h
@@ -91,6 +91,10 @@ struct fsl_mc_io;
  * All Tx traffic classes will use a single sender (ignore num_queueus for tx)
  */
 #define DPNI_OPT_SINGLE_SENDER			0x000100
+/**
+ * Define a custom number of congestion groups
+ */
+#define DPNI_OPT_CUSTOM_CG				0x000200
 
 int dpni_open(struct fsl_mc_io *mc_io,
 	      uint32_t cmd_flags,
@@ -172,6 +176,7 @@ struct dpni_cfg {
 	uint8_t  num_tcs;
 	uint8_t  num_rx_tcs;
 	uint8_t  qos_entries;
+	uint8_t  num_cgs;
 };
 
 int dpni_create(struct fsl_mc_io *mc_io,
@@ -326,6 +331,7 @@ struct dpni_attr {
 	uint8_t  qos_key_size;
 	uint8_t  fs_key_size;
 	uint16_t wriop_version;
+	uint8_t  num_cgs;
 };
 
 int dpni_get_attributes(struct fsl_mc_io *mc_io,
@@ -638,6 +644,36 @@ union dpni_statistics {
  */
 #define DPNI_LINK_OPT_PFC_PAUSE	0x0000000000000010ULL
 
+/**
+ * Advertise 10MB full duplex
+ */
+#define DPNI_ADVERTISED_10BASET_FULL           0x0000000000000001ULL
+/**
+ * Advertise 100MB full duplex
+ */
+#define DPNI_ADVERTISED_100BASET_FULL          0x0000000000000002ULL
+/**
+ * Advertise 1GB full duplex
+ */
+#define DPNI_ADVERTISED_1000BASET_FULL         0x0000000000000004ULL
+/**
+ * Advertise auto-negotiation enable
+ */
+#define DPNI_ADVERTISED_AUTONEG                0x0000000000000008ULL
+/**
+ * Advertise 10GB full duplex
+ */
+#define DPNI_ADVERTISED_10000BASET_FULL        0x0000000000000010ULL
+/**
+ * Advertise 2.5GB full duplex
+ */
+#define DPNI_ADVERTISED_2500BASEX_FULL         0x0000000000000020ULL
+/**
+ * Advertise 5GB full duplex
+ */
+#define DPNI_ADVERTISED_5000BASET_FULL         0x0000000000000040ULL
+
+
 /**
  * struct - Structure representing DPNI link configuration
  * @rate: Rate
@@ -668,7 +704,7 @@ struct dpni_link_state {
 	uint32_t rate;
 	uint64_t options;
 	int up;
-	int     state_valid;
+	int state_valid;
 	uint64_t supported;
 	uint64_t advertising;
 };
@@ -850,7 +886,6 @@ enum dpni_congestion_unit {
 	DPNI_CONGESTION_UNIT_FRAMES
 };
 
-
 /**
  * enum dpni_dest - DPNI destination types
  * @DPNI_DEST_NONE: Unassigned destination; The queue is set in parked mode and
@@ -924,6 +959,25 @@ struct dpni_dest_cfg {
  */
 #define DPNI_CONG_OPT_FLOW_CONTROL	0x00000040
 
+/**
+ * enum dpni_congestion_point - Structure representing congestion point
+ * @DPNI_CP_QUEUE:	Set congestion per queue, identified by QUEUE_TYPE, TC
+ *			and QUEUE_INDEX
+ * @DPNI_CP_GROUP:	Set congestion per queue group. Depending on options
+ *			used to define the DPNI this can be either per
+ *			TC (default) or per interface
+ *			(DPNI_OPT_SHARED_CONGESTION set at DPNI create).
+ *			QUEUE_INDEX is ignored if this type is used.
+ * @DPNI_CP_CONGESTION_GROUP: Set per congestion group id. This will work
+ *		only if the DPNI is created with  DPNI_OPT_CUSTOM_CG option
+ */
+
+enum dpni_congestion_point {
+	DPNI_CP_QUEUE,
+	DPNI_CP_GROUP,
+	DPNI_CP_CONGESTION_GROUP,
+};
+
 /**
  * struct dpni_congestion_notification_cfg - congestion notification
  *		configuration
@@ -937,6 +991,8 @@ struct dpni_dest_cfg {
  *	contained in 'options'
  * @dest_cfg: CSCN can be send to either DPIO or DPCON WQ channel
  * @notification_mode: Mask of available options; use 'DPNI_CONG_OPT_<X>' values
+ * @cg_point: Congestion point settings
+ * @cgid: id of the congestion group. The index is relative to dpni.
  */
 
 struct dpni_congestion_notification_cfg {
@@ -947,6 +1003,8 @@ struct dpni_congestion_notification_cfg {
 	uint64_t message_iova;
 	struct dpni_dest_cfg dest_cfg;
 	uint16_t notification_mode;
+	enum dpni_congestion_point cg_point;
+	int cgid;
 };
 
 int dpni_set_congestion_notification(struct fsl_mc_io *mc_io,
@@ -1016,6 +1074,7 @@ int dpni_get_congestion_notification(struct fsl_mc_io *mc_io,
  *      FD[OFFSET].
  *      For more details check the Frame Descriptor section in the
  *      hardware documentation.
+ *@cgid :indicate the cgid to set relative to dpni
  */
 struct dpni_queue {
 	struct {
@@ -1029,6 +1088,7 @@ struct dpni_queue {
 		uint64_t value;
 		char stash_control;
 	} flc;
+	int cgid;
 };
 
 /**
@@ -1218,6 +1278,9 @@ int dpni_get_api_version(struct fsl_mc_io *mc_io,
  */
 #define DPNI_QUEUE_OPT_HOLD_ACTIVE	0x00000008
 
+#define DPNI_QUEUE_OPT_SET_CGID				0x00000040
+#define DPNI_QUEUE_OPT_CLEAR_CGID			0x00000080
+
 int dpni_set_queue(struct fsl_mc_io *mc_io,
 		   uint32_t cmd_flags,
 		   uint16_t token,
@@ -1240,28 +1303,13 @@ int dpni_get_statistics(struct fsl_mc_io *mc_io,
 			uint32_t cmd_flags,
 			uint16_t token,
 			uint8_t page,
-			uint8_t param,
+			uint16_t param,
 			union dpni_statistics *stat);
 
 int dpni_reset_statistics(struct fsl_mc_io *mc_io,
 			  uint32_t cmd_flags,
 			  uint16_t token);
 
-/**
- * enum dpni_congestion_point - Structure representing congestion point
- * @DPNI_CP_QUEUE:	Set taildrop per queue, identified by QUEUE_TYPE, TC and
- *				QUEUE_INDEX
- * @DPNI_CP_GROUP:	Set taildrop per queue group. Depending on options used
- *				to define the DPNI this can be either per
- *				TC (default) or per interface
- *				(DPNI_OPT_SHARED_CONGESTION set at DPNI create).
- *				QUEUE_INDEX is ignored if this type is used.
- */
-enum dpni_congestion_point {
-	DPNI_CP_QUEUE,
-	DPNI_CP_GROUP,
-};
-
 /**
  * struct dpni_taildrop - Structure representing the taildrop
  * @enable:	Indicates whether the taildrop is active or not.
diff --git a/drivers/net/dpaa2/mc/fsl_dpni_cmd.h b/drivers/net/dpaa2/mc/fsl_dpni_cmd.h
index 9116e417e..5effbb300 100644
--- a/drivers/net/dpaa2/mc/fsl_dpni_cmd.h
+++ b/drivers/net/dpaa2/mc/fsl_dpni_cmd.h
@@ -9,7 +9,7 @@
 
 /* DPNI Version */
 #define DPNI_VER_MAJOR				7
-#define DPNI_VER_MINOR				8
+#define DPNI_VER_MINOR				9
 
 #define DPNI_CMD_BASE_VERSION			1
 #define DPNI_CMD_VERSION_2			2
@@ -23,13 +23,13 @@
 /* Command IDs */
 #define DPNI_CMDID_OPEN				DPNI_CMD(0x801)
 #define DPNI_CMDID_CLOSE			DPNI_CMD(0x800)
-#define DPNI_CMDID_CREATE			DPNI_CMD_V2(0x901)
+#define DPNI_CMDID_CREATE			DPNI_CMD_V3(0x901)
 #define DPNI_CMDID_DESTROY			DPNI_CMD(0x981)
 #define DPNI_CMDID_GET_API_VERSION		DPNI_CMD(0xa01)
 
 #define DPNI_CMDID_ENABLE			DPNI_CMD(0x002)
 #define DPNI_CMDID_DISABLE			DPNI_CMD(0x003)
-#define DPNI_CMDID_GET_ATTR			DPNI_CMD_V2(0x004)
+#define DPNI_CMDID_GET_ATTR			DPNI_CMD_V3(0x004)
 #define DPNI_CMDID_RESET			DPNI_CMD(0x005)
 #define DPNI_CMDID_IS_ENABLED			DPNI_CMD(0x006)
 
@@ -77,10 +77,10 @@
 #define DPNI_CMDID_REMOVE_FS_ENT		DPNI_CMD(0x245)
 #define DPNI_CMDID_CLR_FS_ENT			DPNI_CMD(0x246)
 
-#define DPNI_CMDID_GET_STATISTICS		DPNI_CMD_V2(0x25D)
+#define DPNI_CMDID_GET_STATISTICS		DPNI_CMD_V3(0x25D)
 #define DPNI_CMDID_RESET_STATISTICS		DPNI_CMD(0x25E)
-#define DPNI_CMDID_GET_QUEUE			DPNI_CMD(0x25F)
-#define DPNI_CMDID_SET_QUEUE			DPNI_CMD(0x260)
+#define DPNI_CMDID_GET_QUEUE			DPNI_CMD_V2(0x25F)
+#define DPNI_CMDID_SET_QUEUE			DPNI_CMD_V2(0x260)
 #define DPNI_CMDID_GET_TAILDROP			DPNI_CMD_V2(0x261)
 #define DPNI_CMDID_SET_TAILDROP			DPNI_CMD_V2(0x262)
 
@@ -89,8 +89,8 @@
 #define DPNI_CMDID_GET_BUFFER_LAYOUT		DPNI_CMD_V2(0x264)
 #define DPNI_CMDID_SET_BUFFER_LAYOUT		DPNI_CMD_V2(0x265)
 
-#define DPNI_CMDID_SET_CONGESTION_NOTIFICATION	DPNI_CMD(0x267)
-#define DPNI_CMDID_GET_CONGESTION_NOTIFICATION	DPNI_CMD(0x268)
+#define DPNI_CMDID_SET_CONGESTION_NOTIFICATION	DPNI_CMD_V2(0x267)
+#define DPNI_CMDID_GET_CONGESTION_NOTIFICATION	DPNI_CMD_V2(0x268)
 #define DPNI_CMDID_SET_EARLY_DROP		DPNI_CMD_V2(0x269)
 #define DPNI_CMDID_GET_EARLY_DROP		DPNI_CMD_V2(0x26A)
 #define DPNI_CMDID_GET_OFFLOAD			DPNI_CMD(0x26B)
@@ -131,6 +131,8 @@ struct dpni_cmd_create {
 	uint8_t pad3;
 	uint16_t fs_entries;
 	uint8_t num_rx_tcs;
+	uint8_t pad4;
+	uint8_t num_cgs;
 };
 
 struct dpni_cmd_destroy {
@@ -222,6 +224,7 @@ struct dpni_rsp_get_attr {
 	uint8_t qos_key_size;
 	uint8_t fs_key_size;
 	uint16_t wriop_version;
+	uint8_t num_cgs;
 };
 
 #define DPNI_ERROR_ACTION_SHIFT		0
@@ -315,7 +318,7 @@ struct dpni_rsp_get_tx_data_offset {
 
 struct dpni_cmd_get_statistics {
 	uint8_t page_number;
-	uint8_t param;
+	uint16_t param;
 };
 
 struct dpni_rsp_get_statistics {
@@ -464,6 +467,8 @@ struct dpni_cmd_get_queue {
 
 #define DPNI_DEST_TYPE_SHIFT		0
 #define DPNI_DEST_TYPE_SIZE		4
+#define DPNI_CGID_VALID_SHIFT		5
+#define DPNI_CGID_VALID_SIZE		1
 #define DPNI_STASH_CTRL_SHIFT		6
 #define DPNI_STASH_CTRL_SIZE		1
 #define DPNI_HOLD_ACTIVE_SHIFT		7
@@ -476,7 +481,9 @@ struct dpni_rsp_get_queue {
 	uint32_t dest_id;
 	uint16_t pad1;
 	uint8_t dest_prio;
-	/* From LSB: dest_type:4, pad:2, flc_stash_ctrl:1, hold_active:1 */
+	/* From LSB:
+	 * dest_type:4, pad:1, cgid_valid:1, flc_stash_ctrl:1, hold_active:1
+	 */
 	uint8_t flags;
 	/* response word 2 */
 	uint64_t flc;
@@ -485,6 +492,9 @@ struct dpni_rsp_get_queue {
 	/* response word 4 */
 	uint32_t fqid;
 	uint16_t qdbin;
+	uint16_t pad2;
+	/* response word 5*/
+	uint8_t cgid;
 };
 
 struct dpni_cmd_set_queue {
@@ -503,6 +513,8 @@ struct dpni_cmd_set_queue {
 	uint64_t flc;
 	/* cmd word 3 */
 	uint64_t user_context;
+	/* cmd word 4 */
+	uint8_t cgid;
 };
 
 #define DPNI_DISCARD_ON_MISS_SHIFT	0
@@ -655,7 +667,10 @@ struct dpni_tx_confirmation_mode {
 struct dpni_cmd_set_congestion_notification {
 	uint8_t qtype;
 	uint8_t tc;
-	uint8_t pad[6];
+	uint8_t pad;
+	uint8_t congestion_point;
+	uint8_t cgid;
+	uint8_t pad2[3];
 	uint32_t dest_id;
 	uint16_t notification_mode;
 	uint8_t dest_priority;
@@ -670,6 +685,9 @@ struct dpni_cmd_set_congestion_notification {
 struct dpni_cmd_get_congestion_notification {
 	uint8_t qtype;
 	uint8_t tc;
+	uint8_t pad;
+	uint8_t congestion_point;
+	uint8_t cgid;
 };
 
 struct dpni_rsp_get_congestion_notification {
-- 
2.19.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH v2 3/3] doc: bump SDK support version for dpaa2
  2019-04-04  7:23 ` [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware Shreyansh Jain
                     ` (2 preceding siblings ...)
  2019-04-04  7:23   ` [dpdk-dev] [PATCH v2 2/3] drivers: update MC firmware version for FSLMC bus Shreyansh Jain
@ 2019-04-04  7:23   ` Shreyansh Jain
  2019-04-04  7:23     ` Shreyansh Jain
  2019-04-04 21:08   ` [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware Thomas Monjalon
  4 siblings, 1 reply; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-04  7:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

With the change in MC firmware, minimum supported version of
the Layerscape SDK too needs to be changed.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 doc/guides/nics/dpaa2.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/dpaa2.rst b/doc/guides/nics/dpaa2.rst
index 392ab0580..d74d8f899 100644
--- a/doc/guides/nics/dpaa2.rst
+++ b/doc/guides/nics/dpaa2.rst
@@ -421,8 +421,8 @@ See :doc:`../platform/dpaa2` for setup information
 
 Currently supported by DPDK:
 
-- NXP SDK **18.09+**.
-- MC Firmware version **10.10.0** and higher.
+- NXP SDK **18.11+**.
+- MC Firmware version **10.14.0** and higher.
 - Supported architectures:  **arm64 LE**.
 
 - Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup the basic DPDK environment.
-- 
2.19.1

^ permalink raw reply	[flat|nested] 32+ messages in thread

* [dpdk-dev] [PATCH v2 3/3] doc: bump SDK support version for dpaa2
  2019-04-04  7:23   ` [dpdk-dev] [PATCH v2 3/3] doc: bump SDK support version for dpaa2 Shreyansh Jain
@ 2019-04-04  7:23     ` Shreyansh Jain
  0 siblings, 0 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-04  7:23 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, Shreyansh Jain

With the change in MC firmware, minimum supported version of
the Layerscape SDK too needs to be changed.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
---
 doc/guides/nics/dpaa2.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/guides/nics/dpaa2.rst b/doc/guides/nics/dpaa2.rst
index 392ab0580..d74d8f899 100644
--- a/doc/guides/nics/dpaa2.rst
+++ b/doc/guides/nics/dpaa2.rst
@@ -421,8 +421,8 @@ See :doc:`../platform/dpaa2` for setup information
 
 Currently supported by DPDK:
 
-- NXP SDK **18.09+**.
-- MC Firmware version **10.10.0** and higher.
+- NXP SDK **18.11+**.
+- MC Firmware version **10.14.0** and higher.
 - Supported architectures:  **arm64 LE**.
 
 - Follow the DPDK :ref:`Getting Started Guide for Linux <linux_gsg>` to setup the basic DPDK environment.
-- 
2.19.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware
  2019-04-04  7:23 ` [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware Shreyansh Jain
                     ` (3 preceding siblings ...)
  2019-04-04  7:23   ` [dpdk-dev] [PATCH v2 3/3] doc: bump SDK support version for dpaa2 Shreyansh Jain
@ 2019-04-04 21:08   ` Thomas Monjalon
  2019-04-04 21:08     ` Thomas Monjalon
  4 siblings, 1 reply; 32+ messages in thread
From: Thomas Monjalon @ 2019-04-04 21:08 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: dev, ferruh.yigit

04/04/2019 09:23, Shreyansh Jain:
> Based on net-next: 69f805ac18abe
> 
> All the patches are strictly within DPAA2/FSLMC driver area.
> 
> MC firmware is the core component of FSLMC bus which enables
> all the dpaa2 devices (eth, crypto etc).
> With recent release of NXP's layerscape SDK, the MC firmware
> has been bumped up. These patches updates only necessary
> changes so as to maintain version compatibility.
> 
> v1->v2:
>  - In last patch (patch 2), one of a recent fix (e94be227b7)
>    was overwritten. Restoring that change.
> 
> Shreyansh Jain (3):
>   bus/fslmc: cleanup unused firmware code
>   drivers: update MC firmware version for FSLMC bus
>   doc: bump SDK support version for dpaa2

Applied, thanks

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware
  2019-04-04 21:08   ` [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware Thomas Monjalon
@ 2019-04-04 21:08     ` Thomas Monjalon
  0 siblings, 0 replies; 32+ messages in thread
From: Thomas Monjalon @ 2019-04-04 21:08 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: dev, ferruh.yigit

04/04/2019 09:23, Shreyansh Jain:
> Based on net-next: 69f805ac18abe
> 
> All the patches are strictly within DPAA2/FSLMC driver area.
> 
> MC firmware is the core component of FSLMC bus which enables
> all the dpaa2 devices (eth, crypto etc).
> With recent release of NXP's layerscape SDK, the MC firmware
> has been bumped up. These patches updates only necessary
> changes so as to maintain version compatibility.
> 
> v1->v2:
>  - In last patch (patch 2), one of a recent fix (e94be227b7)
>    was overwritten. Restoring that change.
> 
> Shreyansh Jain (3):
>   bus/fslmc: cleanup unused firmware code
>   drivers: update MC firmware version for FSLMC bus
>   doc: bump SDK support version for dpaa2

Applied, thanks




^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-04  7:23   ` [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code Shreyansh Jain
  2019-04-04  7:23     ` Shreyansh Jain
@ 2019-04-04 21:29     ` Ferruh Yigit
  2019-04-04 21:29       ` Ferruh Yigit
  2019-04-04 21:43       ` Thomas Monjalon
  1 sibling, 2 replies; 32+ messages in thread
From: Ferruh Yigit @ 2019-04-04 21:29 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: dev

On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
> Removes some unused firmware code which was added in last bump
> of the firmware version. No current features uses these APIs.
> 
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>

<...>

> diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
> index 9af9097e5..cf3d15267 100644
> --- a/drivers/bus/fslmc/mc/fsl_dpci.h
> +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
> @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
>  			uint16_t token,
>  			struct dpci_attr *attr);
>  
> -/**
> - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
> - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
> - * @num_of_priorities:	The pper's number of receive priorities; determines the
> - *			number of transmit priorities for the local DPCI object
> - */
> -struct dpci_peer_attr {
> -	int peer_id;
> -	uint8_t num_of_priorities;
> -};
> -
> -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
> -			     uint32_t cmd_flags,
> -			     uint16_t token,
> -			     struct dpci_peer_attr *attr);
> -
> -int dpci_get_link_state(struct fsl_mc_io *mc_io,
> -			uint32_t cmd_flags,
> -			uint16_t token,
> -			int *up);

These needs to be removed from .map file too.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-04 21:29     ` Ferruh Yigit
@ 2019-04-04 21:29       ` Ferruh Yigit
  2019-04-04 21:43       ` Thomas Monjalon
  1 sibling, 0 replies; 32+ messages in thread
From: Ferruh Yigit @ 2019-04-04 21:29 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: dev

On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
> Removes some unused firmware code which was added in last bump
> of the firmware version. No current features uses these APIs.
> 
> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>

<...>

> diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
> index 9af9097e5..cf3d15267 100644
> --- a/drivers/bus/fslmc/mc/fsl_dpci.h
> +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
> @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
>  			uint16_t token,
>  			struct dpci_attr *attr);
>  
> -/**
> - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
> - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
> - * @num_of_priorities:	The pper's number of receive priorities; determines the
> - *			number of transmit priorities for the local DPCI object
> - */
> -struct dpci_peer_attr {
> -	int peer_id;
> -	uint8_t num_of_priorities;
> -};
> -
> -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
> -			     uint32_t cmd_flags,
> -			     uint16_t token,
> -			     struct dpci_peer_attr *attr);
> -
> -int dpci_get_link_state(struct fsl_mc_io *mc_io,
> -			uint32_t cmd_flags,
> -			uint16_t token,
> -			int *up);

These needs to be removed from .map file too.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-04 21:29     ` Ferruh Yigit
  2019-04-04 21:29       ` Ferruh Yigit
@ 2019-04-04 21:43       ` Thomas Monjalon
  2019-04-04 21:43         ` Thomas Monjalon
  2019-04-05 11:19         ` Shreyansh Jain
  1 sibling, 2 replies; 32+ messages in thread
From: Thomas Monjalon @ 2019-04-04 21:43 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Shreyansh Jain

04/04/2019 23:29, Ferruh Yigit:
> On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
> > Removes some unused firmware code which was added in last bump
> > of the firmware version. No current features uses these APIs.
> > 
> > Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> 
> <...>
> 
> > diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
> > index 9af9097e5..cf3d15267 100644
> > --- a/drivers/bus/fslmc/mc/fsl_dpci.h
> > +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
> > @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
> >  			uint16_t token,
> >  			struct dpci_attr *attr);
> >  
> > -/**
> > - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
> > - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
> > - * @num_of_priorities:	The pper's number of receive priorities; determines the
> > - *			number of transmit priorities for the local DPCI object
> > - */
> > -struct dpci_peer_attr {
> > -	int peer_id;
> > -	uint8_t num_of_priorities;
> > -};
> > -
> > -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
> > -			     uint32_t cmd_flags,
> > -			     uint16_t token,
> > -			     struct dpci_peer_attr *attr);
> > -
> > -int dpci_get_link_state(struct fsl_mc_io *mc_io,
> > -			uint32_t cmd_flags,
> > -			uint16_t token,
> > -			int *up);
> 
> These needs to be removed from .map file too.

Removed from master.
Thanks for the catch.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-04 21:43       ` Thomas Monjalon
@ 2019-04-04 21:43         ` Thomas Monjalon
  2019-04-05 11:19         ` Shreyansh Jain
  1 sibling, 0 replies; 32+ messages in thread
From: Thomas Monjalon @ 2019-04-04 21:43 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Shreyansh Jain

04/04/2019 23:29, Ferruh Yigit:
> On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
> > Removes some unused firmware code which was added in last bump
> > of the firmware version. No current features uses these APIs.
> > 
> > Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> 
> <...>
> 
> > diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
> > index 9af9097e5..cf3d15267 100644
> > --- a/drivers/bus/fslmc/mc/fsl_dpci.h
> > +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
> > @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
> >  			uint16_t token,
> >  			struct dpci_attr *attr);
> >  
> > -/**
> > - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
> > - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
> > - * @num_of_priorities:	The pper's number of receive priorities; determines the
> > - *			number of transmit priorities for the local DPCI object
> > - */
> > -struct dpci_peer_attr {
> > -	int peer_id;
> > -	uint8_t num_of_priorities;
> > -};
> > -
> > -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
> > -			     uint32_t cmd_flags,
> > -			     uint16_t token,
> > -			     struct dpci_peer_attr *attr);
> > -
> > -int dpci_get_link_state(struct fsl_mc_io *mc_io,
> > -			uint32_t cmd_flags,
> > -			uint16_t token,
> > -			int *up);
> 
> These needs to be removed from .map file too.

Removed from master.
Thanks for the catch.



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-04 21:43       ` Thomas Monjalon
  2019-04-04 21:43         ` Thomas Monjalon
@ 2019-04-05 11:19         ` Shreyansh Jain
  2019-04-05 11:19           ` Shreyansh Jain
                             ` (2 more replies)
  1 sibling, 3 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-05 11:19 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Thomas Monjalon, dev

On 05/04/19 3:13 AM, Thomas Monjalon wrote:
> 04/04/2019 23:29, Ferruh Yigit:
>> On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
>>> Removes some unused firmware code which was added in last bump
>>> of the firmware version. No current features uses these APIs.
>>>
>>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>>
>> <...>
>>
>>> diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
>>> index 9af9097e5..cf3d15267 100644
>>> --- a/drivers/bus/fslmc/mc/fsl_dpci.h
>>> +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
>>> @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
>>>   			uint16_t token,
>>>   			struct dpci_attr *attr);
>>>   
>>> -/**
>>> - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
>>> - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
>>> - * @num_of_priorities:	The pper's number of receive priorities; determines the
>>> - *			number of transmit priorities for the local DPCI object
>>> - */
>>> -struct dpci_peer_attr {
>>> -	int peer_id;
>>> -	uint8_t num_of_priorities;
>>> -};
>>> -
>>> -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
>>> -			     uint32_t cmd_flags,
>>> -			     uint16_t token,
>>> -			     struct dpci_peer_attr *attr);
>>> -
>>> -int dpci_get_link_state(struct fsl_mc_io *mc_io,
>>> -			uint32_t cmd_flags,
>>> -			uint16_t token,
>>> -			int *up);
>>
>> These needs to be removed from .map file too.

Wow! indeed a great catch.
And, yup, my bad. Sorry! I wish I had your eye-for-detail.

> 
> Removed from master.
> Thanks for the catch.
> 
>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-05 11:19         ` Shreyansh Jain
@ 2019-04-05 11:19           ` Shreyansh Jain
  2019-04-05 11:37           ` Ferruh Yigit
  2019-04-05 11:38           ` Shreyansh Jain
  2 siblings, 0 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-05 11:19 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: Thomas Monjalon, dev

On 05/04/19 3:13 AM, Thomas Monjalon wrote:
> 04/04/2019 23:29, Ferruh Yigit:
>> On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
>>> Removes some unused firmware code which was added in last bump
>>> of the firmware version. No current features uses these APIs.
>>>
>>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>>
>> <...>
>>
>>> diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
>>> index 9af9097e5..cf3d15267 100644
>>> --- a/drivers/bus/fslmc/mc/fsl_dpci.h
>>> +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
>>> @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
>>>   			uint16_t token,
>>>   			struct dpci_attr *attr);
>>>   
>>> -/**
>>> - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
>>> - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
>>> - * @num_of_priorities:	The pper's number of receive priorities; determines the
>>> - *			number of transmit priorities for the local DPCI object
>>> - */
>>> -struct dpci_peer_attr {
>>> -	int peer_id;
>>> -	uint8_t num_of_priorities;
>>> -};
>>> -
>>> -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
>>> -			     uint32_t cmd_flags,
>>> -			     uint16_t token,
>>> -			     struct dpci_peer_attr *attr);
>>> -
>>> -int dpci_get_link_state(struct fsl_mc_io *mc_io,
>>> -			uint32_t cmd_flags,
>>> -			uint16_t token,
>>> -			int *up);
>>
>> These needs to be removed from .map file too.

Wow! indeed a great catch.
And, yup, my bad. Sorry! I wish I had your eye-for-detail.

> 
> Removed from master.
> Thanks for the catch.
> 
>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-05 11:19         ` Shreyansh Jain
  2019-04-05 11:19           ` Shreyansh Jain
@ 2019-04-05 11:37           ` Ferruh Yigit
  2019-04-05 11:37             ` Ferruh Yigit
  2019-04-05 11:38           ` Shreyansh Jain
  2 siblings, 1 reply; 32+ messages in thread
From: Ferruh Yigit @ 2019-04-05 11:37 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: Thomas Monjalon, dev

On 4/5/2019 12:19 PM, Shreyansh Jain wrote:
> On 05/04/19 3:13 AM, Thomas Monjalon wrote:
>> 04/04/2019 23:29, Ferruh Yigit:
>>> On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
>>>> Removes some unused firmware code which was added in last bump
>>>> of the firmware version. No current features uses these APIs.
>>>>
>>>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>>>
>>> <...>
>>>
>>>> diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
>>>> index 9af9097e5..cf3d15267 100644
>>>> --- a/drivers/bus/fslmc/mc/fsl_dpci.h
>>>> +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
>>>> @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
>>>>   			uint16_t token,
>>>>   			struct dpci_attr *attr);
>>>>   
>>>> -/**
>>>> - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
>>>> - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
>>>> - * @num_of_priorities:	The pper's number of receive priorities; determines the
>>>> - *			number of transmit priorities for the local DPCI object
>>>> - */
>>>> -struct dpci_peer_attr {
>>>> -	int peer_id;
>>>> -	uint8_t num_of_priorities;
>>>> -};
>>>> -
>>>> -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
>>>> -			     uint32_t cmd_flags,
>>>> -			     uint16_t token,
>>>> -			     struct dpci_peer_attr *attr);
>>>> -
>>>> -int dpci_get_link_state(struct fsl_mc_io *mc_io,
>>>> -			uint32_t cmd_flags,
>>>> -			uint16_t token,
>>>> -			int *up);
>>>
>>> These needs to be removed from .map file too.
> 
> Wow! indeed a great catch.

we have a script for it ;)
./devtools/check-symbol-maps.sh

> And, yup, my bad. Sorry! I wish I had your eye-for-detail.
> 
>>
>> Removed from master.
>> Thanks for the catch.
>>
>>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-05 11:37           ` Ferruh Yigit
@ 2019-04-05 11:37             ` Ferruh Yigit
  0 siblings, 0 replies; 32+ messages in thread
From: Ferruh Yigit @ 2019-04-05 11:37 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: Thomas Monjalon, dev

On 4/5/2019 12:19 PM, Shreyansh Jain wrote:
> On 05/04/19 3:13 AM, Thomas Monjalon wrote:
>> 04/04/2019 23:29, Ferruh Yigit:
>>> On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
>>>> Removes some unused firmware code which was added in last bump
>>>> of the firmware version. No current features uses these APIs.
>>>>
>>>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>>>
>>> <...>
>>>
>>>> diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
>>>> index 9af9097e5..cf3d15267 100644
>>>> --- a/drivers/bus/fslmc/mc/fsl_dpci.h
>>>> +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
>>>> @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
>>>>   			uint16_t token,
>>>>   			struct dpci_attr *attr);
>>>>   
>>>> -/**
>>>> - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
>>>> - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
>>>> - * @num_of_priorities:	The pper's number of receive priorities; determines the
>>>> - *			number of transmit priorities for the local DPCI object
>>>> - */
>>>> -struct dpci_peer_attr {
>>>> -	int peer_id;
>>>> -	uint8_t num_of_priorities;
>>>> -};
>>>> -
>>>> -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
>>>> -			     uint32_t cmd_flags,
>>>> -			     uint16_t token,
>>>> -			     struct dpci_peer_attr *attr);
>>>> -
>>>> -int dpci_get_link_state(struct fsl_mc_io *mc_io,
>>>> -			uint32_t cmd_flags,
>>>> -			uint16_t token,
>>>> -			int *up);
>>>
>>> These needs to be removed from .map file too.
> 
> Wow! indeed a great catch.

we have a script for it ;)
./devtools/check-symbol-maps.sh

> And, yup, my bad. Sorry! I wish I had your eye-for-detail.
> 
>>
>> Removed from master.
>> Thanks for the catch.
>>
>>


^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-05 11:19         ` Shreyansh Jain
  2019-04-05 11:19           ` Shreyansh Jain
  2019-04-05 11:37           ` Ferruh Yigit
@ 2019-04-05 11:38           ` Shreyansh Jain
  2019-04-05 11:38             ` Shreyansh Jain
  2019-04-05 12:35             ` Thomas Monjalon
  2 siblings, 2 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-05 11:38 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Ferruh Yigit, dev

On 05/04/19 4:49 PM, Shreyansh Jain wrote:
> On 05/04/19 3:13 AM, Thomas Monjalon wrote:
>> 04/04/2019 23:29, Ferruh Yigit:
>>> On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
>>>> Removes some unused firmware code which was added in last bump
>>>> of the firmware version. No current features uses these APIs.
>>>>
>>>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>>>
>>> <...>
>>>
>>>> diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
>>>> index 9af9097e5..cf3d15267 100644
>>>> --- a/drivers/bus/fslmc/mc/fsl_dpci.h
>>>> +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
>>>> @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
>>>>    			uint16_t token,
>>>>    			struct dpci_attr *attr);
>>>>    
>>>> -/**
>>>> - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
>>>> - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
>>>> - * @num_of_priorities:	The pper's number of receive priorities; determines the
>>>> - *			number of transmit priorities for the local DPCI object
>>>> - */
>>>> -struct dpci_peer_attr {
>>>> -	int peer_id;
>>>> -	uint8_t num_of_priorities;
>>>> -};
>>>> -
>>>> -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
>>>> -			     uint32_t cmd_flags,
>>>> -			     uint16_t token,
>>>> -			     struct dpci_peer_attr *attr);
>>>> -
>>>> -int dpci_get_link_state(struct fsl_mc_io *mc_io,
>>>> -			uint32_t cmd_flags,
>>>> -			uint16_t token,
>>>> -			int *up);
>>>
>>> These needs to be removed from .map file too.
> 
> Wow! indeed a great catch.
> And, yup, my bad. Sorry! I wish I had your eye-for-detail.
> 
>>
>> Removed from master.
>> Thanks for the catch.

Thomas,
I still see this applied on the master and net-next.
Can you tell me how do you want me to do - send a fresh series or just 
the delta change for map file?

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-05 11:38           ` Shreyansh Jain
@ 2019-04-05 11:38             ` Shreyansh Jain
  2019-04-05 12:35             ` Thomas Monjalon
  1 sibling, 0 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-05 11:38 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Ferruh Yigit, dev

On 05/04/19 4:49 PM, Shreyansh Jain wrote:
> On 05/04/19 3:13 AM, Thomas Monjalon wrote:
>> 04/04/2019 23:29, Ferruh Yigit:
>>> On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
>>>> Removes some unused firmware code which was added in last bump
>>>> of the firmware version. No current features uses these APIs.
>>>>
>>>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>>>
>>> <...>
>>>
>>>> diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
>>>> index 9af9097e5..cf3d15267 100644
>>>> --- a/drivers/bus/fslmc/mc/fsl_dpci.h
>>>> +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
>>>> @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
>>>>    			uint16_t token,
>>>>    			struct dpci_attr *attr);
>>>>    
>>>> -/**
>>>> - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
>>>> - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
>>>> - * @num_of_priorities:	The pper's number of receive priorities; determines the
>>>> - *			number of transmit priorities for the local DPCI object
>>>> - */
>>>> -struct dpci_peer_attr {
>>>> -	int peer_id;
>>>> -	uint8_t num_of_priorities;
>>>> -};
>>>> -
>>>> -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
>>>> -			     uint32_t cmd_flags,
>>>> -			     uint16_t token,
>>>> -			     struct dpci_peer_attr *attr);
>>>> -
>>>> -int dpci_get_link_state(struct fsl_mc_io *mc_io,
>>>> -			uint32_t cmd_flags,
>>>> -			uint16_t token,
>>>> -			int *up);
>>>
>>> These needs to be removed from .map file too.
> 
> Wow! indeed a great catch.
> And, yup, my bad. Sorry! I wish I had your eye-for-detail.
> 
>>
>> Removed from master.
>> Thanks for the catch.

Thomas,
I still see this applied on the master and net-next.
Can you tell me how do you want me to do - send a fresh series or just 
the delta change for map file?

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-05 11:38           ` Shreyansh Jain
  2019-04-05 11:38             ` Shreyansh Jain
@ 2019-04-05 12:35             ` Thomas Monjalon
  2019-04-05 12:35               ` Thomas Monjalon
  2019-04-05 12:58               ` Shreyansh Jain
  1 sibling, 2 replies; 32+ messages in thread
From: Thomas Monjalon @ 2019-04-05 12:35 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: Ferruh Yigit, dev

05/04/2019 13:38, Shreyansh Jain:
> On 05/04/19 4:49 PM, Shreyansh Jain wrote:
> > On 05/04/19 3:13 AM, Thomas Monjalon wrote:
> >> 04/04/2019 23:29, Ferruh Yigit:
> >>> On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
> >>>> Removes some unused firmware code which was added in last bump
> >>>> of the firmware version. No current features uses these APIs.
> >>>>
> >>>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> >>>
> >>> <...>
> >>>
> >>>> diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
> >>>> index 9af9097e5..cf3d15267 100644
> >>>> --- a/drivers/bus/fslmc/mc/fsl_dpci.h
> >>>> +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
> >>>> @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
> >>>>    			uint16_t token,
> >>>>    			struct dpci_attr *attr);
> >>>>    
> >>>> -/**
> >>>> - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
> >>>> - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
> >>>> - * @num_of_priorities:	The pper's number of receive priorities; determines the
> >>>> - *			number of transmit priorities for the local DPCI object
> >>>> - */
> >>>> -struct dpci_peer_attr {
> >>>> -	int peer_id;
> >>>> -	uint8_t num_of_priorities;
> >>>> -};
> >>>> -
> >>>> -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
> >>>> -			     uint32_t cmd_flags,
> >>>> -			     uint16_t token,
> >>>> -			     struct dpci_peer_attr *attr);
> >>>> -
> >>>> -int dpci_get_link_state(struct fsl_mc_io *mc_io,
> >>>> -			uint32_t cmd_flags,
> >>>> -			uint16_t token,
> >>>> -			int *up);
> >>>
> >>> These needs to be removed from .map file too.
> > 
> > Wow! indeed a great catch.
> > And, yup, my bad. Sorry! I wish I had your eye-for-detail.
> > 
> >>
> >> Removed from master.
> >> Thanks for the catch.
> 
> Thomas,
> I still see this applied on the master and net-next.
> Can you tell me how do you want me to do - send a fresh series or just 
> the delta change for map file?

I don't see them.
Please update master and check again.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-05 12:35             ` Thomas Monjalon
@ 2019-04-05 12:35               ` Thomas Monjalon
  2019-04-05 12:58               ` Shreyansh Jain
  1 sibling, 0 replies; 32+ messages in thread
From: Thomas Monjalon @ 2019-04-05 12:35 UTC (permalink / raw)
  To: Shreyansh Jain; +Cc: Ferruh Yigit, dev

05/04/2019 13:38, Shreyansh Jain:
> On 05/04/19 4:49 PM, Shreyansh Jain wrote:
> > On 05/04/19 3:13 AM, Thomas Monjalon wrote:
> >> 04/04/2019 23:29, Ferruh Yigit:
> >>> On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
> >>>> Removes some unused firmware code which was added in last bump
> >>>> of the firmware version. No current features uses these APIs.
> >>>>
> >>>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
> >>>
> >>> <...>
> >>>
> >>>> diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
> >>>> index 9af9097e5..cf3d15267 100644
> >>>> --- a/drivers/bus/fslmc/mc/fsl_dpci.h
> >>>> +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
> >>>> @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
> >>>>    			uint16_t token,
> >>>>    			struct dpci_attr *attr);
> >>>>    
> >>>> -/**
> >>>> - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
> >>>> - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
> >>>> - * @num_of_priorities:	The pper's number of receive priorities; determines the
> >>>> - *			number of transmit priorities for the local DPCI object
> >>>> - */
> >>>> -struct dpci_peer_attr {
> >>>> -	int peer_id;
> >>>> -	uint8_t num_of_priorities;
> >>>> -};
> >>>> -
> >>>> -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
> >>>> -			     uint32_t cmd_flags,
> >>>> -			     uint16_t token,
> >>>> -			     struct dpci_peer_attr *attr);
> >>>> -
> >>>> -int dpci_get_link_state(struct fsl_mc_io *mc_io,
> >>>> -			uint32_t cmd_flags,
> >>>> -			uint16_t token,
> >>>> -			int *up);
> >>>
> >>> These needs to be removed from .map file too.
> > 
> > Wow! indeed a great catch.
> > And, yup, my bad. Sorry! I wish I had your eye-for-detail.
> > 
> >>
> >> Removed from master.
> >> Thanks for the catch.
> 
> Thomas,
> I still see this applied on the master and net-next.
> Can you tell me how do you want me to do - send a fresh series or just 
> the delta change for map file?

I don't see them.
Please update master and check again.



^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-05 12:35             ` Thomas Monjalon
  2019-04-05 12:35               ` Thomas Monjalon
@ 2019-04-05 12:58               ` Shreyansh Jain
  2019-04-05 12:58                 ` Shreyansh Jain
  1 sibling, 1 reply; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-05 12:58 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Ferruh Yigit, dev

On 05/04/19 6:05 PM, Thomas Monjalon wrote:
> 05/04/2019 13:38, Shreyansh Jain:
>> On 05/04/19 4:49 PM, Shreyansh Jain wrote:
>>> On 05/04/19 3:13 AM, Thomas Monjalon wrote:
>>>> 04/04/2019 23:29, Ferruh Yigit:
>>>>> On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
>>>>>> Removes some unused firmware code which was added in last bump
>>>>>> of the firmware version. No current features uses these APIs.
>>>>>>
>>>>>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>>>>>
>>>>> <...>
>>>>>
>>>>>> diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
>>>>>> index 9af9097e5..cf3d15267 100644
>>>>>> --- a/drivers/bus/fslmc/mc/fsl_dpci.h
>>>>>> +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
>>>>>> @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
>>>>>>     			uint16_t token,
>>>>>>     			struct dpci_attr *attr);
>>>>>>     
>>>>>> -/**
>>>>>> - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
>>>>>> - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
>>>>>> - * @num_of_priorities:	The pper's number of receive priorities; determines the
>>>>>> - *			number of transmit priorities for the local DPCI object
>>>>>> - */
>>>>>> -struct dpci_peer_attr {
>>>>>> -	int peer_id;
>>>>>> -	uint8_t num_of_priorities;
>>>>>> -};
>>>>>> -
>>>>>> -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
>>>>>> -			     uint32_t cmd_flags,
>>>>>> -			     uint16_t token,
>>>>>> -			     struct dpci_peer_attr *attr);
>>>>>> -
>>>>>> -int dpci_get_link_state(struct fsl_mc_io *mc_io,
>>>>>> -			uint32_t cmd_flags,
>>>>>> -			uint16_t token,
>>>>>> -			int *up);
>>>>>
>>>>> These needs to be removed from .map file too.
>>>
>>> Wow! indeed a great catch.
>>> And, yup, my bad. Sorry! I wish I had your eye-for-detail.
>>>
>>>>
>>>> Removed from master.
>>>> Thanks for the catch.
>>
>> Thomas,
>> I still see this applied on the master and net-next.
>> Can you tell me how do you want me to do - send a fresh series or just
>> the delta change for map file?
> 
> I don't see them.
> Please update master and check again.
> 
> 

Once again, my bad - I thought when you mentioned "removed from master" 
meant you removed the patch. But, now I realize you meant "removed the 
symbols from map file".
Thanks for doing my work.

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code
  2019-04-05 12:58               ` Shreyansh Jain
@ 2019-04-05 12:58                 ` Shreyansh Jain
  0 siblings, 0 replies; 32+ messages in thread
From: Shreyansh Jain @ 2019-04-05 12:58 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Ferruh Yigit, dev

On 05/04/19 6:05 PM, Thomas Monjalon wrote:
> 05/04/2019 13:38, Shreyansh Jain:
>> On 05/04/19 4:49 PM, Shreyansh Jain wrote:
>>> On 05/04/19 3:13 AM, Thomas Monjalon wrote:
>>>> 04/04/2019 23:29, Ferruh Yigit:
>>>>> On 4/4/2019 8:23 AM, Shreyansh Jain wrote:
>>>>>> Removes some unused firmware code which was added in last bump
>>>>>> of the firmware version. No current features uses these APIs.
>>>>>>
>>>>>> Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
>>>>>
>>>>> <...>
>>>>>
>>>>>> diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
>>>>>> index 9af9097e5..cf3d15267 100644
>>>>>> --- a/drivers/bus/fslmc/mc/fsl_dpci.h
>>>>>> +++ b/drivers/bus/fslmc/mc/fsl_dpci.h
>>>>>> @@ -108,27 +108,6 @@ int dpci_get_attributes(struct fsl_mc_io *mc_io,
>>>>>>     			uint16_t token,
>>>>>>     			struct dpci_attr *attr);
>>>>>>     
>>>>>> -/**
>>>>>> - * struct dpci_peer_attr - Structure representing the peer DPCI attributes
>>>>>> - * @peer_id:		DPCI peer id; if no peer is connected returns (-1)
>>>>>> - * @num_of_priorities:	The pper's number of receive priorities; determines the
>>>>>> - *			number of transmit priorities for the local DPCI object
>>>>>> - */
>>>>>> -struct dpci_peer_attr {
>>>>>> -	int peer_id;
>>>>>> -	uint8_t num_of_priorities;
>>>>>> -};
>>>>>> -
>>>>>> -int dpci_get_peer_attributes(struct fsl_mc_io *mc_io,
>>>>>> -			     uint32_t cmd_flags,
>>>>>> -			     uint16_t token,
>>>>>> -			     struct dpci_peer_attr *attr);
>>>>>> -
>>>>>> -int dpci_get_link_state(struct fsl_mc_io *mc_io,
>>>>>> -			uint32_t cmd_flags,
>>>>>> -			uint16_t token,
>>>>>> -			int *up);
>>>>>
>>>>> These needs to be removed from .map file too.
>>>
>>> Wow! indeed a great catch.
>>> And, yup, my bad. Sorry! I wish I had your eye-for-detail.
>>>
>>>>
>>>> Removed from master.
>>>> Thanks for the catch.
>>
>> Thomas,
>> I still see this applied on the master and net-next.
>> Can you tell me how do you want me to do - send a fresh series or just
>> the delta change for map file?
> 
> I don't see them.
> Please update master and check again.
> 
> 

Once again, my bad - I thought when you mentioned "removed from master" 
meant you removed the patch. But, now I realize you meant "removed the 
symbols from map file".
Thanks for doing my work.

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2019-04-05 12:58 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-03 14:23 [dpdk-dev] [PATCH 0/3] Update FSLMC bus firmware Shreyansh Jain
2019-04-03 14:23 ` Shreyansh Jain
2019-04-03 14:23 ` [dpdk-dev] [PATCH 1/3] bus/fslmc: cleanup unused firmware code Shreyansh Jain
2019-04-03 14:23   ` Shreyansh Jain
2019-04-03 14:23 ` [dpdk-dev] [PATCH 2/3] drivers: update MC firmware version for FSLMC bus Shreyansh Jain
2019-04-03 14:23   ` Shreyansh Jain
2019-04-03 14:23 ` [dpdk-dev] [PATCH 3/3] doc: bump SDK support version for dpaa2 Shreyansh Jain
2019-04-03 14:23   ` Shreyansh Jain
2019-04-04  7:23 ` [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware Shreyansh Jain
2019-04-04  7:23   ` Shreyansh Jain
2019-04-04  7:23   ` [dpdk-dev] [PATCH v2 1/3] bus/fslmc: cleanup unused firmware code Shreyansh Jain
2019-04-04  7:23     ` Shreyansh Jain
2019-04-04 21:29     ` Ferruh Yigit
2019-04-04 21:29       ` Ferruh Yigit
2019-04-04 21:43       ` Thomas Monjalon
2019-04-04 21:43         ` Thomas Monjalon
2019-04-05 11:19         ` Shreyansh Jain
2019-04-05 11:19           ` Shreyansh Jain
2019-04-05 11:37           ` Ferruh Yigit
2019-04-05 11:37             ` Ferruh Yigit
2019-04-05 11:38           ` Shreyansh Jain
2019-04-05 11:38             ` Shreyansh Jain
2019-04-05 12:35             ` Thomas Monjalon
2019-04-05 12:35               ` Thomas Monjalon
2019-04-05 12:58               ` Shreyansh Jain
2019-04-05 12:58                 ` Shreyansh Jain
2019-04-04  7:23   ` [dpdk-dev] [PATCH v2 2/3] drivers: update MC firmware version for FSLMC bus Shreyansh Jain
2019-04-04  7:23     ` Shreyansh Jain
2019-04-04  7:23   ` [dpdk-dev] [PATCH v2 3/3] doc: bump SDK support version for dpaa2 Shreyansh Jain
2019-04-04  7:23     ` Shreyansh Jain
2019-04-04 21:08   ` [dpdk-dev] [PATCH v2 0/3] Update FSLMC bus firmware Thomas Monjalon
2019-04-04 21:08     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).