DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/4] ice base code update
@ 2021-06-21 15:06 Qi Zhang
  2021-06-21 15:06 ` [dpdk-dev] [PATCH 1/4] net/ice/base: add function for DSCP configure Qi Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Qi Zhang @ 2021-06-21 15:06 UTC (permalink / raw)
  To: qiming.yang; +Cc: dev, Qi Zhang

Qi Zhang (4):
  net/ice/base: add function for DSCP configure
  net/ice/base: remove firmware log
  net/ice/base: remove VSI info from previous aggregator
  net/ice/base: remove unncessary code

 drivers/net/ice/base/ice_adminq_cmd.h | 53 +--------------------------
 drivers/net/ice/base/ice_common.c     |  4 --
 drivers/net/ice/base/ice_dcb.c        | 41 +++++++++++++++++++++
 drivers/net/ice/base/ice_dcb.h        |  2 +
 drivers/net/ice/base/ice_sched.c      | 24 +++++++++++-
 5 files changed, 66 insertions(+), 58 deletions(-)

-- 
2.26.2


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

* [dpdk-dev] [PATCH 1/4] net/ice/base: add function for DSCP configure
  2021-06-21 15:06 [dpdk-dev] [PATCH 0/4] ice base code update Qi Zhang
@ 2021-06-21 15:06 ` Qi Zhang
  2021-06-21 15:06 ` [dpdk-dev] [PATCH 2/4] net/ice/base: remove firmware log Qi Zhang
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Qi Zhang @ 2021-06-21 15:06 UTC (permalink / raw)
  To: qiming.yang; +Cc: dev, Qi Zhang, Anirudh Venkataramanan

ice_aq_set_pfc_mode is used to configure DSCP.

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_dcb.c | 41 ++++++++++++++++++++++++++++++++++
 drivers/net/ice/base/ice_dcb.h |  2 ++
 2 files changed, 43 insertions(+)

diff --git a/drivers/net/ice/base/ice_dcb.c b/drivers/net/ice/base/ice_dcb.c
index 0aaa5ae8c1..c73fc095ff 100644
--- a/drivers/net/ice/base/ice_dcb.c
+++ b/drivers/net/ice/base/ice_dcb.c
@@ -735,6 +735,47 @@ ice_aq_get_cee_dcb_cfg(struct ice_hw *hw,
 	return ice_aq_send_cmd(hw, &desc, (void *)buff, sizeof(*buff), cd);
 }
 
+/**
+ * ice_aq_set_pfc_mode - Set PFC mode
+ * @hw: pointer to the HW struct
+ * @pfc_mode: value of PFC mode to set
+ * @cd: pointer to command details structure or NULL
+ *
+ * This AQ call configures the PFC mdoe to DSCP-based PFC mode or VLAN
+ * -based PFC (0x0303)
+ */
+enum ice_status
+ice_aq_set_pfc_mode(struct ice_hw *hw, u8 pfc_mode, struct ice_sq_cd *cd)
+{
+	struct ice_aqc_set_query_pfc_mode *cmd;
+	struct ice_aq_desc desc;
+	enum ice_status status;
+
+	if (pfc_mode > ICE_AQC_PFC_DSCP_BASED_PFC)
+		return ICE_ERR_PARAM;
+
+	cmd = &desc.params.set_query_pfc_mode;
+
+	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_set_pfc_mode);
+
+	cmd->pfc_mode = pfc_mode;
+
+	status = ice_aq_send_cmd(hw, &desc, NULL, 0, cd);
+	if (status)
+		return status;
+
+	/* The spec isn't clear about whether the FW will return an error code
+	 * if the PFC mode requested by the driver was not set. The spec just
+	 * says that the FW will write the PFC mode set back into cmd->pfc_mode,
+	 * so after the AQ has been executed, check if cmd->pfc_mode is what was
+	 * requested.
+	 */
+	if (cmd->pfc_mode != pfc_mode)
+		return ICE_ERR_NOT_SUPPORTED;
+
+	return ICE_SUCCESS;
+}
+
 /**
  * ice_cee_to_dcb_cfg
  * @cee_cfg: pointer to CEE configuration struct
diff --git a/drivers/net/ice/base/ice_dcb.h b/drivers/net/ice/base/ice_dcb.h
index a053adbb30..24c8da2dc8 100644
--- a/drivers/net/ice/base/ice_dcb.h
+++ b/drivers/net/ice/base/ice_dcb.h
@@ -196,6 +196,8 @@ enum ice_status
 ice_aq_get_cee_dcb_cfg(struct ice_hw *hw,
 		       struct ice_aqc_get_cee_dcb_cfg_resp *buff,
 		       struct ice_sq_cd *cd);
+enum ice_status
+ice_aq_set_pfc_mode(struct ice_hw *hw, u8 pfc_mode, struct ice_sq_cd *cd);
 enum ice_status ice_lldp_to_dcb_cfg(u8 *lldpmib, struct ice_dcbx_cfg *dcbcfg);
 u8 ice_get_dcbx_status(struct ice_hw *hw);
 enum ice_status
-- 
2.26.2


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

* [dpdk-dev] [PATCH 2/4] net/ice/base: remove firmware log
  2021-06-21 15:06 [dpdk-dev] [PATCH 0/4] ice base code update Qi Zhang
  2021-06-21 15:06 ` [dpdk-dev] [PATCH 1/4] net/ice/base: add function for DSCP configure Qi Zhang
