lpfc_sriov_nr_virtfn_store(9)
π lpfc_sriov_nr_virtfn_store(9) π
okay so this is from the Kernel API Manual, and it's literally the page for the function that enables your adapter for sr-iov virtual functions. bestie, if you're here you're probably messing with virtual functions and you need the whole vibe check on what this thing actually does. no cap, every detail is staying. π
πΈ NAME πΈ
lpfc_sriov_nr_virtfn_store β Enable the adapter for sr-iov virtual functions.
β¨ SYNOPSIS β¨
ssize_t lpfc_sriov_nr_virtfn_store (struct device *dev , struct
device_attribute *attr , const char *buf , size_t count );
the whole signature, untouched, because we do not edit code in this house π
π ARGUMENTS π
devβ class device that is converted into aScsi_host. that's the glow-up.attrβ device attribute, not used. it's giving background character energy.bufβ containing the string the number of vfs to be enabled. so like, the actual number goes in here as a string. πcountβ unused variable. not me forgetting aboutcount, but the page says unused so periodt.
π DESCRIPTION π
okay so when this api is called either through user sysfs, the driver shall try to enable or disable SR-IOV virtual functions according to the following. this is the main character section, so pay attention:
- If zero virtual function has been enabled to the physical function, the driver shall invoke the pci enable virtual function api trying to enable the virtual functions. If the
nr_vfnprovided is greater than the maximum supported, the maximum virtual function number will be used for invoking the api; otherwise, thenr_vfnprovided shall be used for invoking the api. If the api call returned success, the actual number of virtual functions enabled will be set to the drivercfg_sriov_nr_virtfn; otherwise,-EINVALshall be returned and drivercfg_sriov_nr_virtfnremains zero. slay if success, sad girl hours if not. π - If none-zero virtual functions have already been enabled to the physical function, as reflected by the driver's
cfg_sriov_nr_virtfn,-EINVALwill be returned and the driver does nothing. it literally said not today. - If the
nr_vfnprovided is zero and none-zero virtual functions have been enabled, as indicated by the driver'scfg_sriov_nr_virtfn, the disabling virtual function api shall be invoked to disable all the virtual functions and driver'scfg_sriov_nr_virtfnshall be set to zero. Otherwise, if zero virtual function has been enabled, do nothing. so if there's nothing to disable, we're not doing a whole production. π
π RETURN π
- length of the
bufon success ifvalis in range the intended mode is supported. -EINVALifvalout of range or intended mode is not supported.
that's the tea, bestie: success means you get the length of buf, and out-of-range or unsupported mode means -EINVAL. β¨
π¦ SEE ALSO π¦
Kernel file ./drivers/scsi/lpfc/lpfc_attr.c β and honestly the whole friend group is here, iykyk:
lpfc_jedec_to_ascii(9),lpfc_drvr_version_show(9),lpfc_enable_fip_show(9),lpfc_info_show(9),lpfc_serialnum_show(9),lpfc_temp_sensor_show(9),lpfc_modeldesc_show(9),lpfc_modelname_show(9),lpfc_programtype_show(9),lpfc_vportnum_show(9)lpfc_fwrev_show(9),lpfc_hdw_show(9),lpfc_option_rom_version_show(9),lpfc_link_state_show(9),lpfc_sli4_protocol_show(9),lpfc_oas_supported_show(9),lpfc_link_state_store(9),lpfc_num_discovered_ports_show(9),lpfc_issue_lip(9),lpfc_do_offline(9)lpfc_reset_pci_bus(9),lpfc_selective_reset(9),lpfc_issue_reset(9),lpfc_sli4_pdev_status_reg_wait(9),lpfc_sli4_pdev_reg_request(9),lpfc_nport_evt_cnt_show(9),lpfc_board_mode_show(9),lpfc_board_mode_store(9),lpfc_get_hba_info(9),lpfc_max_rpi_show(9)lpfc_used_rpi_show(9),lpfc_max_xri_show(9),lpfc_used_xri_show(9),lpfc_max_vpi_show(9),lpfc_used_vpi_show(9),lpfc_npiv_info_show(9),lpfc_poll_show(9),lpfc_poll_store(9),lpfc_sriov_hw_max_virtfn_show(9),lpfc_enable_bbcr_set(9)lpfc_wwn_set(9),lpfc_oas_tgt_show(9),lpfc_oas_tgt_store(9),lpfc_oas_priority_show(9),lpfc_oas_priority_store(9),lpfc_oas_vpt_show(9),lpfc_oas_vpt_store(9),lpfc_oas_lun_state_show(9),lpfc_oas_lun_state_store(9),lpfc_oas_lun_status_show(9)lpfc_oas_lun_state_set(9),lpfc_oas_lun_get_next(9),lpfc_oas_lun_state_change(9),lpfc_oas_lun_show(9),lpfc_oas_lun_store(9),lpfc_nodev_tmo_show(9),lpfc_nodev_tmo_init(9),lpfc_update_rport_devloss_tmo(9),lpfc_nodev_tmo_set(9),lpfc_devloss_tmo_set(9)lpfc_tgt_queue_depth_set(9),lpfc_restrict_login_init(9),lpfc_restrict_login_set(9),lpfc_topology_store(9),lpfc_static_vport_show(9),lpfc_link_speed_store(9),lpfc_link_speed_init(9),lpfc_aer_support_store(9),lpfc_aer_cleanup_state(9),lpfc_request_firmware_upgrade_store(9)lpfc_request_firmware_upgrade_init(9),lpfc_force_rscn_store(9),lpfc_force_rscn_init(9),lpfc_fcp_imax_store(9),lpfc_fcp_imax_init(9),lpfc_cq_max_proc_limit_store(9),lpfc_cq_max_proc_limit_init(9),lpfc_fcp_cpu_map_show(9),lpfc_fcp_cpu_map_store(9),lpfc_fcp_cpu_map_init(9)lpfc_cpumask_irq_mode_init(9),lpfc_irq_chann_show(9),lpfc_sg_seg_cnt_show(9),lpfc_sg_seg_cnt_init(9),sysfs_ctlreg_write(9),sysfs_ctlreg_read(9),sysfs_mbox_write(9),sysfs_mbox_read(9),lpfc_alloc_sysfs_attr(9),lpfc_free_sysfs_attr(9)lpfc_get_host_symbolic_name(9),lpfc_get_host_port_id(9),lpfc_get_host_port_type(9),lpfc_get_host_port_state(9),lpfc_get_host_speed(9),lpfc_get_host_fabric_name(9),lpfc_get_stats(9),lpfc_reset_stats(9),lpfc_get_enc_info(9),lpfc_get_node_by_target(9)lpfc_get_starget_port_id(9),lpfc_get_starget_node_name(9),lpfc_get_starget_port_name(9),lpfc_set_rport_loss_tmo(9),lpfc_set_vport_symbolic_name(9),lpfc_hba_log_verbose_init(9),lpfc_get_hba_function_mode(9),lpfc_get_cfgparam(9),lpfc_nvme_mod_param_dep(9),lpfc_get_vport_cfgparam(9)
mwah π that's the whole page, bestie. source/version: ./drivers/scsi/lpfc; date: October 2026; manual: lpfc_sriov_nr_virtfn_store(9). go forth and handle your virtual functions with main character energy π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms