i40e_get_link_status(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so bestie, this is a page from the Kernel API Manual (i40e_get_link_status(9)) and honestly? it's a little baddie. it does exactly one thing and it does it iconically. let's get into it πŸ¦‹


✨ NAME ✨

i40e_get_link_status β€” get status of the HW network link 🌐

like… is the cable plugged in or not. that's the whole vibe check.


✨ SYNOPSIS ✨

int i40e_get_link_status (struct i40e_hw *hw , bool *link_up );

look at her. one struct pointer, one bool pointer, returns an int. she's neat, she's tidy, she's serving 🫢


✨ ARGUMENTS ✨

  • hw β€” pointer to the hw struct πŸ’œ literally just your hardware struct, hand her over
  • link_up β€” pointer to a bool (true/false = linkup/linkdown) β€” this is where the answer lands, no cap

✨ DESCRIPTION ✨

so the variable link_up comes back true if the link is up, and false if the link is down. that's it, that's the tea πŸ“

⚠️ IMPORTANT bestie please read this part β€” the variable link_up is invalid if the returned value of status is != 0. like, if status isn't zero, do NOT trust link_up. she's not giving reliable info in that case, she's just giving chaos πŸ’€ so check that return value first, fr fr.

Side effect: LinkStatusEvent reporting becomes enabled ✨ ooh she's not just reading, she's flipping a switch. main character energy honestly πŸ‘‘


✨ SEE ALSO ✨

okay so this is the part where the manpage just lists literally everyone she knows. 127 besties. no i did not skip any, we're doing all of them, this is the group chat 🌈

and the kernel file she lives in is ./drivers/net/ethernet/intel/i40e/i40e_common.c β€” that's her address, that's her home πŸ‘πŸ’…


aaaand that's the whole page bestie, you ate it, go check a link status and slay πŸ’–

sign-off szn πŸŽ€ this lil beauty comes from ./drivers/net/ethernet/intel/i40e, dated October 2026, and yes it's still i40e_get_link_status(9) β€” same icon, same manual, same energy. mwah πŸ˜­πŸ’œ

πŸ“¦ where this page comes from