@ 2021-06-21 15:06 ` Qi Zhang
  2021-06-21 15:06 ` [dpdk-dev] [PATCH 3/4] net/ice/base: remove VSI info from previous aggregator Qi Zhang
  2021-06-21 15:06 ` [dpdk-dev] [PATCH 4/4] net/ice/base: remove unncessary code Qi Zhang
  3 siblings, 0 replies; 5+ messages in thread
From: Qi Zhang @ 2021-06-21 15:06 UTC (permalink / raw)
  To: qiming.yang; +Cc: dev, Qi Zhang, Anirudh Venkataramanan

Remove firmware log related code.

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_adminq_cmd.h | 52 ---------------------------
 1 file changed, 52 deletions(-)

diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index 3805fc9c5c..b45ad3d34c 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -2793,50 +2793,6 @@ struct ice_aqc_clear_health_status {
 	__le32 reserved[4];
 };
 
-/* Set FW Logging configuration (indirect 0xFF30)
- * Register for FW Logging (indirect 0xFF31)
- * Query FW Logging (indirect 0xFF32)
- * FW Log Event (indirect 0xFF33)
- * Get FW Log (indirect 0xFF34)
- * Clear FW Log (indirect 0xFF35)
- */
-
-struct ice_aqc_fw_log {
-	u8 cmd_flags;
-#define ICE_AQC_FW_LOG_CONF_UART_EN	BIT(0)
-#define ICE_AQC_FW_LOG_CONF_AQ_EN	BIT(1)
-#define ICE_AQC_FW_LOG_CONF_SET_VALID	BIT(3)
-#define ICE_AQC_FW_LOG_AQ_REGISTER	BIT(0)
-#define ICE_AQC_FW_LOG_AQ_QUERY		BIT(2)
-#define ICE_AQC_FW_LOG_PERSISTENT	BIT(0)
-	u8 rsp_flag;
-#define ICE_AQC_FW_LOG_MORE_DATA	BIT(1)
-	__le16 fw_rt_msb;
-	union {
-		struct {
-			__le32 fw_rt_lsb;
-		} sync;
-		struct {
-			__le16 log_resolution;
-#define ICE_AQC_FW_LOG_MIN_RESOLUTION		(1)
-#define ICE_AQC_FW_LOG_MAX_RESOLUTION		(128)
-			__le16 mdl_cnt;
-		} cfg;
-	} ops;
-	__le32 addr_high;
-	__le32 addr_low;
-};
-
-/* Response Buffer for:
- *    Set Firmware Logging Configuration (0xFF30)
- *    Query FW Logging (0xFF32)
- */
-struct ice_aqc_fw_log_cfg_resp {
-	__le16 module_identifier;
-	u8 log_level;
-	u8 rsvd0;
-};
-
 /**
  * struct ice_aq_desc - Admin Queue (AQ) descriptor
  * @flags: ICE_AQ_FLAG_* flags
@@ -3207,14 +3163,6 @@ enum ice_adminq_opc {
 	ice_aqc_opc_get_supported_health_status_codes	= 0xFF21,
 	ice_aqc_opc_get_health_status			= 0xFF22,
 	ice_aqc_opc_clear_health_status			= 0xFF23,
-
-	/* FW Logging Commands */
-	ice_aqc_opc_fw_logs_config			= 0xFF30,
-	ice_aqc_opc_fw_logs_register			= 0xFF31,
-	ice_aqc_opc_fw_logs_query			= 0xFF32,
-	ice_aqc_opc_fw_logs_event			= 0xFF33,
-	ice_aqc_opc_fw_logs_get				= 0xFF34,
-	ice_aqc_opc_fw_logs_clear			= 0xFF35
 };
 
 #endif /* _ICE_ADMINQ_CMD_H_ */
-- 
2.26.2


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

* [dpdk-dev] [PATCH 3/4] net/ice/base: remove VSI info from previous aggregator
  2021-06-21 15:06 [dpdk-dev] [PATCH 0/4] ice base code update Qi Zhang
  2021-06-21 15:06 ` [dpdk-dev] [PATCH 1/4] net/ice/base: add function for DSCP configure Qi Zhang
  2021-06-21 15:06 ` [dpdk-dev] [PATCH 2/4] net/ice/base: remove firmware log Qi Zhang
@ 2021-06-21 15:06 ` Qi Zhang
  2021-06-21 15:06 ` [dpdk-dev] [PATCH 4/4] net/ice/base: remove unncessary code Qi Zhang
  3 siblings, 0 replies; 5+ messages in thread
From: Qi Zhang @ 2021-06-21 15:06 UTC (permalink / raw)
  To: qiming.yang; +Cc: dev, Qi Zhang, Victor Raj

remove the VSI info from previous aggregator after moving the VSI to a
new aggregator.

Signed-off-by: Victor Raj <victor.raj@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_adminq_cmd.h |  1 +
 drivers/net/ice/base/ice_sched.c      | 24 ++++++++++++++++++++++--
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ice/base/ice_adminq_cmd.h b/drivers/net/ice/base/ice_adminq_cmd.h
index b45ad3d34c..861f5a39b6 100644
--- a/drivers/net/ice/base/ice_adminq_cmd.h
+++ b/drivers/net/ice/base/ice_adminq_cmd.h
@@ -1670,6 +1670,7 @@ struct ice_aqc_link_topo_addr {
 struct ice_aqc_get_link_topo {
 	struct ice_aqc_link_topo_addr addr;
 	u8 node_part_num;
+#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_PCA9575	0x21
 	u8 rsvd[9];
 };
 
diff --git a/drivers/net/ice/base/ice_sched.c b/drivers/net/ice/base/ice_sched.c
index be3f56cdf6..544648cb84 100644
--- a/drivers/net/ice/base/ice_sched.c
+++ b/drivers/net/ice/base/ice_sched.c
@@ -2841,8 +2841,8 @@ static enum ice_status
 ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
 			   u16 vsi_handle, ice_bitmap_t *tc_bitmap)
 {
-	struct ice_sched_agg_vsi_info *agg_vsi_info;
-	struct ice_sched_agg_info *agg_info;
+	struct ice_sched_agg_vsi_info *agg_vsi_info, *old_agg_vsi_info = NULL;
+	struct ice_sched_agg_info *agg_info, *old_agg_info;
 	enum ice_status status = ICE_SUCCESS;
 	struct ice_hw *hw = pi->hw;
 	u8 tc;
@@ -2852,6 +2852,20 @@ ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
 	agg_info = ice_get_agg_info(hw, agg_id);
 	if (!agg_info)
 		return ICE_ERR_PARAM;
+	/* If the vsi is already part of another aggregator then update
+	 * its vsi info list
+	 */
+	old_agg_info = ice_get_vsi_agg_info(hw, vsi_handle);
+	if (old_agg_info && old_agg_info != agg_info) {
+		struct ice_sched_agg_vsi_info *vtmp;
+
+		LIST_FOR_EACH_ENTRY_SAFE(old_agg_vsi_info, vtmp,
+					 &old_agg_info->agg_vsi_list,
+					 ice_sched_agg_vsi_info, list_entry)
+			if (old_agg_vsi_info->vsi_handle == vsi_handle)
+				break;
+	}
+
 	/* check if entry already exist */
 	agg_vsi_info = ice_get_agg_vsi_info(agg_info, vsi_handle);
 	if (!agg_vsi_info) {
@@ -2876,6 +2890,12 @@ ice_sched_assoc_vsi_to_agg(struct ice_port_info *pi, u32 agg_id,
 			break;
 
 		ice_set_bit(tc, agg_vsi_info->tc_bitmap);
+		if (old_agg_vsi_info)
+			ice_clear_bit(tc, old_agg_vsi_info->tc_bitmap);
+	}
+	if (old_agg_vsi_info && !old_agg_vsi_info->tc_bitmap[0]) {
+		LIST_DEL(&old_agg_vsi_info->list_entry);
+		ice_free(pi->hw, old_agg_vsi_info);
 	}
 	return status;
 }
-- 
2.26.2


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

* [dpdk-dev] [PATCH 4/4] net/ice/base: remove unncessary code
  2021-06-21 15:06 [dpdk-dev] [PATCH 0/4] ice base code update Qi Zhang
                   ` (2 preceding siblings ...)
  2021-06-21 15:06 ` [dpdk-dev] [PATCH 3/4] net/ice/base: remove VSI info from previous aggregator Qi Zhang
@ 2021-06-21 15:06 ` Qi Zhang
  3 siblings, 0 replies; 5+ messages in thread
