hinic_port_set_state(9)
π hinic_port_set_state(9)
okay so this is a page from the Kernel API Manual β yes, the actual kernel manual, and yes we're reading it for fun, don't @ me π
β¨ NAME β¨
hinic_port_set_state β set port state, bestie. that's the whole vibe. it sets the state of the port. iconic behaviour honestly π¦
πΈ SYNOPSIS πΈ
int hinic_port_set_state (struct hinic_dev *nic_dev , enum
hinic_port_state state );
like, you hand it a nic device and a state, and it goes and does the thing. main character function energy fr π
π ARGUMENTS π
nic_devβ the nic device π that's your little network interface buddy you're doing all this forstateβ the state to set β literally the state you want it to be in. you picked it, you own it
π₯ DESCRIPTION π₯
okay so the return situation is genuinely so simple it's giving minimalist:
Return 0 - Success, negative - Failure.
that's it. 0 means slay, negative means π. no cap, no in-between, no essay. periodt π
ngl bestie, always check that return value β negative is the kernel's way of saying "not today" π
π SEE ALSO π
Kernel file ./drivers/net/ethernet/huawei/hinic/hinic_port.c β that's where the actual source lives, go read it, it's lowkey fascinating π§
and the whole friend group of related calls, all of them, every single one, no skipping:
change_mac(9)hinic_port_add_mac(9)hinic_port_del_mac(9)hinic_port_get_mac(9)hinic_port_set_mtu(9)hinic_port_add_vlan(9)hinic_port_del_vlan(9)hinic_port_set_rx_mode(9)hinic_port_link_state(9)hinic_port_set_func_state(9)hinic_port_get_cap(9)hinic_port_set_tso(9)
anyway that's the page!! π«Ά this whole thing came from ./drivers/net/ethernet/huawei/... and it's dated October 2026 β so yeah, future tech, we stay ahead πβ¨
π¦ 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