mlx5_ib_get_counters_id(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mlx5_ib_get_counters_id β€” a kernel API manual, but make it cute ✨

okay bestie, so this one's from the Kernel API Manual, section 9 (the kernel dev pages, iykyk 🧚). It's short, it's sweet, and it's literally just one function doing one little job. Let's get into it πŸŽ€


✨ NAME ✨

mlx5_ib_get_counters_id β€” returns the counters id you should use for a given device + port combo πŸ¦‹


🌸 SYNOPSIS 🌸

u16 mlx5_ib_get_counters_id (struct mlx5_ib_dev *dev , u32 port_num );

that's it. that's the whole call. no cap πŸ’…


πŸ’– ARGUMENTS πŸ’–

  • dev β€” a pointer to the mlx5 IB device 🫢 like, the actual device struct, pointed at.
  • port_num β€” the port number, and bestie listen, it's zero based. zero based!! so port 0 is the first one, not port 1. don't do a me and forget πŸ™ˆ

πŸ”₯ DESCRIPTION πŸ”₯

so mlx5_ib_get_counters_id returns the counters set id to use for the given device-port combination, and it works in both switchdev and non switchdev mode of the parent device πŸ‘‘

that's the whole vibe. you hand it a device and a port, it hands you back the counters id. main character energy honestly 🌈


πŸ¦‹ SEE ALSO πŸ¦‹

  • The kernel file ./drivers/infiniband/hw/mlx5/counters.c β€” go read it, it ate πŸ’€βœ¨

okay so that's the page!! periodt πŸ’… β€” this iconic little number comes to you from ./drivers/infiniband/hw/mlx5, dated October 2026, and logged as mlx5_ib_get_counters_id(9) in the Kernel API Manual πŸŽ€πŸ«Ά go forth and count your counters bestie πŸ’–

πŸ“¦ where this page comes from