From: Qi Zhang @ 2021-06-21 15:06 UTC (permalink / raw)
  To: qiming.yang; +Cc: dev, Qi Zhang, Fabio Pricoco

Remove unnecessary jumbo frame configure.

Signed-off-by: Fabio Pricoco <fabio.pricoco@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_common.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index cf0a7d4e7f..51fca7b166 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -830,10 +830,6 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
 	status = ice_aq_manage_mac_read(hw, mac_buf, mac_buf_len, NULL);
 	ice_free(hw, mac_buf);
 
-	if (status)
-		goto err_unroll_fltr_mgmt_struct;
-	/* enable jumbo frame support at MAC level */
-	status = ice_aq_set_mac_cfg(hw, ICE_AQ_SET_MAC_FRAME_SIZE_MAX, NULL);
 	if (status)
 		goto err_unroll_fltr_mgmt_struct;
 	/* Obtain counter base index which would be used by flow director */
-- 
2.26.2


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

end of thread, other threads:[~2021-06-21 15:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-21 15:06 [dpdk-dev] [PATCH 0/4] ice base code update Qi Zhang
2021-06-21 15:06 ` [dpdk-dev] [PATCH 1/4] net/ice/base: add function for DSCP configure Qi Zhang
2021-06-21 15:06 ` [dpdk-dev] [PATCH 2/4] net/ice/base: remove firmware log Qi Zhang
2021-06-21 15:06 ` [dpdk-dev] [PATCH 3/4] net/ice/base: remove VSI info from previous aggregator Qi Zhang
2021-06-21 15:06 ` [dpdk-dev] [PATCH 4/4] net/ice/base: remove unncessary code Qi Zhang

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).