Lines Matching defs:req

31 	struct hwrm_fwd_async_event_cmpl_input *req;
35 rc = hwrm_req_init(bp, req, HWRM_FWD_ASYNC_EVENT_CMPL);
40 req->encap_async_event_target_id = cpu_to_le16(vf->fw_fid);
43 req->encap_async_event_target_id = cpu_to_le16(0xffff);
45 (struct hwrm_async_event_cmpl *)req->encap_async_event_cmpl;
49 rc = hwrm_req_send(bp, req);
73 struct hwrm_func_cfg_input *req;
99 rc = bnxt_hwrm_func_cfg_short_req_init(bp, &req);
101 req->fid = cpu_to_le16(vf->fw_fid);
102 req->flags = cpu_to_le32(func_flags);
103 rc = hwrm_req_send(bp, req);
117 struct hwrm_func_qcfg_input *req;
120 rc = hwrm_req_init(bp, req, HWRM_FUNC_QCFG);
124 req->fid = cpu_to_le16(BNXT_PF(bp) ? vf->fw_fid : 0xffff);
125 resp = hwrm_req_hold(bp, req);
126 rc = hwrm_req_send(bp, req);
129 hwrm_req_drop(bp, req);
144 struct hwrm_func_cfg_input *req;
150 rc = bnxt_hwrm_func_cfg_short_req_init(bp, &req);
154 req->fid = cpu_to_le16(vf->fw_fid);
156 req->flags = cpu_to_le32(FUNC_CFG_REQ_FLAGS_TRUSTED_VF_ENABLE);
158 req->flags = cpu_to_le32(FUNC_CFG_REQ_FLAGS_TRUSTED_VF_DISABLE);
159 return hwrm_req_send(bp, req);
217 struct hwrm_func_cfg_input *req;
233 rc = bnxt_hwrm_func_cfg_short_req_init(bp, &req);
239 req->fid = cpu_to_le16(vf->fw_fid);
240 req->enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_DFLT_MAC_ADDR);
241 memcpy(req->dflt_mac_addr, mac, ETH_ALEN);
242 return hwrm_req_send(bp, req);
249 struct hwrm_func_cfg_input *req;
275 rc = bnxt_hwrm_func_cfg_short_req_init(bp, &req);
277 req->fid = cpu_to_le16(vf->fw_fid);
278 req->dflt_vlan = cpu_to_le16(vlan_tag);
279 req->enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_DFLT_VLAN);
281 req->enables |= cpu_to_le32(FUNC_CFG_REQ_ENABLES_TPID);
282 req->tpid = vlan_proto;
284 rc = hwrm_req_send(bp, req);
295 struct hwrm_func_cfg_input *req;
319 rc = bnxt_hwrm_func_cfg_short_req_init(bp, &req);
321 req->fid = cpu_to_le16(vf->fw_fid);
322 req->enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_MAX_BW |
324 req->max_bw = cpu_to_le32(max_tx_rate);
325 req->min_bw = cpu_to_le32(min_tx_rate);
326 rc = hwrm_req_send(bp, req);
383 struct hwrm_func_vf_resc_free_input *req;
387 rc = hwrm_req_init(bp, req, HWRM_FUNC_VF_RESC_FREE);
391 hwrm_req_hold(bp, req);
393 req->vf_id = cpu_to_le16(i);
394 rc = hwrm_req_send(bp, req);
398 hwrm_req_drop(bp, req);
472 struct hwrm_func_buf_rgtr_input *req;
475 rc = hwrm_req_init(bp, req, HWRM_FUNC_BUF_RGTR);
479 req->req_buf_num_pages = cpu_to_le16(bp->pf.hwrm_cmd_req_pages);
480 req->req_buf_page_size = cpu_to_le16(BNXT_PAGE_SHIFT);
481 req->req_buf_len = cpu_to_le16(BNXT_HWRM_REQ_MAX_SIZE);
482 req->req_buf_page_addr0 = cpu_to_le64(bp->pf.hwrm_cmd_req_dma_addr[0]);
483 req->req_buf_page_addr1 = cpu_to_le64(bp->pf.hwrm_cmd_req_dma_addr[1]);
484 req->req_buf_page_addr2 = cpu_to_le64(bp->pf.hwrm_cmd_req_dma_addr[2]);
485 req->req_buf_page_addr3 = cpu_to_le64(bp->pf.hwrm_cmd_req_dma_addr[3]);
487 return hwrm_req_send(bp, req);
492 struct hwrm_func_cfg_input *req;
496 rc = bnxt_hwrm_func_cfg_short_req_init(bp, &req);
501 req->fid = cpu_to_le16(vf->fw_fid);
504 req->enables |= cpu_to_le32(FUNC_CFG_REQ_ENABLES_DFLT_MAC_ADDR);
505 memcpy(req->dflt_mac_addr, vf->mac_addr, ETH_ALEN);
508 req->enables |= cpu_to_le32(FUNC_CFG_REQ_ENABLES_DFLT_VLAN);
509 req->dflt_vlan = cpu_to_le16(vf->vlan);
512 req->enables |= cpu_to_le32(FUNC_CFG_REQ_ENABLES_MAX_BW |
514 req->max_bw = cpu_to_le32(vf->max_tx_rate);
515 req->min_bw = cpu_to_le32(vf->min_tx_rate);
518 req->flags |= cpu_to_le32(FUNC_CFG_REQ_FLAGS_TRUSTED_VF_ENABLE);
520 return hwrm_req_send(bp, req);
527 struct hwrm_func_qcaps_input *req;
530 rc = hwrm_req_init(bp, req, HWRM_FUNC_QCAPS);
534 req->fid = cpu_to_le16(0xffff);
535 resp = hwrm_req_hold(bp, req);
536 rc = hwrm_req_send(bp, req);
568 hwrm_req_drop(bp, req);
578 struct hwrm_func_vf_resource_cfg_input *req;
587 rc = hwrm_req_init(bp, req, HWRM_FUNC_VF_RESOURCE_CFG);
607 req->min_rsscos_ctx = cpu_to_le16(BNXT_VF_MIN_RSS_CTX);
610 req->min_rsscos_ctx = cpu_to_le16(min);
614 req->min_cmpl_rings = cpu_to_le16(min);
615 req->min_tx_rings = cpu_to_le16(min);
616 req->min_rx_rings = cpu_to_le16(min);
617 req->min_l2_ctxs = cpu_to_le16(min);
618 req->min_vnics = cpu_to_le16(min);
619 req->min_stat_ctx = cpu_to_le16(min);
621 req->min_hw_ring_grps = cpu_to_le16(min);
640 req->min_cmpl_rings = cpu_to_le16(vf_cp_rings);
641 req->min_tx_rings = cpu_to_le16(vf_tx_rings);
642 req->min_rx_rings = cpu_to_le16(vf_rx_rings);
643 req->min_l2_ctxs = cpu_to_le16(BNXT_VF_MAX_L2_CTX);
644 req->min_vnics = cpu_to_le16(vf_vnics);
645 req->min_stat_ctx = cpu_to_le16(vf_stat_ctx);
646 req->min_hw_ring_grps = cpu_to_le16(vf_ring_grps);
647 req->min_rsscos_ctx = cpu_to_le16(vf_rss);
649 req->max_cmpl_rings = cpu_to_le16(vf_cp_rings);
650 req->max_tx_rings = cpu_to_le16(vf_tx_rings);
651 req->max_rx_rings = cpu_to_le16(vf_rx_rings);
652 req->max_l2_ctxs = cpu_to_le16(BNXT_VF_MAX_L2_CTX);
653 req->max_vnics = cpu_to_le16(vf_vnics);
654 req->max_stat_ctx = cpu_to_le16(vf_stat_ctx);
655 req->max_hw_ring_grps = cpu_to_le16(vf_ring_grps);
656 req->max_rsscos_ctx = cpu_to_le16(vf_rss);
658 req->max_msix = cpu_to_le16(vf_msix / num_vfs);
660 hwrm_req_hold(bp, req);
665 req->vf_id = cpu_to_le16(pf->first_vf_id + i);
666 rc = hwrm_req_send(bp, req);
676 hw_resc->max_tx_rings -= le16_to_cpu(req->min_tx_rings) * n;
677 hw_resc->max_rx_rings -= le16_to_cpu(req->min_rx_rings) * n;
679 le16_to_cpu(req->min_hw_ring_grps) * n;
680 hw_resc->max_cp_rings -= le16_to_cpu(req->min_cmpl_rings) * n;
682 le16_to_cpu(req->min_rsscos_ctx) * n;
683 hw_resc->max_stat_ctxs -= le16_to_cpu(req->min_stat_ctx) * n;
684 hw_resc->max_vnics -= le16_to_cpu(req->min_vnics) * n;
690 hwrm_req_drop(bp, req);
702 struct hwrm_func_cfg_input *req;
708 rc = bnxt_hwrm_func_cfg_short_req_init(bp, &req);
726 req->enables = cpu_to_le32(FUNC_CFG_REQ_ENABLES_ADMIN_MTU |
738 req->mru = cpu_to_le16(mtu);
739 req->admin_mtu = cpu_to_le16(mtu);
741 req->num_rsscos_ctxs = cpu_to_le16(1);
742 req->num_cmpl_rings = cpu_to_le16(vf_cp_rings);
743 req->num_tx_rings = cpu_to_le16(vf_tx_rings);
744 req->num_rx_rings = cpu_to_le16(vf_rx_rings);
745 req->num_hw_ring_grps = cpu_to_le16(vf_ring_grps);
746 req->num_l2_ctxs = cpu_to_le16(4);
748 req->num_vnics = cpu_to_le16(vf_vnics);
750 req->num_stat_ctxs = cpu_to_le16(vf_stat_ctx);
752 hwrm_req_hold(bp, req);
756 req->fid = cpu_to_le16(pf->first_vf_id + i);
757 rc = hwrm_req_send(bp, req);
761 pf->vf[i].fw_fid = le16_to_cpu(req->fid);
768 hwrm_req_drop(bp, req);
1006 struct hwrm_fwd_resp_input *req;
1015 rc = hwrm_req_init(bp, req, HWRM_FWD_RESP);
1018 req->target_id = cpu_to_le16(vf->fw_fid);
1019 req->encap_resp_target_id = cpu_to_le16(vf->fw_fid);
1020 req->encap_resp_len = cpu_to_le16(msg_size);
1021 req->encap_resp_addr = encap_resp_addr;
1022 req->encap_resp_cmpl_ring = encap_resp_cpr;
1023 memcpy(req->encap_resp, encap_resp, msg_size);
1025 rc = hwrm_req_send(bp, req);
1035 struct hwrm_reject_fwd_resp_input *req;
1041 rc = hwrm_req_init(bp, req, HWRM_REJECT_FWD_RESP);
1044 req->target_id = cpu_to_le16(vf->fw_fid);
1045 req->encap_resp_target_id = cpu_to_le16(vf->fw_fid);
1046 memcpy(req->encap_request, vf->hwrm_cmd_req_addr, msg_size);
1048 rc = hwrm_req_send(bp, req);
1058 struct hwrm_exec_fwd_resp_input *req;
1064 rc = hwrm_req_init(bp, req, HWRM_EXEC_FWD_RESP);
1067 req->target_id = cpu_to_le16(vf->fw_fid);
1068 req->encap_resp_target_id = cpu_to_le16(vf->fw_fid);
1069 memcpy(req->encap_request, vf->hwrm_cmd_req_addr, msg_size);
1071 rc = hwrm_req_send(bp, req);
1081 struct hwrm_func_vf_cfg_input *req =
1087 if (req->enables & cpu_to_le32(FUNC_VF_CFG_REQ_ENABLES_DFLT_MAC_ADDR)) {
1090 if (is_valid_ether_addr(req->dflt_mac_addr) &&
1092 ether_addr_equal(req->dflt_mac_addr, vf->mac_addr))) {
1093 ether_addr_copy(vf->vf_mac_addr, req->dflt_mac_addr);
1104 struct hwrm_cfa_l2_filter_alloc_input *req =
1108 if (!is_valid_ether_addr((const u8 *)req->l2_addr))
1119 if (ether_addr_equal((const u8 *)req->l2_addr, vf->mac_addr))
1122 if (ether_addr_equal((const u8 *)req->l2_addr, vf->vf_mac_addr))
1244 struct hwrm_func_vf_cfg_input *req;
1256 rc = hwrm_req_init(bp, req, HWRM_FUNC_VF_CFG);
1260 req->enables = cpu_to_le32(FUNC_VF_CFG_REQ_ENABLES_DFLT_MAC_ADDR);
1261 memcpy(req->dflt_mac_addr, mac, ETH_ALEN);
1263 hwrm_req_flags(bp, req, BNXT_HWRM_CTX_SILENT);
1264 rc = hwrm_req_send(bp, req);
1278 struct hwrm_func_qcaps_input *req;
1281 if (hwrm_req_init(bp, req, HWRM_FUNC_QCAPS))
1284 req->fid = cpu_to_le16(0xffff);
1286 resp = hwrm_req_hold(bp, req);
1287 if (hwrm_req_send(bp, req))
1310 hwrm_req_drop(bp, req);