net/bnxt: use shorter SIMD initializers
[dpdk.git] / drivers / net / bnxt / bnxt_cpr.c
index a3a7e6a..91d1ffe 100644 (file)
@@ -50,7 +50,7 @@ static void
 bnxt_process_default_vnic_change(struct bnxt *bp,
                                 struct hwrm_async_event_cmpl *async_cmp)
 {
-       uint16_t fid, vnic_state, parent_id, vf_fid, vf_id;
+       uint16_t vnic_state, vf_fid, vf_id;
        struct bnxt_representor *vf_rep_bp;
        struct rte_eth_dev *eth_dev;
        bool vfr_found = false;
@@ -67,10 +67,7 @@ bnxt_process_default_vnic_change(struct bnxt *bp,
        if (vnic_state != BNXT_DEFAULT_VNIC_ALLOC)
                return;
 
-       parent_id = (event_data & BNXT_DEFAULT_VNIC_CHANGE_PF_ID_MASK) >>
-                       BNXT_DEFAULT_VNIC_CHANGE_PF_ID_SFT;
-       fid = BNXT_PF(bp) ? bp->fw_fid : bp->parent->fid;
-       if (parent_id != fid || !bp->rep_info)
+       if (!bp->rep_info)
                return;
 
        vf_fid = (event_data & BNXT_DEFAULT_VNIC_CHANGE_VF_ID_MASK) >>
@@ -239,7 +236,7 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
                goto reject;
        }
 
-       if (bnxt_rcv_msg_from_vf(bp, vf_id, fwd_cmd) == true) {
+       if (bnxt_rcv_msg_from_vf(bp, vf_id, fwd_cmd)) {
                /*
                 * In older firmware versions, the MAC had to be all zeros for
                 * the VF to set it's MAC via hwrm_func_vf_cfg. Set to all
@@ -254,6 +251,7 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
                                (const uint8_t *)"\x00\x00\x00\x00\x00");
                        }
                }
+
                if (fwd_cmd->req_type == HWRM_CFA_L2_SET_RX_MASK) {
                        struct hwrm_cfa_l2_set_rx_mask_input *srm =
                                                        (void *)fwd_cmd;
@@ -265,6 +263,7 @@ void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
                            HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN |
                            HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ANYVLAN_NONVLAN);
                }
+
                /* Forward */
                rc = bnxt_hwrm_exec_fwd_resp(bp, fw_vf_id, fwd_cmd, req_len);
                if (rc) {
@@ -306,7 +305,7 @@ int bnxt_event_hwrm_resp_handler(struct bnxt *bp, struct cmpl_base *cmp)
                bnxt_handle_async_event(bp, cmp);
                evt = 1;
                break;
-       case CMPL_BASE_TYPE_HWRM_FWD_RESP:
+       case CMPL_BASE_TYPE_HWRM_FWD_REQ:
                /* Handle HWRM forwarded responses */
                bnxt_handle_fwd_req(bp, cmp);
                evt = 1;