ice_set_per_vf_res(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ice_set_per_vf_res β€” kernel API manual, but make it cute πŸ’–

okay so bestie, this one's ice_set_per_vf_res(9) and it lives in the kernel API manual, and honestly? it's giving "math homework that's actually fun." let's get into it πŸŽ€


✨ NAME ✨

ice_set_per_vf_res β€” literally just checks if vectors and queues are available. that's the whole vibe. πŸ¦‹


🌸 SYNOPSIS 🌸

int ice_set_per_vf_res (struct ice_pf *pf , u16 num_vfs );

yep, that's it. one function, two args, zero drama. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • pf β€” pointer to the PF structure. this is the main character of the whole operation, fr fr. πŸ‘‘
  • num_vfs β€” the number of SR-IOV VFs being configured. iykyk.

πŸ’œ DESCRIPTION πŸ’œ

okay so this is a three-step glow-up and each step matters, so don't skip ahead πŸ™ˆ

step one: first, determine HW interrupts from the common pool. lowkey the tradeoff here is everything: if we allocate fewer VFs, we get more vectors, and that means we can enable more queues per VF. slay. but note β€” and this is important β€” this does not grab any vectors from the SW pool that's already allocated. also note that all vector counts include one for each VF's miscellaneous interrupt vector (i.e. OICR). so like, budget accordingly bestie πŸ’€

here's the size chart, and yes it's iconic:

  • Minimum VFs β€” 2 vectors, 1 queue pair
  • Small VFs β€” 5 vectors, 4 queue pairs
  • Medium VFs β€” 17 vectors, 16 queue pairs

step two: determine number of queue pairs per VF by starting with a pre-defined maximum each VF supports. if that's not possible, then we adjust based on queue pairs available on the device. no cap, we work with what we've got. πŸ”₯

step three: lastly, set queue and MSI-X VF variables tracked by the PF so it can be used by each VF during VF initialization and reset. that's the final touch, the setting spray of the whole process ✨


🌈 SEE ALSO 🌈

kernel file ./drivers/net/ethernet/intel/ice/ice_sriov.c β€” that's the home base 🏠

and now the friend group, all of them, in order, no one left out 🫢:

ice_free_vf_entries(9), ice_free_vf_res(9), ice_dis_vf_mappings(9), ice_free_vfs(9), ice_vf_vsi_setup(9), ice_ena_vf_msix_mappings(9), ice_ena_vf_q_mappings(9), ice_ena_vf_mappings(9), ice_calc_vf_reg_idx(9), ice_init_vf_vsi_res(9), ice_start_vfs(9), ice_sriov_free_vf(9), ice_sriov_clear_reset_state(9), ice_sriov_clear_mbx_register(9), ice_sriov_trigger_reset_register(9), ice_sriov_poll_reset_status(9), ice_sriov_clear_reset_trigger(9), ice_sriov_post_vsi_rebuild(9), ice_create_vf_entries(9), ice_ena_vfs(9), ice_pci_sriov_ena(9), ice_check_sriov_allowed(9), ice_sriov_get_vf_total_msix(9), ice_sriov_set_msix_vec_count(9), ice_sriov_configure(9), ice_process_vflr_event(9), ice_get_vf_from_pfq(9), ice_globalq_to_pfq(9), ice_vf_lan_overflow_event(9), ice_set_vf_spoofchk(9), ice_get_vf_cfg(9), __ice_set_vf_mac(9), ice_set_vf_mac(9), ice_setup_vf_trust(9), ice_set_vf_trust(9), ice_set_vf_link_state(9), ice_calc_all_vfs_min_tx_rate(9), ice_min_tx_rate_oversubscribed(9), ice_set_vf_bw(9), ice_get_vf_stats(9), ice_is_supported_port_vlan_proto(9), ice_set_vf_port_vlan(9), ice_print_vf_rx_mdd_event(9), ice_print_vf_tx_mdd_event(9), ice_print_vfs_mdd_events(9), ice_restore_all_vfs_msi_state(9)


πŸ’– that's the whole page bestie, no notes. go forth and configure your VFs responsibly.

and finally β€” cute sign-off time 🧚 this page comes from ./drivers/net/ethernet/intel/ice, dated October 2026, and it's page ice_set_per_vf_res(9). mwah. πŸ’‹

πŸ“¦ where this page comes from