net/bnxt: fix unnecessary HWRM command
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>
Thu, 9 Jul 2020 09:38:30 +0000 (15:08 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Sat, 11 Jul 2020 04:18:54 +0000 (06:18 +0200)
During probe, driver issues HWRM_CFA_ADV_FLOW_MGNT_QCAPS command.
But it is not using the command response anywhere which makes the
fw call redundant.

Remove the unnecessary HWRM_CFA_ADV_FLOW_MGNT_QCAPS call to fw.
Remove the redundant flow_flags in bnxt struct.

Fixes: afef822b2e1b ("net/bnxt: support creating SMAC and inner DMAC filters")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_ethdev.c
drivers/net/bnxt/bnxt_hwrm.c
drivers/net/bnxt/bnxt_hwrm.h

index 8325e87..50f93ff 100644 (file)
@@ -638,8 +638,6 @@ struct bnxt {
 #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;
index 712de18..318d6b3 100644 (file)
@@ -5472,10 +5472,6 @@ static int bnxt_init_fw(struct bnxt *bp)
 
        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);
index 6ade32d..f9c7461 100644 (file)
@@ -5320,38 +5320,6 @@ int bnxt_hwrm_port_ts_query(struct bnxt *bp, uint8_t path, uint64_t *timestamp)
        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;
index 9e0b799..1704edd 100644 (file)
@@ -259,7 +259,6 @@ int bnxt_hwrm_error_recovery_qcfg(struct bnxt *bp);
 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);