rdma_read_gid_l2_fields(9)
π 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 π
bothvlan_idandsmacare 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:
free_gid_work(9)del_gid(9)add_modify_gid(9)rdma_find_gid_by_port(9)rdma_find_gid_by_filter(9)rdma_query_gid(9)rdma_read_gid_hw_context(9)rdma_find_gid(9)rdma_get_gid_attr(9)rdma_query_gid_table(9)rdma_put_gid_attr(9)rdma_hold_gid_attr(9)rdma_read_gid_attr_ndev_rcu(9)ib_dispatch_event(9)
mwah π β this page ships from ./drivers/infiniband/core, October 2026 edition, and that's the footer vibe π«Άβ¨
π¦ 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