rdma_read_gid_l2_fields(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay bestie, welcome to the rdma_read_gid_l2_fields(9) page in the Kernel API Manual πŸ’– this one is literally here to read the vlan ID and source MAC address of a GID entry. iconic, no cap ✨


🌸 SYNOPSIS 🌸

here's the signature, character-for-character, don't come for me 🫢

int rdma_read_gid_l2_fields (const struct ib_gid_attr *attr , u16 *vlan_id , u8 *smac );

πŸŽ€ ARGUMENTS πŸŽ€

  • attr β€” GID attribute pointer whose L2 fields to be read πŸ‘‘
  • vlan_id β€” pointer to vlan id to fill up if the GID entry has vlan id. It is optional πŸ¦‹
  • smac β€” pointer to smac to fill up for a GID entry. It is optional πŸ“
both vlan_id and smac are optional, so breathe β€” no pressure, bestie 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

rdma_read_gid_l2_fields returns 0 on success, and returns vlan id (if gid entry has vlan) and source MAC, or returns error.

that's the whole vibe: success means 0, plus the vlan id when the GID entry has one, plus the source MAC β€” or you get an error back instead 😭 periodt.


🌈 SEE ALSO 🌈

Kernel file ./drivers/infiniband/core/cache.c is in the mix, plus these besties:


mwah πŸ’‹ β€” this page ships from ./drivers/infiniband/core, October 2026 edition, and that's the footer vibe 🫢✨

πŸ“¦ where this page comes from