hfi1_num_netdev_contexts(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 πŸ¦‹

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