sdma_map_init(9)
okay bestie, welcome to sdma_map_init(9) from the Kernel API Manual π this is the little routine that changes the mapping based on the number of vls, and weβre gonna get into it. no cap.
β¨ NAME β¨
sdma_map_init β called when # vls change π
πΈ SYNOPSIS πΈ
int sdma_map_init (struct hfi1_devdata *dd , u8 port , u8 num_vls , u8
*vl_engines );
π ARGUMENTS π
ddβhfi1_devdataπ«Άportβ port numbernum_vlsβ number of vlsvl_enginesβ per vl engine mapping (optional)
π¦ DESCRIPTION π¦
okay so this routine changes the mapping based on the number of vls. literally its whole thing.
vl_engines is used to specify a non-uniform vl/engine loading. if itβs NULL, that implies auto computing the loading and giving each VLs a uniform distribution of engines per VL. β¨
the auto algorithm computes the sde_per_vl and the number of extra engines. any extra engines are added from the last VL on down. π
rcu locking is used here to control access to the mapping fields. π
if either the num_vls or num_sdma are non-power of 2, the array sizes in the struct sdma_vl_map and the struct sdma_map_elem are rounded up to the next highest power of 2, and the first entry is reused in a round robin fashion. π
if an error occurs, the map change is not done and the mapping is not changed. periodt. π
π SEE ALSO π
Kernel file ./drivers/infiniband/hw/hfi1/sdma.c β plus the whole function bestie squad, in order:
sdma_state_name(9)sdma_get_descq_cnt(9)sdma_engine_get_vl(9)sdma_select_engine_vl(9)sdma_select_engine_sc(9)sdma_seqfile_dump_cpu_list(9)sdma_clean(9)sdma_init(9)sdma_all_running(9)sdma_start(9)sdma_exit(9)__sdma_txclean(9)sdma_engine_error(9)sdma_seqfile_dump_sde(9)sdma_send_txreq(9)sdma_send_txlist(9)sdma_ahg_alloc(9)sdma_ahg_free(9)_sdma_engine_progress_schedule(9)
mwah π thatβs the page, signed off with source/version ./drivers/infiniband/hw/hfi1, date October 2026, and title sdma_map_init(9). π«Άβ¨
π¦ 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