@@ -2905,7 +2905,7 @@ struct ice_aqc_event_lan_overflow {
/* Debug Dump Internal Data (indirect 0xFF08) */
struct ice_aqc_debug_dump_internals {
- u8 cluster_id;
+ __le16 cluster_id; /* Expresses next cluster ID in response */
#define ICE_AQC_DBG_DUMP_CLUSTER_ID_SW 0
#define ICE_AQC_DBG_DUMP_CLUSTER_ID_ACL 1
#define ICE_AQC_DBG_DUMP_CLUSTER_ID_TXSCHED 2
@@ -2920,7 +2920,6 @@ struct ice_aqc_debug_dump_internals {
#define ICE_AQC_DBG_DUMP_CLUSTER_ID_QUEUE_MNG 9
#define ICE_AQC_DBG_DUMP_CLUSTER_ID_FULL_CSR_SPACE 21
#define ICE_ACQ_DBG_DUMP_CLUSTER_ID_MNG_TRANSACTION 22
- u8 reserved;
__le16 table_id; /* Used only for non-memory clusters */
__le32 idx; /* In table entries for tables, in bytes for memory */
__le32 addr_high;
@@ -4858,6 +4858,7 @@ ice_set_ctx(struct ice_hw *hw, u8 *src_ctx, u8 *dest_ctx,
* @buf: dump buffer
* @buf_size: dump buffer size
* @ret_buf_size: return buffer size (returned by FW)
+ * @ret_next_cluster: next cluster to read (returned by FW)
* @ret_next_table: next block to read (returned by FW)
* @ret_next_index: next index to read (returned by FW)
* @cd: pointer to command details structure
@@ -4865,10 +4866,10 @@ ice_set_ctx(struct ice_hw *hw, u8 *src_ctx, u8 *dest_ctx,
* Get internal FW/HW data (0xFF08) for debug purposes.
*/
int
-ice_aq_get_internal_data(struct ice_hw *hw, u8 cluster_id, u16 table_id,
+ice_aq_get_internal_data(struct ice_hw *hw, u16 cluster_id, u16 table_id,
u32 start, void *buf, u16 buf_size, u16 *ret_buf_size,
- u16 *ret_next_table, u32 *ret_next_index,
- struct ice_sq_cd *cd)
+ u16 *ret_next_cluster, u16 *ret_next_table,
+ u32 *ret_next_index, struct ice_sq_cd *cd)
{
struct ice_aqc_debug_dump_internals *cmd;
struct ice_aq_desc desc;
@@ -4881,7 +4882,7 @@ ice_aq_get_internal_data(struct ice_hw *hw, u8 cluster_id, u16 table_id,
ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_debug_dump_internals);
- cmd->cluster_id = cluster_id;
+ cmd->cluster_id = CPU_TO_LE16(cluster_id);
cmd->table_id = CPU_TO_LE16(table_id);
cmd->idx = CPU_TO_LE32(start);
@@ -4890,6 +4891,8 @@ ice_aq_get_internal_data(struct ice_hw *hw, u8 cluster_id, u16 table_id,
if (!status) {
if (ret_buf_size)
*ret_buf_size = LE16_TO_CPU(desc.datalen);
+ if (ret_next_cluster)
+ *ret_next_cluster = LE16_TO_CPU(cmd->cluster_id);
if (ret_next_table)
*ret_next_table = LE16_TO_CPU(cmd->table_id);
if (ret_next_index)
@@ -65,10 +65,10 @@ int ice_get_caps(struct ice_hw *hw);
void ice_set_safe_mode_caps(struct ice_hw *hw);
int
-ice_aq_get_internal_data(struct ice_hw *hw, u8 cluster_id, u16 table_id,
+ice_aq_get_internal_data(struct ice_hw *hw, u16 cluster_id, u16 table_id,
u32 start, void *buf, u16 buf_size, u16 *ret_buf_size,
- u16 *ret_next_table, u32 *ret_next_index,
- struct ice_sq_cd *cd);
+ u16 *ret_next_cluster, u16 *ret_next_table,
+ u32 *ret_next_index, struct ice_sq_cd *cd);
/* Define a macro that will align a pointer to point to the next memory address
* that falls on the given power of 2 (i.e., 2, 4, 8, 16, 32, 64...). For
@@ -437,9 +437,10 @@ static int
ice_dump_switch(struct rte_eth_dev *dev, uint8_t **buff2, uint32_t *size)
{
struct ice_hw *hw;
+ struct ice_sq_cd *cd = NULL;
int i = 0;
uint16_t tbl_id = 0;
- uint32_t tbl_idx = 0;
+ uint16_t tbl_idx = 0;
uint8_t *buffer = *buff2;
hw = ICE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
@@ -469,7 +470,7 @@ ice_dump_switch(struct rte_eth_dev *dev, uint8_t **buff2, uint32_t *size)
ICE_AQC_DBG_DUMP_CLUSTER_ID_SW,
tbl_id, tbl_idx, buff,
ICE_PKG_BUF_SIZE,
- &buff_size, &tbl_id, &tbl_idx, NULL);
+ &buff_size, &tbl_id, &tbl_idx, NULL, cd);
if (res) {
free(buff);
@@ -481,7 +482,7 @@ ice_dump_switch(struct rte_eth_dev *dev, uint8_t **buff2, uint32_t *size)
free(buff);
- if (tbl_idx == 0xffffffff) {
+ if (tbl_idx == 0xffff) {
tbl_idx = 0;
memset(buffer, '\n', sizeof(char));
buffer++;