/kernel/linux/linux-5.10/drivers/net/ethernet/intel/ice/ |
D | ice_virtchnl_pf.c | 29 static int ice_check_vf_init(struct ice_pf *pf, struct ice_vf *vf) in ice_check_vf_init() argument 31 if (!test_bit(ICE_VF_STATE_INIT, vf->vf_states)) { in ice_check_vf_init() 33 vf->vf_id); in ice_check_vf_init() 86 struct ice_vf *vf = &pf->vf[i]; in ice_vc_vf_broadcast() local 89 if (!test_bit(ICE_VF_STATE_INIT, vf->vf_states) && in ice_vc_vf_broadcast() 90 !test_bit(ICE_VF_STATE_ACTIVE, vf->vf_states)) in ice_vc_vf_broadcast() 96 ice_aq_send_msg_to_vf(hw, vf->vf_id, v_opcode, v_retval, msg, in ice_vc_vf_broadcast() 109 ice_set_pfe_link(struct ice_vf *vf, struct virtchnl_pf_event *pfe, in ice_set_pfe_link() argument 112 if (vf->driver_caps & VIRTCHNL_VF_CAP_ADV_LINK_SPEED) { in ice_set_pfe_link() 133 static bool ice_vf_has_no_qs_ena(struct ice_vf *vf) in ice_vf_has_no_qs_ena() argument [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/sfc/ |
D | siena_sriov.c | 191 static unsigned abs_index(struct siena_vf *vf, unsigned index) in abs_index() argument 193 return EFX_VI_BASE + vf->index * efx_vf_size(vf->efx) + index; in abs_index() 301 static void efx_siena_sriov_reset_tx_filter(struct siena_vf *vf) in efx_siena_sriov_reset_tx_filter() argument 303 struct efx_nic *efx = vf->efx; in efx_siena_sriov_reset_tx_filter() 308 if (vf->tx_filter_id != -1) { in efx_siena_sriov_reset_tx_filter() 310 vf->tx_filter_id); in efx_siena_sriov_reset_tx_filter() 312 vf->pci_name, vf->tx_filter_id); in efx_siena_sriov_reset_tx_filter() 313 vf->tx_filter_id = -1; in efx_siena_sriov_reset_tx_filter() 316 if (is_zero_ether_addr(vf->addr.mac_addr)) in efx_siena_sriov_reset_tx_filter() 322 if (vf->tx_filter_mode == VF_TX_FILTER_AUTO && vf_max_tx_channels <= 2) in efx_siena_sriov_reset_tx_filter() [all …]
|
D | ef10_sriov.c | 118 if (!nic_data->vf) in efx_ef10_sriov_free_vf_vports() 122 struct ef10_vf *vf = nic_data->vf + i; in efx_ef10_sriov_free_vf_vports() local 125 if (vf->pci_dev && in efx_ef10_sriov_free_vf_vports() 126 vf->pci_dev->dev_flags & PCI_DEV_FLAGS_ASSIGNED) in efx_ef10_sriov_free_vf_vports() 129 if (vf->vport_assigned) { in efx_ef10_sriov_free_vf_vports() 131 vf->vport_assigned = 0; in efx_ef10_sriov_free_vf_vports() 134 if (!is_zero_ether_addr(vf->mac)) { in efx_ef10_sriov_free_vf_vports() 135 efx_ef10_vport_del_mac(efx, vf->vport_id, vf->mac); in efx_ef10_sriov_free_vf_vports() 136 eth_zero_addr(vf->mac); in efx_ef10_sriov_free_vf_vports() 139 if (vf->vport_id) { in efx_ef10_sriov_free_vf_vports() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/intel/i40e/ |
D | i40e_virtchnl_pf.c | 24 struct i40e_vf *vf = pf->vf; in i40e_vc_vf_broadcast() local 27 for (i = 0; i < pf->num_alloc_vfs; i++, vf++) { in i40e_vc_vf_broadcast() 28 int abs_vf_id = vf->vf_id + (int)hw->func_caps.vf_base_id; in i40e_vc_vf_broadcast() 30 if (!test_bit(I40E_VF_STATE_INIT, &vf->vf_states) && in i40e_vc_vf_broadcast() 31 !test_bit(I40E_VF_STATE_ACTIVE, &vf->vf_states)) in i40e_vc_vf_broadcast() 48 static void i40e_vc_notify_vf_link_state(struct i40e_vf *vf) in i40e_vc_notify_vf_link_state() argument 51 struct i40e_pf *pf = vf->pf; in i40e_vc_notify_vf_link_state() 54 int abs_vf_id = vf->vf_id + (int)hw->func_caps.vf_base_id; in i40e_vc_notify_vf_link_state() 58 if (vf->link_forced) { in i40e_vc_notify_vf_link_state() 59 pfe.event_data.link_event.link_status = vf->link_up; in i40e_vc_notify_vf_link_state() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/marvell/octeontx2/nic/ |
D | otx2_vf.c | 30 static void otx2vf_process_vfaf_mbox_msg(struct otx2_nic *vf, in otx2vf_process_vfaf_mbox_msg() argument 34 dev_err(vf->dev, in otx2vf_process_vfaf_mbox_msg() 40 dev_err(vf->dev, in otx2vf_process_vfaf_mbox_msg() 47 dev_err(vf->dev, in otx2vf_process_vfaf_mbox_msg() 55 vf->pcifunc = msg->pcifunc; in otx2vf_process_vfaf_mbox_msg() 58 mbox_handler_msix_offset(vf, (struct msix_offset_rsp *)msg); in otx2vf_process_vfaf_mbox_msg() 61 mbox_handler_npa_lf_alloc(vf, (struct npa_lf_alloc_rsp *)msg); in otx2vf_process_vfaf_mbox_msg() 64 mbox_handler_nix_lf_alloc(vf, (struct nix_lf_alloc_rsp *)msg); in otx2vf_process_vfaf_mbox_msg() 67 mbox_handler_nix_txsch_alloc(vf, in otx2vf_process_vfaf_mbox_msg() 71 mbox_handler_nix_bp_enable(vf, (struct nix_bp_cfg_rsp *)msg); in otx2vf_process_vfaf_mbox_msg() [all …]
|
/kernel/linux/linux-5.10/drivers/vdpa/ifcvf/ |
D | ifcvf_main.c | 23 struct ifcvf_hw *vf = arg; in ifcvf_config_changed() local 25 if (vf->config_cb.callback) in ifcvf_config_changed() 26 return vf->config_cb.callback(vf->config_cb.private); in ifcvf_config_changed() 49 struct ifcvf_hw *vf = &adapter->vf; in ifcvf_free_irq() local 54 devm_free_irq(&pdev->dev, vf->vring[i].irq, &vf->vring[i]); in ifcvf_free_irq() 55 vf->vring[i].irq = -EINVAL; in ifcvf_free_irq() 58 devm_free_irq(&pdev->dev, vf->config_irq, vf); in ifcvf_free_irq() 65 struct ifcvf_hw *vf = &adapter->vf; in ifcvf_request_irq() local 75 snprintf(vf->config_msix_name, 256, "ifcvf[%s]-config\n", in ifcvf_request_irq() 78 vf->config_irq = pci_irq_vector(pdev, vector); in ifcvf_request_irq() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/intel/ixgbe/ |
D | ixgbe_sriov.c | 42 mv_list[i].vf = -1; in ixgbe_alloc_vf_macvlans() 128 int vf = 0; in ixgbe_get_vfs() local 143 if (vf >= adapter->num_vfs) in ixgbe_get_vfs() 146 adapter->vfinfo[vf].vfdev = vfdev; in ixgbe_get_vfs() 147 ++vf; in ixgbe_get_vfs() 207 unsigned int num_vfs = adapter->num_vfs, vf; in ixgbe_disable_sriov() local 214 for (vf = 0; vf < num_vfs; ++vf) { in ixgbe_disable_sriov() 215 struct pci_dev *vfdev = adapter->vfinfo[vf].vfdev; in ixgbe_disable_sriov() 219 adapter->vfinfo[vf].vfdev = NULL; in ixgbe_disable_sriov() 360 u32 *msgbuf, u32 vf) in ixgbe_set_vf_multicasts() argument [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/broadcom/bnx2x/ |
D | bnx2x_sriov.c | 30 struct bnx2x_virtf **vf, 78 static void bnx2x_vf_igu_ack_sb(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_vf_igu_ack_sb() argument 86 u32 func_encode = vf->abs_vfid; in bnx2x_vf_igu_ack_sb() 112 struct bnx2x_virtf *vf, in bnx2x_validate_vf_sp_objs() argument 115 if (!bnx2x_leading_vfq(vf, sp_initialized)) { in bnx2x_validate_vf_sp_objs() 126 void bnx2x_vfop_qctor_dump_tx(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_vfop_qctor_dump_tx() argument 133 vf->abs_vfid, in bnx2x_vfop_qctor_dump_tx() 142 void bnx2x_vfop_qctor_dump_rx(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_vfop_qctor_dump_rx() argument 151 vf->abs_vfid, in bnx2x_vfop_qctor_dump_rx() 167 struct bnx2x_virtf *vf, in bnx2x_vfop_qctor_prep() argument [all …]
|
D | bnx2x_sriov.h | 166 #define vf_rxq_count(vf) ((vf)->alloc_resc.num_rxqs) argument 167 #define vf_txq_count(vf) ((vf)->alloc_resc.num_txqs) argument 168 #define vf_sb_count(vf) ((vf)->alloc_resc.num_sbs) argument 169 #define vf_mac_rules_cnt(vf) ((vf)->alloc_resc.num_mac_filters) argument 170 #define vf_vlan_rules_cnt(vf) ((vf)->alloc_resc.num_vlan_filters) argument 171 #define vf_mc_rules_cnt(vf) ((vf)->alloc_resc.num_mc_filters) argument 179 #define bnx2x_vfq(vf, nr, var) ((vf)->vfqs[(nr)].var) argument 180 #define bnx2x_leading_vfq(vf, var) ((vf)->vfqs[LEADING_IDX].var) argument 224 #define for_each_vfq(vf, var) \ argument 225 for ((var) = 0; (var) < vf_rxq_count(vf); (var)++) [all …]
|
D | bnx2x_vfpf.c | 542 static void bnx2x_leading_vfq_init(struct bnx2x *bp, struct bnx2x_virtf *vf, in bnx2x_leading_vfq_init() argument 545 u8 cl_id = vfq_cl_id(vf, q); in bnx2x_leading_vfq_init() 546 u8 func_id = FW_VF_HANDLE(vf->abs_vfid); in bnx2x_leading_vfq_init() 551 bnx2x_vf_sp(bp, vf, mac_rdata), in bnx2x_leading_vfq_init() 552 bnx2x_vf_sp_map(bp, vf, mac_rdata), in bnx2x_leading_vfq_init() 554 &vf->filter_state, in bnx2x_leading_vfq_init() 556 &vf->vf_macs_pool); in bnx2x_leading_vfq_init() 560 bnx2x_vf_sp(bp, vf, vlan_rdata), in bnx2x_leading_vfq_init() 561 bnx2x_vf_sp_map(bp, vf, vlan_rdata), in bnx2x_leading_vfq_init() 563 &vf->filter_state, in bnx2x_leading_vfq_init() [all …]
|
/kernel/linux/linux-5.10/drivers/crypto/cavium/cpt/ |
D | cptpf_mbox.c | 8 static void cpt_send_msg_to_vf(struct cpt_device *cpt, int vf, in cpt_send_msg_to_vf() argument 12 cpt_write_csr64(cpt->reg_base, CPTX_PF_VFX_MBOXX(0, vf, 1), in cpt_send_msg_to_vf() 14 cpt_write_csr64(cpt->reg_base, CPTX_PF_VFX_MBOXX(0, vf, 0), mbx->msg); in cpt_send_msg_to_vf() 20 static void cpt_mbox_send_ack(struct cpt_device *cpt, int vf, in cpt_mbox_send_ack() argument 25 cpt_send_msg_to_vf(cpt, vf, mbx); in cpt_mbox_send_ack() 28 static void cpt_clear_mbox_intr(struct cpt_device *cpt, u32 vf) in cpt_clear_mbox_intr() argument 31 cpt_write_csr64(cpt->reg_base, CPTX_PF_MBOX_INTX(0, 0), (1 << vf)); in cpt_clear_mbox_intr() 37 static void cpt_cfg_qlen_for_vf(struct cpt_device *cpt, int vf, u32 size) in cpt_cfg_qlen_for_vf() argument 41 pf_qx_ctl.u = cpt_read_csr64(cpt->reg_base, CPTX_PF_QX_CTL(0, vf)); in cpt_cfg_qlen_for_vf() 44 cpt_write_csr64(cpt->reg_base, CPTX_PF_QX_CTL(0, vf), pf_qx_ctl.u); in cpt_cfg_qlen_for_vf() [all …]
|
/kernel/linux/linux-5.10/drivers/crypto/marvell/octeontx/ |
D | otx_cptpf_mbox.c | 74 static void otx_cpt_send_msg_to_vf(struct otx_cpt_device *cpt, int vf, in otx_cpt_send_msg_to_vf() argument 78 writeq(mbx->data, cpt->reg_base + OTX_CPT_PF_VFX_MBOXX(vf, 1)); in otx_cpt_send_msg_to_vf() 79 writeq(mbx->msg, cpt->reg_base + OTX_CPT_PF_VFX_MBOXX(vf, 0)); in otx_cpt_send_msg_to_vf() 86 static void otx_cpt_mbox_send_ack(struct otx_cpt_device *cpt, int vf, in otx_cpt_mbox_send_ack() argument 91 otx_cpt_send_msg_to_vf(cpt, vf, mbx); in otx_cpt_mbox_send_ack() 95 static void otx_cptpf_mbox_send_nack(struct otx_cpt_device *cpt, int vf, in otx_cptpf_mbox_send_nack() argument 100 otx_cpt_send_msg_to_vf(cpt, vf, mbx); in otx_cptpf_mbox_send_nack() 103 static void otx_cpt_clear_mbox_intr(struct otx_cpt_device *cpt, u32 vf) in otx_cpt_clear_mbox_intr() argument 106 writeq(1ull << vf, cpt->reg_base + OTX_CPT_PF_MBOX_INTX(0)); in otx_cpt_clear_mbox_intr() 112 static void otx_cpt_cfg_qlen_for_vf(struct otx_cpt_device *cpt, int vf, in otx_cpt_cfg_qlen_for_vf() argument [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/qlogic/qlcnic/ |
D | qlcnic_sriov_pf.c | 743 struct qlcnic_vf_info *vf = trans->vf; in qlcnic_sriov_pf_channel_cfg_cmd() local 744 struct qlcnic_vport *vp = vf->vp; in qlcnic_sriov_pf_channel_cfg_cmd() 747 u16 func = vf->pci_func; in qlcnic_sriov_pf_channel_cfg_cmd() 751 adapter = vf->adapter; in qlcnic_sriov_pf_channel_cfg_cmd() 763 size = sizeof(*vf->sriov_vlans); in qlcnic_sriov_pf_channel_cfg_cmd() 765 memset(vf->sriov_vlans, 0, size); in qlcnic_sriov_pf_channel_cfg_cmd() 777 set_bit(QLC_BC_VF_STATE, &vf->state); in qlcnic_sriov_pf_channel_cfg_cmd() 779 clear_bit(QLC_BC_VF_STATE, &vf->state); in qlcnic_sriov_pf_channel_cfg_cmd() 789 struct qlcnic_vf_info *vf, in qlcnic_sriov_cfg_vf_def_mac() argument 800 vp = vf->vp; in qlcnic_sriov_cfg_vf_def_mac() [all …]
|
D | qlcnic_sriov_common.c | 146 struct qlcnic_vf_info *vf; in qlcnic_sriov_init() local 190 vf = &sriov->vf_info[i]; in qlcnic_sriov_init() 191 vf->adapter = adapter; in qlcnic_sriov_init() 192 vf->pci_func = qlcnic_sriov_virtid_fn(adapter, i); in qlcnic_sriov_init() 193 mutex_init(&vf->send_cmd_lock); in qlcnic_sriov_init() 194 spin_lock_init(&vf->vlan_list_lock); in qlcnic_sriov_init() 195 INIT_LIST_HEAD(&vf->rcv_act.wait_list); in qlcnic_sriov_init() 196 INIT_LIST_HEAD(&vf->rcv_pend.wait_list); in qlcnic_sriov_init() 197 spin_lock_init(&vf->rcv_act.lock); in qlcnic_sriov_init() 198 spin_lock_init(&vf->rcv_pend.lock); in qlcnic_sriov_init() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/cisco/enic/ |
D | enic_pp.c | 38 int enic_is_valid_pp_vf(struct enic *enic, int vf, int *err) in enic_is_valid_pp_vf() argument 40 if (vf != PORT_SELF_VF) { in enic_is_valid_pp_vf() 43 if (vf < 0 || vf >= enic->num_vfs) { in enic_is_valid_pp_vf() 57 if (vf == PORT_SELF_VF && !enic_is_dynamic(enic)) { in enic_is_valid_pp_vf() 69 static int enic_set_port_profile(struct enic *enic, int vf) in enic_set_port_profile() argument 81 ENIC_PP_BY_INDEX(enic, vf, pp, &err); in enic_set_port_profile() 99 } else if (vf == PORT_SELF_VF) { in enic_set_port_profile() 103 "for VF %d\n", vf); in enic_set_port_profile() 135 ENIC_DEVCMD_PROXY_BY_INDEX(vf, err, enic, vnic_dev_init_prov2, (u8 *)vp, in enic_set_port_profile() 145 static int enic_unset_port_profile(struct enic *enic, int vf) in enic_unset_port_profile() argument [all …]
|
D | enic_pp.h | 22 #define ENIC_PP_BY_INDEX(enic, vf, pp, err) \ argument 24 if (enic_is_valid_pp_vf(enic, vf, err)) \ 25 pp = (vf == PORT_SELF_VF) ? enic->pp : enic->pp + vf; \ 30 int enic_process_set_pp_request(struct enic *enic, int vf, 32 int enic_process_get_pp_request(struct enic *enic, int vf, 34 int enic_is_valid_pp_vf(struct enic *enic, int vf, int *err);
|
/kernel/linux/linux-5.10/drivers/net/ethernet/broadcom/bnxt/ |
D | bnxt_sriov.c | 26 struct bnxt_vf_info *vf, u16 event_id) in bnxt_hwrm_fwd_async_event_cmpl() argument 33 if (vf) in bnxt_hwrm_fwd_async_event_cmpl() 34 req.encap_async_event_target_id = cpu_to_le16(vf->fw_fid); in bnxt_hwrm_fwd_async_event_cmpl() 70 struct bnxt_vf_info *vf; in bnxt_set_vf_spoofchk() local 82 vf = &bp->pf.vf[vf_id]; in bnxt_set_vf_spoofchk() 83 if (vf->flags & BNXT_VF_SPOOFCHK) in bnxt_set_vf_spoofchk() 96 req.fid = cpu_to_le16(vf->fw_fid); in bnxt_set_vf_spoofchk() 101 vf->flags |= BNXT_VF_SPOOFCHK; in bnxt_set_vf_spoofchk() 103 vf->flags &= ~BNXT_VF_SPOOFCHK; in bnxt_set_vf_spoofchk() 108 static int bnxt_hwrm_func_qcfg_flags(struct bnxt *bp, struct bnxt_vf_info *vf) in bnxt_hwrm_func_qcfg_flags() argument [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/netronome/nfp/ |
D | nfp_net_sriov.c | 18 nfp_net_sriov_check(struct nfp_app *app, int vf, u16 cap, const char *msg) in nfp_net_sriov_check() argument 31 if (vf < 0 || vf >= app->pf->num_vfs) { in nfp_net_sriov_check() 32 nfp_warn(app->pf->cpp, "invalid VF id %d\n", vf); in nfp_net_sriov_check() 40 nfp_net_sriov_update(struct nfp_app *app, int vf, u16 update, const char *msg) in nfp_net_sriov_update() argument 46 writeb(vf, app->pf->vfcfg_tbl2 + NFP_NET_VF_CFG_MB_VF_NUM); in nfp_net_sriov_update() 62 int nfp_app_set_vf_mac(struct net_device *netdev, int vf, u8 *mac) in nfp_app_set_vf_mac() argument 68 err = nfp_net_sriov_check(app, vf, NFP_NET_VF_CFG_MB_CAP_MAC, "mac"); in nfp_app_set_vf_mac() 75 mac, vf); in nfp_app_set_vf_mac() 80 vf_offset = NFP_NET_VF_CFG_MB_SZ + vf * NFP_NET_VF_CFG_SZ; in nfp_app_set_vf_mac() 85 err = nfp_net_sriov_update(app, vf, NFP_NET_VF_CFG_MB_UPD_MAC, "MAC"); in nfp_app_set_vf_mac() [all …]
|
D | nfp_netvf_main.c | 73 struct nfp_net_vf *vf; in nfp_netvf_pci_probe() local 81 vf = kzalloc(sizeof(*vf), GFP_KERNEL); in nfp_netvf_pci_probe() 82 if (!vf) in nfp_netvf_pci_probe() 84 pci_set_drvdata(pdev, vf); in nfp_netvf_pci_probe() 180 vf->nn = nn; in nfp_netvf_pci_probe() 203 vf->q_bar = ioremap(map_addr, bar_sz); in nfp_netvf_pci_probe() 204 if (!vf->q_bar) { in nfp_netvf_pci_probe() 211 nn->tx_bar = vf->q_bar + (tx_bar_off - bar_off); in nfp_netvf_pci_probe() 213 nn->rx_bar = vf->q_bar + (rx_bar_off - bar_off); in nfp_netvf_pci_probe() 238 num_irqs = nfp_net_irqs_alloc(pdev, vf->irq_entries, in nfp_netvf_pci_probe() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/ |
D | sriov.c | 39 static int sriov_restore_guids(struct mlx5_core_dev *dev, int vf) in sriov_restore_guids() argument 46 if (sriov->vfs_ctx[vf].node_guid || in sriov_restore_guids() 47 sriov->vfs_ctx[vf].port_guid || in sriov_restore_guids() 48 sriov->vfs_ctx[vf].policy != MLX5_POLICY_INVALID) { in sriov_restore_guids() 53 in->node_guid = sriov->vfs_ctx[vf].node_guid; in sriov_restore_guids() 54 in->port_guid = sriov->vfs_ctx[vf].port_guid; in sriov_restore_guids() 55 in->policy = sriov->vfs_ctx[vf].policy; in sriov_restore_guids() 61 err = mlx5_core_modify_hca_vport_context(dev, 1, 1, vf + 1, in); in sriov_restore_guids() 63 mlx5_core_warn(dev, "modify vport context failed, unable to restore VF %d settings\n", vf); in sriov_restore_guids() 75 int vf; in mlx5_device_enable_sriov() local [all …]
|
/kernel/linux/linux-5.10/drivers/net/netdevsim/ |
D | netdev.c | 82 static int nsim_set_vf_mac(struct net_device *dev, int vf, u8 *mac) in nsim_set_vf_mac() argument 88 if (vf >= nsim_bus_dev->num_vfs || is_multicast_ether_addr(mac)) in nsim_set_vf_mac() 90 memcpy(nsim_bus_dev->vfconfigs[vf].vf_mac, mac, ETH_ALEN); in nsim_set_vf_mac() 95 static int nsim_set_vf_vlan(struct net_device *dev, int vf, in nsim_set_vf_vlan() argument 101 if (vf >= nsim_bus_dev->num_vfs || vlan > 4095 || qos > 7) in nsim_set_vf_vlan() 104 nsim_bus_dev->vfconfigs[vf].vlan = vlan; in nsim_set_vf_vlan() 105 nsim_bus_dev->vfconfigs[vf].qos = qos; in nsim_set_vf_vlan() 106 nsim_bus_dev->vfconfigs[vf].vlan_proto = vlan_proto; in nsim_set_vf_vlan() 111 static int nsim_set_vf_rate(struct net_device *dev, int vf, int min, int max) in nsim_set_vf_rate() argument 116 if (vf >= nsim_bus_dev->num_vfs) in nsim_set_vf_rate() [all …]
|
/kernel/linux/linux-5.10/drivers/infiniband/hw/mlx5/ |
D | ib_virt.c | 51 int mlx5_ib_get_vf_config(struct ib_device *device, int vf, u8 port, in mlx5_ib_get_vf_config() argument 63 err = mlx5_query_hca_vport_context(mdev, 1, 1, vf + 1, rep); in mlx5_ib_get_vf_config() 66 vf, err); in mlx5_ib_get_vf_config() 93 int mlx5_ib_set_vf_link_state(struct ib_device *device, int vf, in mlx5_ib_set_vf_link_state() argument 112 err = mlx5_core_modify_hca_vport_context(mdev, 1, 1, vf + 1, in); in mlx5_ib_set_vf_link_state() 114 vfs_ctx[vf].policy = in->policy; in mlx5_ib_set_vf_link_state() 121 int mlx5_ib_get_vf_stats(struct ib_device *device, int vf, in mlx5_ib_get_vf_stats() argument 137 err = mlx5_core_query_vport_counter(mdev, true, vf, port, out); in mlx5_ib_get_vf_stats() 152 static int set_vf_node_guid(struct ib_device *device, int vf, u8 port, u64 guid) in set_vf_node_guid() argument 166 err = mlx5_core_modify_hca_vport_context(mdev, 1, 1, vf + 1, in); in set_vf_node_guid() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/qlogic/qed/ |
D | qed_sriov.c | 161 struct qed_vf_info *vf = NULL; in qed_iov_get_vf_info() local 170 vf = &p_hwfn->pf_iov_info->vfs_array[relative_vf_id]; in qed_iov_get_vf_info() 175 return vf; in qed_iov_get_vf_info() 428 struct qed_vf_info *vf = &p_iov_info->vfs_array[idx]; in qed_iov_setup_vfdb() local 431 vf->vf_mbx.req_virt = p_req_virt_addr + idx; in qed_iov_setup_vfdb() 432 vf->vf_mbx.req_phys = req_p + idx * sizeof(union vfpf_tlvs); in qed_iov_setup_vfdb() 433 vf->vf_mbx.reply_virt = p_reply_virt_addr + idx; in qed_iov_setup_vfdb() 434 vf->vf_mbx.reply_phys = rply_p + idx * sizeof(union pfvf_tlvs); in qed_iov_setup_vfdb() 436 vf->state = VF_STOPPED; in qed_iov_setup_vfdb() 437 vf->b_init = false; in qed_iov_setup_vfdb() [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/cavium/thunder/ |
D | nic_main.c | 119 static void nic_clear_mbx_intr(struct nicpf *nic, int vf, int mbx_reg) in nic_clear_mbx_intr() argument 121 nic_reg_write(nic, NIC_PF_MAILBOX_INT + (mbx_reg << 3), BIT_ULL(vf)); in nic_clear_mbx_intr() 124 static u64 nic_get_mbx_addr(int vf) in nic_get_mbx_addr() argument 126 return NIC_PF_VF_0_127_MAILBOX_0_1 + (vf << NIC_VF_NUM_SHIFT); in nic_get_mbx_addr() 133 static void nic_send_msg_to_vf(struct nicpf *nic, int vf, union nic_mbx *mbx) in nic_send_msg_to_vf() argument 135 void __iomem *mbx_addr = nic->reg_base + nic_get_mbx_addr(vf); in nic_send_msg_to_vf() 158 static void nic_mbx_send_ready(struct nicpf *nic, int vf) in nic_mbx_send_ready() argument 165 mbx.nic_cfg.vf_id = vf; in nic_mbx_send_ready() 169 if (vf < nic->num_vf_en) { in nic_mbx_send_ready() 170 bgx_idx = NIC_GET_BGX_FROM_VF_LMAC_MAP(nic->vf_lmac_map[vf]); in nic_mbx_send_ready() [all …]
|
/kernel/linux/linux-5.10/drivers/infiniband/hw/usnic/ |
D | usnic_ib_verbs.c | 96 us_ibdev = qp_grp->vf->pf; in usnic_ib_fill_create_qp_resp() 97 pdev = usnic_vnic_get_pdev(qp_grp->vf->vnic); in usnic_ib_fill_create_qp_resp() 104 bar = usnic_vnic_get_bar(qp_grp->vf->vnic, 0); in usnic_ib_fill_create_qp_resp() 111 resp.vfid = usnic_vnic_get_index(qp_grp->vf->vnic); in usnic_ib_fill_create_qp_resp() 177 struct usnic_ib_vf *vf; in find_free_vf_and_create_qp_grp() local 197 vf = dev_get_drvdata(dev); in find_free_vf_and_create_qp_grp() 198 spin_lock(&vf->lock); in find_free_vf_and_create_qp_grp() 199 vnic = vf->vnic; in find_free_vf_and_create_qp_grp() 206 vf, pd, in find_free_vf_and_create_qp_grp() 210 spin_unlock(&vf->lock); in find_free_vf_and_create_qp_grp() [all …]
|