mlx5_cmd_do(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 inbox mlx5_ifc command buffer. this is what you're sending, bestie. πŸ“¨
  • in_size β€” size of that inbox buffer. gotta know how much you're sending. πŸ“
  • out β€” the outbox mlx5_ifc buffer. 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, but outbox.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 🧚

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