iavf_add_queue_stats(9)
π iavf_add_queue_stats(9) π
ok so this is a page from the Kernel API Manual β it's iavf_add_queue_stats, and it's literally the function that copies your queue stats into the buffer you hand it. bestie, it's giving "tiny but essential" π
β¨ NAME β¨
iavf_add_queue_stats β copy queue statistics into supplied buffer π
πΈ SYNOPSIS πΈ
void iavf_add_queue_stats (u64 **data , struct iavf_ring *ring );
π¦ ARGUMENTS π¦
dataβ the ethtool stats buffer π«Ά this is where the numbers go, and yeah, it's au64 **because the pointer gets bumped along as we fill.ringβ the ring to copy π that's the source of truth for the queue stats.
π DESCRIPTION π
ok so here's the whole situation, and it's actually kind of important, so pay attention π
Queue statistics must be copied while protected by u64_stats_fetch_begin, which means we can't just directly use iavf_add_ethtool_stats. like, we literally can't, no cap. so this function exists to do it the safe way β¨
It assumes that the queue stats are defined in iavf_gstrings_queue_stats. if they're not β that's on you, not on this function π
Now, the two paths:
- If the ring pointer is null, it zeroes out the queue stat values and updates the
datapointer. - Otherwise, it safely copies the stats from the ring into the supplied buffer, and updates the
datapointer when finished.
β οΈ big one: this function expects to be called while under rcu_read_lock. like, that's not optional, bestie. don't call it without that lock or it's gonna be a bad time π
π SEE ALSO π
- Kernel file
./drivers/net/ethernet/intel/iavf/iavf_ethtool.c struct iavf_stats(9)iavf_add_one_ethtool_stat(9)__iavf_add_ethtool_stats(9)iavf_add_ethtool_stats(9)__iavf_add_stat_strings(9)iavf_add_stat_strings(9)iavf_get_link_ksettings(9)iavf_get_sset_count(9)iavf_get_ethtool_stats(9)iavf_get_stat_strings(9)iavf_get_strings(9)iavf_get_msglevel(9)iavf_set_msglevel(9)iavf_get_drvinfo(9)iavf_get_ringparam(9)iavf_set_ringparam(9)__iavf_get_coalesce(9)iavf_get_coalesce(9)iavf_get_per_queue_coalesce(9)iavf_set_itr_per_queue(9)__iavf_set_coalesce(9)iavf_set_coalesce(9)iavf_set_per_queue_coalesce(9)iavf_fltr_to_ethtool_flow(9)iavf_ethtool_flow_to_fltr(9)iavf_is_mask_valid(9)iavf_parse_rx_flow_user_data(9)iavf_fill_rx_flow_ext_data(9)iavf_get_ethtool_fdir_entry(9)iavf_get_fdir_fltr_ids(9)iavf_add_fdir_fltr_info(9)iavf_add_fdir_ethtool(9)iavf_del_fdir_ethtool(9)iavf_set_rxnfc(9)iavf_get_rx_ring_count(9)iavf_get_rxnfc(9)iavf_get_channels(9)iavf_set_channels(9)iavf_get_rxfh_key_size(9)iavf_get_rxfh_indir_size(9)iavf_get_rxfh(9)iavf_set_rxfh(9)iavf_set_ethtool_ops(9)
and that's the whole page, bestie π this one lives in ./drivers/net/ethernet/intel/iavf, dated October 2026 β go forth and copy those stats safely under your rcu lock, mwah πβ¨
π¦ 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