#define BNXT_FW_CAP_ADV_FLOW_COUNTERS BIT(6)
#define BNXT_FW_CAP_HCOMM_FW_STATUS BIT(7)
- uint32_t flow_flags;
-#define BNXT_FLOW_FLAG_L2_HDR_SRC_FILTER_EN BIT(0)
pthread_mutex_t flow_lock;
uint32_t vnic_cap_flags;
bnxt_hwrm_port_phy_qcaps(bp);
- rc = bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(bp);
- if (rc)
- return rc;
-
bnxt_alloc_error_recovery_info(bp);
/* Get the adapter error recovery support info */
rc = bnxt_hwrm_error_recovery_qcfg(bp);
return rc;
}
-int bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(struct bnxt *bp)
-{
- struct hwrm_cfa_adv_flow_mgnt_qcaps_output *resp =
- bp->hwrm_cmd_resp_addr;
- struct hwrm_cfa_adv_flow_mgnt_qcaps_input req = {0};
- uint32_t flags = 0;
- int rc = 0;
-
- if (!(bp->fw_cap & BNXT_FW_CAP_ADV_FLOW_MGMT))
- return rc;
-
- if (!(BNXT_PF(bp) || BNXT_VF_IS_TRUSTED(bp))) {
- PMD_DRV_LOG(DEBUG,
- "Not a PF or trusted VF. Command not supported\n");
- return 0;
- }
-
- HWRM_PREP(&req, HWRM_CFA_ADV_FLOW_MGNT_QCAPS, BNXT_USE_KONG(bp));
- rc = bnxt_hwrm_send_message(bp, &req, sizeof(req), BNXT_USE_KONG(bp));
-
- HWRM_CHECK_RESULT();
- flags = rte_le_to_cpu_32(resp->flags);
- HWRM_UNLOCK();
-
- if (flags & HWRM_CFA_ADV_FLOW_MGNT_QCAPS_L2_HDR_SRC_FILTER_EN) {
- bp->flow_flags |= BNXT_FLOW_FLAG_L2_HDR_SRC_FILTER_EN;
- PMD_DRV_LOG(INFO, "Source L2 header filtering enabled\n");
- }
-
- return rc;
-}
-
int bnxt_hwrm_cfa_counter_qcaps(struct bnxt *bp, uint16_t *max_fc)
{
int rc = 0;
int bnxt_hwrm_fw_reset(struct bnxt *bp);
int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path,
uint64_t *timestamp);
-int bnxt_hwrm_cfa_adv_flow_mgmt_qcaps(struct bnxt *bp);
int bnxt_hwrm_cfa_counter_qcaps(struct bnxt *bp, uint16_t *max_fc);
int bnxt_hwrm_ctx_rgtr(struct bnxt *bp, rte_iova_t dma_addr, uint16_t *ctx_id);
int bnxt_hwrm_ctx_unrgtr(struct bnxt *bp, uint16_t ctx_id);