efa_ah_cache_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ efa_ah_cache_get(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’… this one's efa_ah_cache_get and it's literally the moment where we go find (or make!) an AH cache entry. no cap, it's giving main character energy for address handles πŸŽ€


🌸 SYNOPSIS 🌸

struct efa_ah_cache_entry * efa_ah_cache_get (struct efa_ah_cache *ah_cache, u16 pd, u8 *gid);

like, you hand it a cache, a PD number, and a GID, and it hands you back a pointer. slay. ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ah_cache β€” the AH cache itself, the whole vibe 🫢
  • pd β€” protection domain number, u16 bestie, don't forget
  • gid β€” the GID address, an u8 * pointer

πŸ’– DESCRIPTION πŸ’–

so the way this works is: it looks up an AH cache entry by PD and GID. if it finds one, it takes a reference and returns it to you β€” iconic behavior, honestly. πŸŽ€

if it does not find one? it allocates a brand new entry and inserts it. new entry, who dis. πŸ¦‹

important bestie: the caller must lock the entry mutex and check usecnt to figure out whether a device create command is needed. don't skip this, i'm literally begging πŸ™ˆ that's the whole point.

⭐ RETURN ⭐

  • Success β†’ a pointer to the entry πŸ’–
  • Failure β†’ ERR_PTR 😭

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/infiniband/hw/efa/efa_ah_cache.c
  • efa_ah_cache_put(9) β€” the other half of the story, go read it too ✨

alright that's the whole page bestie, go forth and cache responsibly πŸ§šβ€β™€οΈπŸ’œ

sign-off time: this little beauty lives under ./drivers/infiniband/hw/efa, dated October 2026 β€” kernel API manual, periodt. πŸ‘‘πŸŒΈ
πŸ“¦ where this page comes from