#define BNXT_DEFAULT_VNIC_CHANGE_VF_ID_SFT \
HWRM_ASYNC_EVENT_CMPL_DEFAULT_VNIC_CHANGE_EVENT_DATA1_VF_ID_SFT
+#define BNXT_EVENT_ERROR_REPORT_TYPE(data1) \
+ (((data1) & \
+ HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_MASK) >>\
+ HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_SFT)
+
#define BNXT_HWRM_CMD_TO_FORWARD(cmd) \
(bp->pf->vf_req_fwd[(cmd) / 32] |= (1 << ((cmd) % 32)))
bnxt_rep_dev_start_op(eth_dev);
}
+static void bnxt_handle_event_error_report(struct bnxt *bp,
+ uint32_t data1,
+ uint32_t data2)
+{
+ switch (BNXT_EVENT_ERROR_REPORT_TYPE(data1)) {
+ case HWRM_ASYNC_EVENT_CMPL_ERROR_REPORT_BASE_EVENT_DATA1_ERROR_TYPE_PAUSE_STORM:
+ PMD_DRV_LOG(WARNING, "Port:%d Pause Storm detected!\n",
+ bp->eth_dev->data->port_id);
+ break;
+ default:
+ PMD_DRV_LOG(INFO, "FW reported unknown error type data1 %d"
+ " data2: %d\n", data1, data2);
+ break;
+ }
+}
+
/*
* Async event handling
*/
if (bp->recovery_info)
bnxt_hwrm_fw_echo_reply(bp, data1, data2);
break;
+ case HWRM_ASYNC_EVENT_CMPL_EVENT_ID_ERROR_REPORT:
+ bnxt_handle_event_error_report(bp, data1, data2);
+ break;
default:
PMD_DRV_LOG(DEBUG, "handle_async_event id = 0x%x\n", event_id);
break;
rte_cpu_to_le_32(ASYNC_CMPL_EVENT_ID_DEFAULT_VNIC_CHANGE);
req.async_event_fwd[2] |=
- rte_cpu_to_le_32(ASYNC_CMPL_EVENT_ID_ECHO_REQUEST);
+ rte_cpu_to_le_32(ASYNC_CMPL_EVENT_ID_ECHO_REQUEST |
+ ASYNC_CMPL_EVENT_ID_ERROR_REPORT);
rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_CHIMP_MB);
(1 << (HWRM_ASYNC_EVENT_CMPL_EVENT_ID_DEFAULT_VNIC_CHANGE - 32))
#define ASYNC_CMPL_EVENT_ID_ECHO_REQUEST \
(1 << (HWRM_ASYNC_EVENT_CMPL_EVENT_ID_ECHO_REQUEST - 64))
+#define ASYNC_CMPL_EVENT_ID_ERROR_REPORT \
+ (1 << (HWRM_ASYNC_EVENT_CMPL_EVENT_ID_ERROR_REPORT - 64))
#define HWRM_QUEUE_SERVICE_PROFILE_LOSSY \
HWRM_QUEUE_QPORTCFG_OUTPUT_QUEUE_ID0_SERVICE_PROFILE_LOSSY