hfi1_num_netdev_contexts(9)
β¨ hfi1_num_netdev_contexts β¨
okay bestie, welcome to hfi1_num_netdev_contexts β that's a kernel API manual page, section 9, and it is literally the function that decides how many netdev receive contexts you get. yes. that one. π
π NAME π
hfi1_num_netdev_contexts β count of netdev recv contexts to use. that's it, that's the vibe. π¦
πΈ SYNOPSIS πΈ
u32 hfi1_num_netdev_contexts (struct hfi1_devdata *dd , u32
available_contexts , struct cpumask *cpu_mask );
look at her. three arguments, one u32 back out. main character energy fr. π
π ARGUMENTS π
ddβ the device you're allocating netdev contexts on. like, which device are we doing this for, bestie. π«Άavailable_contextsβ count of available receive contexts. that's the number of recv contexts you've got lying around to play with. β¨cpu_maskβ mask of possible cpus to include for contexts. so like, which cpus are invited to this party. π
π₯ RETURN π₯
so what comes back? the count of physical cores on a node, OR the remaining available recv contexts for netdev recv context usage β but only up to the maximum of HFI1_MAX_NETDEV_CTXTS. that cap is non-negotiable, no cap. π
and heads up, because this part matters: a value of 0 can be returned when acceleration is explicitly turned off, when a memory allocation error occurs, or when there are no available contexts. so if you get a 0, that's not a glitch in the matrix, that's one of those three things happening. π
π¦ SEE ALSO π¦
- Kernel file
./drivers/infiniband/hw/hfi1/netdev_rx.c hfi1_netdev_rx_init(9)hfi1_netdev_rx_destroy(9)hfi1_alloc_rx(9)hfi1_netdev_enable_queues(9)hfi1_netdev_add_data(9)hfi1_netdev_remove_data(9)hfi1_netdev_get_data(9)hfi1_netdev_get_first_data(9)
go read those too, iykyk. πβ¨
that's the page, bestie π β brought to you from ./drivers/infiniband/hw/hfi1, dated October 2026, slaying under the hfi1_num_netdev_contexts(9) name. 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