Home
last modified time | relevance | path

Searched refs:num_vfs (Results 1 – 25 of 137) sorted by relevance

123456

/linux/drivers/gpu/drm/xe/
H A Dxe_pci_sriov.c19 static int pf_needs_provisioning(struct xe_gt *gt, unsigned int num_vfs) in pf_needs_provisioning() argument
23 for (n = 1; n <= num_vfs; n++) in pf_needs_provisioning()
30 static int pf_provision_vfs(struct xe_device *xe, unsigned int num_vfs) in pf_provision_vfs() argument
37 if (!pf_needs_provisioning(gt, num_vfs)) in pf_provision_vfs()
39 err = xe_gt_sriov_pf_config_set_fair(gt, VFID(1), num_vfs); in pf_provision_vfs()
46 static void pf_unprovision_vfs(struct xe_device *xe, unsigned int num_vfs) in pf_unprovision_vfs() argument
53 for (n = 1; n <= num_vfs; n++) in pf_unprovision_vfs()
57 static void pf_reset_vfs(struct xe_device *xe, unsigned int num_vfs) in pf_reset_vfs() argument
64 for (n = 1; n <= num_vfs; n++) in pf_reset_vfs()
80 static void pf_link_vfs(struct xe_device *xe, int num_vfs) in pf_link_vfs() argument
117 pf_engine_activity_stats(struct xe_device * xe,unsigned int num_vfs,bool enable) pf_engine_activity_stats() argument
131 pf_enable_vfs(struct xe_device * xe,int num_vfs) pf_enable_vfs() argument
187 u16 num_vfs = pci_num_vf(pdev); pf_disable_vfs() local
222 xe_pci_sriov_configure(struct pci_dev * pdev,int num_vfs) xe_pci_sriov_configure() argument
[all...]
H A Dxe_gt_sriov_pf_config.h18 unsigned int vfid, unsigned int num_vfs);
20 unsigned int vfid, unsigned int num_vfs, u64 size);
24 int xe_gt_sriov_pf_config_set_fair_ctxs(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs);
25 int xe_gt_sriov_pf_config_bulk_set_ctxs(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs,
30 int xe_gt_sriov_pf_config_set_fair_dbs(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs);
31 int xe_gt_sriov_pf_config_bulk_set_dbs(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs,
36 int xe_gt_sriov_pf_config_set_fair_lmem(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs);
37 int xe_gt_sriov_pf_config_bulk_set_lmem(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs,
55 int xe_gt_sriov_pf_config_set_fair(struct xe_gt *gt, unsigned int vfid, unsigned int num_vfs);
H A Dxe_gt_sriov_pf_config.c597 static int pf_config_bulk_set_u64_done(struct xe_gt *gt, unsigned int first, unsigned int num_vfs, in pf_config_bulk_set_u64_done() argument
604 xe_gt_assert(gt, num_vfs); in pf_config_bulk_set_u64_done()
607 if (num_vfs == 1) in pf_config_bulk_set_u64_done()
612 first, first + num_vfs - 1, what); in pf_config_bulk_set_u64_done()
623 first, first + num_vfs - 1, value, size, what); in pf_config_bulk_set_u64_done()
631 * @num_vfs: number of VFs to provision
639 unsigned int num_vfs, u64 size) in xe_gt_sriov_pf_config_bulk_set_ggtt() argument
647 if (!num_vfs) in xe_gt_sriov_pf_config_bulk_set_ggtt()
651 for (n = vfid; n < vfid + num_vfs; n++) { in xe_gt_sriov_pf_config_bulk_set_ggtt()
658 return pf_config_bulk_set_u64_done(gt, vfid, num_vfs, siz in xe_gt_sriov_pf_config_bulk_set_ggtt()
678 pf_estimate_fair_ggtt(struct xe_gt * gt,unsigned int num_vfs) pf_estimate_fair_ggtt() argument
710 xe_gt_sriov_pf_config_set_fair_ggtt(struct xe_gt * gt,unsigned int vfid,unsigned int num_vfs) xe_gt_sriov_pf_config_set_fair_ggtt() argument
921 pf_config_bulk_set_u32_done(struct xe_gt * gt,unsigned int first,unsigned int num_vfs,u32 value,u32 (* get)(struct xe_gt *,unsigned int),const char * what,const char * (* unit)(u32),unsigned int last,int err) pf_config_bulk_set_u32_done() argument
961 xe_gt_sriov_pf_config_bulk_set_ctxs(struct xe_gt * gt,unsigned int vfid,unsigned int num_vfs,u32 num_ctxs) xe_gt_sriov_pf_config_bulk_set_ctxs() argument
984 pf_estimate_fair_ctxs(struct xe_gt * gt,unsigned int num_vfs) pf_estimate_fair_ctxs() argument
1014 xe_gt_sriov_pf_config_set_fair_ctxs(struct xe_gt * gt,unsigned int vfid,unsigned int num_vfs) xe_gt_sriov_pf_config_set_fair_ctxs() argument
1209 xe_gt_sriov_pf_config_bulk_set_dbs(struct xe_gt * gt,unsigned int vfid,unsigned int num_vfs,u32 num_dbs) xe_gt_sriov_pf_config_bulk_set_dbs() argument
1232 pf_estimate_fair_dbs(struct xe_gt * gt,unsigned int num_vfs) pf_estimate_fair_dbs() argument
1262 xe_gt_sriov_pf_config_set_fair_dbs(struct xe_gt * gt,unsigned int vfid,unsigned int num_vfs) xe_gt_sriov_pf_config_set_fair_dbs() argument
1579 xe_gt_sriov_pf_config_bulk_set_lmem(struct xe_gt * gt,unsigned int vfid,unsigned int num_vfs,u64 size) xe_gt_sriov_pf_config_bulk_set_lmem() argument
1628 pf_estimate_fair_lmem(struct xe_gt * gt,unsigned int num_vfs) pf_estimate_fair_lmem() argument
1656 xe_gt_sriov_pf_config_set_fair_lmem(struct xe_gt * gt,unsigned int vfid,unsigned int num_vfs) xe_gt_sriov_pf_config_set_fair_lmem() argument
1688 xe_gt_sriov_pf_config_set_fair(struct xe_gt * gt,unsigned int vfid,unsigned int num_vfs) xe_gt_sriov_pf_config_set_fair() argument
[all...]
H A Dxe_pci_sriov.h12 int xe_pci_sriov_configure(struct pci_dev *pdev, int num_vfs);
14 static inline int xe_pci_sriov_configure(struct pci_dev *pdev, int num_vfs) in xe_pci_sriov_configure() argument
/linux/drivers/crypto/cavium/nitrox/
H A Dnitrox_sriov.c13 * @num_vfs: number of VF(s)
15 static inline bool num_vfs_valid(int num_vfs) in num_vfs_valid() argument
19 switch (num_vfs) { in num_vfs_valid()
31 static inline enum vf_mode num_vfs_to_mode(int num_vfs) in num_vfs_to_mode() argument
35 switch (num_vfs) { in num_vfs_to_mode()
153 static int nitrox_sriov_enable(struct pci_dev *pdev, int num_vfs) in nitrox_sriov_enable() argument
158 if (!num_vfs_valid(num_vfs)) { in nitrox_sriov_enable()
159 dev_err(DEV(ndev), "Invalid num_vfs %d\n", num_vfs); in nitrox_sriov_enable()
163 if (pci_num_vf(pdev) == num_vfs) in nitrox_sriov_enable()
228 nitrox_sriov_configure(struct pci_dev * pdev,int num_vfs) nitrox_sriov_configure() argument
[all...]
H A Dnitrox_isr.h13 int nitrox_sriov_configure(struct pci_dev *pdev, int num_vfs);
15 static inline int nitrox_sriov_configure(struct pci_dev *pdev, int num_vfs) in nitrox_sriov_configure() argument
/linux/drivers/crypto/marvell/octeontx2/
H A Dotx2_cptpf_main.c21 int num_vfs) in cptpf_enable_vfpf_mbox_intr() argument
32 ena_bits = ((num_vfs - 1) % 64); in cptpf_enable_vfpf_mbox_intr()
37 if (num_vfs > 64) { in cptpf_enable_vfpf_mbox_intr()
39 ena_bits = num_vfs - 64 - 1; in cptpf_enable_vfpf_mbox_intr()
47 int num_vfs) in cptpf_disable_vfpf_mbox_intr() argument
63 if (num_vfs > 64) { in cptpf_disable_vfpf_mbox_intr()
72 int num_vfs) in cptpf_enable_vf_flr_me_intrs() argument
76 INTR_MASK(num_vfs)); in cptpf_enable_vf_flr_me_intrs()
80 RVU_PF_VFFLR_INT_ENA_W1SX(0), INTR_MASK(num_vfs)); in cptpf_enable_vf_flr_me_intrs()
83 INTR_MASK(num_vfs)); in cptpf_enable_vf_flr_me_intrs()
103 cptpf_disable_vf_flr_me_intrs(struct otx2_cptpf_dev * cptpf,int num_vfs) cptpf_disable_vf_flr_me_intrs() argument
236 cptpf_unregister_vfpf_intr(struct otx2_cptpf_dev * cptpf,int num_vfs) cptpf_unregister_vfpf_intr() argument
242 cptpf_register_vfpf_intr(struct otx2_cptpf_dev * cptpf,int num_vfs) cptpf_register_vfpf_intr() argument
334 cptpf_flr_wq_init(struct otx2_cptpf_dev * cptpf,int num_vfs) cptpf_flr_wq_init() argument
358 cptpf_vfpf_mbox_init(struct otx2_cptpf_dev * cptpf,int num_vfs) cptpf_vfpf_mbox_init() argument
654 int num_vfs = pci_num_vf(pdev); cptpf_sriov_disable() local
669 cptpf_sriov_enable(struct pci_dev * pdev,int num_vfs) cptpf_sriov_enable() argument
717 otx2_cptpf_sriov_configure(struct pci_dev * pdev,int num_vfs) otx2_cptpf_sriov_configure() argument
[all...]
/linux/drivers/net/ethernet/broadcom/bnxt/
H A Dbnxt_sriov.c369 static int bnxt_set_vf_attr(struct bnxt *bp, int num_vfs) in bnxt_set_vf_attr() argument
374 for (i = 0; i < num_vfs; i++) { in bnxt_set_vf_attr()
381 static int bnxt_hwrm_func_vf_resource_free(struct bnxt *bp, int num_vfs) in bnxt_hwrm_func_vf_resource_free() argument
392 for (i = pf->first_vf_id; i < pf->first_vf_id + num_vfs; i++) { in bnxt_hwrm_func_vf_resource_free()
424 static int bnxt_alloc_vf_resources(struct bnxt *bp, int num_vfs) in bnxt_alloc_vf_resources() argument
429 bp->pf.vf = kcalloc(num_vfs, sizeof(struct bnxt_vf_info), GFP_KERNEL); in bnxt_alloc_vf_resources()
433 bnxt_set_vf_attr(bp, num_vfs); in bnxt_alloc_vf_resources()
435 size = num_vfs * BNXT_HWRM_REQ_MAX_SIZE; in bnxt_alloc_vf_resources()
449 for (j = 0; j < BNXT_HWRM_REQS_PER_PAGE && k < num_vfs; j++) { in bnxt_alloc_vf_resources()
523 static void bnxt_hwrm_roce_sriov_cfg(struct bnxt *bp, int num_vfs) in bnxt_hwrm_roce_sriov_cfg() argument
576 bnxt_hwrm_func_vf_resc_cfg(struct bnxt * bp,int num_vfs,bool reset) bnxt_hwrm_func_vf_resc_cfg() argument
697 bnxt_hwrm_func_cfg(struct bnxt * bp,int num_vfs) bnxt_hwrm_func_cfg() argument
782 bnxt_func_cfg(struct bnxt * bp,int num_vfs,bool reset) bnxt_func_cfg() argument
790 bnxt_cfg_hw_sriov(struct bnxt * bp,int * num_vfs,bool reset) bnxt_cfg_hw_sriov() argument
818 bnxt_sriov_enable(struct bnxt * bp,int * num_vfs) bnxt_sriov_enable() argument
924 u16 num_vfs = pci_num_vf(bp->pdev); bnxt_sriov_disable() local
955 bnxt_sriov_configure(struct pci_dev * pdev,int num_vfs) bnxt_sriov_configure() argument
1317 bnxt_cfg_hw_sriov(struct bnxt * bp,int * num_vfs,bool reset) bnxt_cfg_hw_sriov() argument
[all...]
H A Dbnxt_vfr.c265 u16 num_vfs, i; in bnxt_vf_reps_close() local
270 num_vfs = pci_num_vf(bp->pdev); in bnxt_vf_reps_close()
271 for (i = 0; i < num_vfs; i++) { in bnxt_vf_reps_close()
313 u16 num_vfs = pci_num_vf(bp->pdev); in __bnxt_vf_reps_destroy() local
317 for (i = 0; i < num_vfs; i++) { in __bnxt_vf_reps_destroy()
381 u16 num_vfs = pci_num_vf(bp->pdev); in bnxt_vf_reps_free() local
387 for (i = 0; i < num_vfs; i++) in bnxt_vf_reps_free()
418 u16 *cfa_code_map = bp->cfa_code_map, num_vfs = pci_num_vf(bp->pdev); in bnxt_vf_reps_alloc() local
431 for (i = 0; i < num_vfs; i++) { in bnxt_vf_reps_alloc()
491 u16 *cfa_code_map = NULL, num_vfs in bnxt_vf_reps_create() local
[all...]
H A Dbnxt_sriov.h39 int bnxt_sriov_configure(struct pci_dev *pdev, int num_vfs);
40 int bnxt_cfg_hw_sriov(struct bnxt *bp, int *num_vfs, bool reset);
/linux/drivers/net/ethernet/mellanox/mlx5/core/
H A Dsriov.c72 static int mlx5_device_enable_sriov(struct mlx5_core_dev *dev, int num_vfs) in mlx5_device_enable_sriov() argument
78 err = mlx5_eswitch_enable(dev->priv.eswitch, num_vfs); in mlx5_device_enable_sriov()
85 num_msix_count = mlx5_get_default_msix_vec_count(dev, num_vfs); in mlx5_device_enable_sriov()
86 for (vf = 0; vf < num_vfs; vf++) { in mlx5_device_enable_sriov()
126 mlx5_device_disable_sriov(struct mlx5_core_dev *dev, int num_vfs, bool clear_vf, bool num_vf_change) in mlx5_device_disable_sriov() argument
134 for (vf = num_vfs - 1; vf >= 0; vf--) { in mlx5_device_disable_sriov()
179 static int mlx5_sriov_enable(struct pci_dev *pdev, int num_vfs) in mlx5_sriov_enable() argument
186 err = mlx5_device_enable_sriov(dev, num_vfs); in mlx5_sriov_enable()
193 err = pci_enable_sriov(pdev, num_vfs); in mlx5_sriov_enable()
196 mlx5_device_disable_sriov(dev, num_vfs, tru in mlx5_sriov_enable()
205 int num_vfs = pci_num_vf(dev->pdev); mlx5_sriov_disable() local
213 mlx5_core_sriov_configure(struct pci_dev * pdev,int num_vfs) mlx5_core_sriov_configure() argument
[all...]
H A Deswitch.c1063 mlx5_esw_for_each_vf_vport(esw, i, vport, esw->esw_funcs.num_vfs) { in mlx5_eswitch_clear_vf_vports_info()
1182 void mlx5_eswitch_unload_vf_vports(struct mlx5_eswitch *esw, u16 num_vfs) in mlx5_eswitch_unload_vf_vports() argument
1187 mlx5_esw_for_each_vf_vport(esw, i, vport, num_vfs) { in mlx5_eswitch_unload_vf_vports()
1207 int mlx5_eswitch_load_vf_vports(struct mlx5_eswitch *esw, u16 num_vfs, in mlx5_eswitch_load_vf_vports() argument
1214 mlx5_esw_for_each_vf_vport(esw, i, vport, num_vfs) { in mlx5_eswitch_load_vf_vports()
1223 mlx5_eswitch_unload_vf_vports(esw, num_vfs); in mlx5_eswitch_load_vf_vports()
1310 ret = mlx5_eswitch_load_vf_vports(esw, esw->esw_funcs.num_vfs, in mlx5_eswitch_enable_pf_vf_vports()
1335 mlx5_eswitch_unload_vf_vports(esw, esw->esw_funcs.num_vfs); in mlx5_eswitch_disable_pf_vf_vports()
1372 mlx5_eswitch_update_num_of_vfs(struct mlx5_eswitch *esw, int num_vfs) in mlx5_eswitch_update_num_of_vfs() argument
1376 if (num_vfs < in mlx5_eswitch_update_num_of_vfs()
1467 mlx5_eswitch_enable_locked(struct mlx5_eswitch * esw,int num_vfs) mlx5_eswitch_enable_locked() argument
1528 mlx5_eswitch_enable(struct mlx5_eswitch * esw,int num_vfs) mlx5_eswitch_enable() argument
[all...]
/linux/arch/powerpc/platforms/powernv/
H A Dpci-sriov.c284 static int pnv_pci_vf_release_m64(struct pci_dev *pdev, u16 num_vfs) in pnv_pci_vf_release_m64() argument
415 static int pnv_pci_vf_assign_m64(struct pci_dev *pdev, u16 num_vfs) in pnv_pci_vf_assign_m64() argument
454 for (j = 0; j < num_vfs; j++) { in pnv_pci_vf_assign_m64()
471 pnv_pci_vf_release_m64(pdev, num_vfs); in pnv_pci_vf_assign_m64()
508 u16 num_vfs; in pnv_pci_vf_resource_shift() local
523 num_vfs = iov->num_vfs; in pnv_pci_vf_resource_shift()
533 * and the actual size for num_vfs VFs BAR. This check is to in pnv_pci_vf_resource_shift()
540 res2.end = res2.start + (size * num_vfs) - 1; in pnv_pci_vf_resource_shift()
544 i, &res2, res, num_vfs, offse in pnv_pci_vf_resource_shift()
593 u16 num_vfs, base_pe; pnv_pci_sriov_disable() local
614 pnv_ioda_setup_vf_PE(struct pci_dev * pdev,u16 num_vfs) pnv_ioda_setup_vf_PE() argument
674 pnv_pci_sriov_enable(struct pci_dev * pdev,u16 num_vfs) pnv_pci_sriov_enable() argument
754 pnv_pcibios_sriov_enable(struct pci_dev * pdev,u16 num_vfs) pnv_pcibios_sriov_enable() argument
[all...]
/linux/drivers/net/ethernet/intel/fm10k/
H A Dfm10k_iov.c179 i = iov_data->num_vfs; in fm10k_iov_event()
226 for (i = iov_data->next_vf_mbx ? : iov_data->num_vfs; i--;) { in fm10k_iov_mbx()
287 int num_vfs, i; in fm10k_iov_suspend() local
289 /* pull out num_vfs from iov_data */ in fm10k_iov_suspend()
290 num_vfs = iov_data ? iov_data->num_vfs : 0; in fm10k_iov_suspend()
297 for (i = 0; i < num_vfs; i++) { in fm10k_iov_suspend()
332 int num_vfs, i; in fm10k_iov_resume() local
334 /* pull out num_vfs from iov_data */ in fm10k_iov_resume()
335 num_vfs in fm10k_iov_resume()
423 fm10k_iov_alloc_data(struct pci_dev * pdev,int num_vfs) fm10k_iov_alloc_data() argument
491 fm10k_iov_configure(struct pci_dev * pdev,int num_vfs) fm10k_iov_configure() argument
[all...]
H A Dfm10k_pf.c444 if (!hw->iov.num_vfs) in fm10k_update_int_moderator_pf()
586 u16 num_vfs = hw->iov.num_vfs; in fm10k_vf_queue_index() local
589 vf_q_idx -= fm10k_queues_per_pool(hw) * (num_vfs - vf_idx); in fm10k_vf_queue_index()
614 * @num_vfs: number of VFs to be allocated
620 static s32 fm10k_iov_assign_resources_pf(struct fm10k_hw *hw, u16 num_vfs, in fm10k_iov_assign_resources_pf() argument
632 if ((num_vfs > num_pools) || (num_vfs > hw->iov.total_vfs)) in fm10k_iov_assign_resources_pf()
636 hw->iov.num_vfs = num_vfs; in fm10k_iov_assign_resources_pf()
[all...]
/linux/drivers/net/ethernet/sfc/
H A Def100_sriov.c16 static int efx_ef100_pci_sriov_enable(struct efx_nic *efx, int num_vfs) in efx_ef100_pci_sriov_enable() argument
23 efx->vf_count = num_vfs; in efx_ef100_pci_sriov_enable()
24 rc = pci_enable_sriov(dev, num_vfs); in efx_ef100_pci_sriov_enable()
31 for (i = 0; i < num_vfs; i++) { in efx_ef100_pci_sriov_enable()
66 int efx_ef100_sriov_configure(struct efx_nic *efx, int num_vfs) in efx_ef100_sriov_configure() argument
68 if (num_vfs == 0) in efx_ef100_sriov_configure()
71 return efx_ef100_pci_sriov_enable(efx, num_vfs); in efx_ef100_sriov_configure()
/linux/drivers/net/ethernet/pensando/ionic/
H A Dionic_bus_pci.c120 for (i = ionic->num_vfs - 1; i >= 0; i--) { in ionic_vf_dealloc_locked()
134 ionic->num_vfs = 0; in ionic_vf_dealloc_locked()
144 static int ionic_vf_alloc(struct ionic *ionic, int num_vfs) in ionic_vf_alloc() argument
153 ionic->vfs = kcalloc(num_vfs, sizeof(struct ionic_vf), GFP_KERNEL); in ionic_vf_alloc()
159 for (i = 0; i < num_vfs; i++) { in ionic_vf_alloc()
169 ionic->num_vfs++; in ionic_vf_alloc()
183 static int ionic_sriov_configure(struct pci_dev *pdev, int num_vfs) in ionic_sriov_configure() argument
193 if (num_vfs > 0) { in ionic_sriov_configure()
194 ret = pci_enable_sriov(pdev, num_vfs); in ionic_sriov_configure()
200 ret = ionic_vf_alloc(ionic, num_vfs); in ionic_sriov_configure()
309 int num_vfs; ionic_probe() local
[all...]
/linux/drivers/net/ethernet/intel/ixgbe/
H A Dixgbe_sriov.c26 unsigned int num_vfs) in ixgbe_alloc_vf_macvlans() argument
36 (IXGBE_MAX_PF_MACVLANS + 1 + num_vfs); in ixgbe_alloc_vf_macvlans()
53 unsigned int num_vfs) in __ixgbe_enable_sriov() argument
68 adapter->vfinfo = kcalloc(num_vfs, sizeof(struct vf_data_storage), in __ixgbe_enable_sriov()
73 adapter->num_vfs = num_vfs; in __ixgbe_enable_sriov()
75 ixgbe_alloc_vf_macvlans(adapter, num_vfs); in __ixgbe_enable_sriov()
76 adapter->ring_feature[RING_F_VMDQ].offset = num_vfs; in __ixgbe_enable_sriov()
83 if ((adapter->hw.mac.type == ixgbe_mac_82599EB) && (num_vfs < 16)) { in __ixgbe_enable_sriov()
86 } else if (num_vfs < 3 in __ixgbe_enable_sriov()
159 unsigned int num_vfs; ixgbe_enable_sriov() local
209 unsigned int num_vfs = adapter->num_vfs, vf; ixgbe_disable_sriov() local
276 ixgbe_pci_sriov_enable(struct pci_dev * dev,int num_vfs) ixgbe_pci_sriov_enable() argument
360 ixgbe_pci_sriov_configure(struct pci_dev * dev,int num_vfs) ixgbe_pci_sriov_configure() argument
[all...]
/linux/drivers/net/ethernet/wangxun/libwx/
H A Dwx_sriov.c22 static int wx_alloc_vf_macvlans(struct wx *wx, u8 num_vfs) in wx_alloc_vf_macvlans() argument
31 (WX_MAX_PF_MACVLANS + 1 + num_vfs); in wx_alloc_vf_macvlans()
53 wx->num_vfs = 0; in wx_sriov_clear_data()
74 static int __wx_enable_sriov(struct wx *wx, u8 num_vfs) in __wx_enable_sriov() argument
80 dev_info(&wx->pdev->dev, "SR-IOV enabled with %d VFs\n", num_vfs); in __wx_enable_sriov()
82 if (num_vfs == 7 && wx->mac.type == wx_mac_em) in __wx_enable_sriov()
89 wx->ring_feature[RING_F_VMDQ].offset = num_vfs; in __wx_enable_sriov()
91 wx->vfinfo = kcalloc(num_vfs, sizeof(struct vf_data_storage), in __wx_enable_sriov()
96 ret = wx_alloc_vf_macvlans(wx, num_vfs); in __wx_enable_sriov()
103 for (i = 0; i < num_vfs; in __wx_enable_sriov()
148 wx_pci_sriov_enable(struct pci_dev * dev,int num_vfs) wx_pci_sriov_enable() argument
184 wx_pci_sriov_configure(struct pci_dev * pdev,int num_vfs) wx_pci_sriov_configure() argument
[all...]
/linux/drivers/net/ethernet/qlogic/qlcnic/
H A Dqlcnic_sriov_pf.c75 u32 num_vfs, max, temp; in qlcnic_sriov_pf_cal_res_limit() local
81 num_vfs = sriov->num_vfs; in qlcnic_sriov_pf_cal_res_limit()
82 max = num_vfs + 1; in qlcnic_sriov_pf_cal_res_limit()
95 temp = res->num_rx_ucast_mac_filters - num_macs * num_vfs; in qlcnic_sriov_pf_cal_res_limit()
97 temp = res->num_tx_mac_filters - num_macs * num_vfs; in qlcnic_sriov_pf_cal_res_limit()
99 temp = num_macs * num_vfs * QLCNIC_SRIOV_VF_MAX_MAC; in qlcnic_sriov_pf_cal_res_limit()
103 info->max_tx_ques = res->num_tx_queues - sriov->num_vfs; in qlcnic_sriov_pf_cal_res_limit()
162 total_fn = sriov->num_vfs + 1; in qlcnic_sriov_set_vf_max_vlan()
412 for (i = 0; i < sriov->num_vfs; in qlcnic_sriov_pf_del_flr_queue()
566 qlcnic_sriov_pf_enable(struct qlcnic_adapter * adapter,int num_vfs) qlcnic_sriov_pf_enable() argument
581 __qlcnic_pci_sriov_enable(struct qlcnic_adapter * adapter,int num_vfs) __qlcnic_pci_sriov_enable() argument
618 qlcnic_pci_sriov_enable(struct qlcnic_adapter * adapter,int num_vfs) qlcnic_pci_sriov_enable() argument
667 qlcnic_pci_sriov_configure(struct pci_dev * dev,int num_vfs) qlcnic_pci_sriov_configure() argument
1767 u16 num_vfs = sriov->num_vfs; qlcnic_sriov_pf_reset() local
1806 int i, num_vfs; qlcnic_sriov_set_vf_mac() local
[all...]
/linux/drivers/net/ethernet/netronome/nfp/
H A Dnfp_main.c242 static int nfp_pcie_sriov_enable(struct pci_dev *pdev, int num_vfs) in nfp_pcie_sriov_enable() argument
249 if (num_vfs > pf->limit_vfs) { in nfp_pcie_sriov_enable()
255 err = pci_enable_sriov(pdev, num_vfs); in nfp_pcie_sriov_enable()
264 err = nfp_app_sriov_enable(pf->app, num_vfs); in nfp_pcie_sriov_enable()
272 pf->num_vfs = num_vfs; in nfp_pcie_sriov_enable()
274 dev_dbg(&pdev->dev, "Created %d VFs.\n", pf->num_vfs); in nfp_pcie_sriov_enable()
277 return num_vfs; in nfp_pcie_sriov_enable()
308 pf->num_vfs = 0; in nfp_pcie_sriov_disable()
318 static int nfp_pcie_sriov_configure(struct pci_dev *pdev, int num_vfs) in nfp_pcie_sriov_configure() argument
[all...]
/linux/drivers/pci/
H A Diov.c446 u16 num_vfs; in sriov_numvfs_show() local
450 num_vfs = pdev->sriov->num_VFs; in sriov_numvfs_show()
453 return sysfs_emit(buf, "%u\n", num_vfs); in sriov_numvfs_show()
457 * num_vfs > 0; number of VFs to enable
458 * num_vfs = 0; disable all VFs
469 u16 num_vfs; in sriov_numvfs_store() local
471 if (kstrtou16(buf, 0, &num_vfs) < 0) in sriov_numvfs_store()
474 if (num_vfs > pci_sriov_get_totalvfs(pdev)) in sriov_numvfs_store()
479 if (num_vfs == pdev->sriov->num_VFs) in sriov_numvfs_store()
496 if (num_vfs in sriov_numvfs_store()
614 pcibios_sriov_enable(struct pci_dev * pdev,u16 num_vfs) pcibios_sriov_enable() argument
624 sriov_add_vfs(struct pci_dev * dev,u16 num_vfs) sriov_add_vfs() argument
1375 pci_iov_vf_bar_get_sizes(struct pci_dev * dev,int resno,int num_vfs) pci_iov_vf_bar_get_sizes() argument
[all...]
/linux/drivers/crypto/cavium/cpt/
H A Dcptpf_main.c19 static u32 num_vfs = 4; /* Default 4 VF enabled */ variable
20 module_param(num_vfs, uint, 0444);
21 MODULE_PARM_DESC(num_vfs, "Number of VFs to enable(1-16)");
504 static int cpt_sriov_init(struct cpt_device *cpt, int num_vfs) in cpt_sriov_init() argument
517 cpt->num_vf_en = num_vfs; /* User requested VFs */ in cpt_sriov_init()
550 if (num_vfs > 16 || num_vfs < 4) { in cpt_probe()
552 num_vfs); in cpt_probe()
553 num_vfs = 4; in cpt_probe()
602 err = cpt_sriov_init(cpt, num_vfs); in cpt_probe()
[all...]
/linux/drivers/net/ethernet/huawei/hinic/
H A Dhinic_sriov.c604 if (vf >= sriov_info->num_vfs) in hinic_ndo_get_vf_config()
649 if (!is_valid_ether_addr(mac) || vf >= sriov_info->num_vfs) in hinic_ndo_set_vf_mac()
796 if (vf >= sriov_info->num_vfs || vlan >= VLAN_N_VID || qos > HINIC_MAX_QOS) in hinic_ndo_set_vf_vlan()
837 if (vf >= sriov_info->num_vfs) in hinic_ndo_set_vf_trust()
868 if (vf >= nic_dev->sriov_info.num_vfs) { in hinic_ndo_set_vf_bw()
870 nic_dev->sriov_info.num_vfs); in hinic_ndo_set_vf_bw()
956 if (vf >= sriov_info->num_vfs) in hinic_ndo_set_vf_spoofchk()
1020 if (vf_id >= sriov_info->num_vfs) { in hinic_ndo_set_vf_link_state()
1302 tmp_vfs = (u16)sriov_info->num_vfs; in hinic_pci_sriov_disable()
1303 sriov_info->num_vfs in hinic_pci_sriov_disable()
1312 hinic_pci_sriov_enable(struct pci_dev * pdev,int num_vfs) hinic_pci_sriov_enable() argument
1351 hinic_pci_sriov_configure(struct pci_dev * dev,int num_vfs) hinic_pci_sriov_configure() argument
[all...]
/linux/drivers/net/ethernet/cavium/liquidio/
H A Dlio_vf_rep.c493 int i, num_vfs; in lio_vf_rep_create() local
501 num_vfs = oct->sriov_info.num_vfs_alloced; in lio_vf_rep_create()
503 oct->vf_rep_list.num_vfs = 0; in lio_vf_rep_create()
504 for (i = 0; i < num_vfs; i++) { in lio_vf_rep_create()
542 oct->vf_rep_list.num_vfs++; in lio_vf_rep_create()
557 for (i = 0; i < oct->vf_rep_list.num_vfs; i++) { in lio_vf_rep_create()
569 oct->vf_rep_list.num_vfs = 0; in lio_vf_rep_create()
587 for (i = 0; i < oct->vf_rep_list.num_vfs; i++) { in lio_vf_rep_destroy()
602 oct->vf_rep_list.num_vfs = 0; in lio_vf_rep_destroy()

123456