mlx5_ib_get_counters_id(9)
π 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 themlx5IB 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
- 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