mlx5_cmd_do(9)
π mlx5_cmd_do β the kernel API manual, bestie edition β¨
Okay so bestie, welcome to the mlx5_cmd_do(9)</p> page β it lives in the Kernel API Manual and it's genuinely one of those little functions that does exactly one thing and does it iconically. π
πΈ NAME πΈ
mlx5_cmd_do β runs an fw command and waits for it to finish, periodt. π
And here's the tea: unlike mlx5_cmd_exec, this function will not translate or intercept outbox.status, and it will return -EREMOTEIO when outbox.status != MLX5_CMD_STAT_OK. No cap, that's the whole personality. π
β¨ SYNOPSIS β¨
int mlx5_cmd_do (struct mlx5_core_dev *dev , void *in , int in_size ,
void *out , int out_size );
She takes five things, gives you back an int, and doesn't elaborate further. π«Ά
π¦ ARGUMENTS π¦
devβ the mlx5 core device. the main character, lowkey. πinβ the inboxmlx5_ifccommand buffer. this is what you're sending, bestie. π¨in_sizeβ size of that inbox buffer. gotta know how much you're sending. πoutβ the outboxmlx5_ifcbuffer. this is where the answer comes back. π¬out_sizeβ size of the outbox. same energy, different buffer. π
π₯ RETURN π₯
-EREMOTEIOβ the command was executed by FW, butoutbox.status != MLX5_CMD_STAT_OK. > β οΈ bestie listen to me: the caller must check FW outbox status. this is not optional, this is a whole vibe check you have to do yourself. π0β command execution was successful,outbox.status == MLX5_CMD_STAT_OK. slay. β< 0β command execution couldn't be performed by firmware or driver. not her fault, she tried. π
π§ SEE ALSO π§
- Kernel file
./drivers/net/ethernet/mellanox/mlx5/core/cmd.cβ go read the source, iykyk π mlx5_cmd_exec(9)mlx5_cmd_exec_polling(9)mlx5_cmd_cleanup_async_ctx(9)
go off, read all of them, they're all part of the same friend group fr fr π«Άβ¨
and that's the page!! π¦ cute little sign-off: this one came from ./drivers/net/ethernet/mellano... and it's dated October 2026 β save the date, bestie, mlx5_cmd_do(9) never goes out of style πππ
π¦ 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