set_resources_state(9)
π set_resources_state(9) β the Kernel API Manual glow-up
okay so bestie, welcome to set_resources_state β it lives in the Kernel API Manual and it's literally the function that sets the state of the resources in the NIC. that's it, that's the whole vibe. short and iconic π
β¨ SYNOPSIS β¨
int set_resources_state (struct hinic_hwdev *hwdev , enum
hinic_res_state state );
like look at her. two args, one int coming back. main character energy fr fr π
πΈ ARGUMENTS πΈ
hwdevβ the NIC HW device. the hardware baddie itself π¦stateβ the state you wanna set. that's the assignment, bestie π
π DESCRIPTION π
so here's the tea: it returns 0 for Success, and a negative value for Failure. no cap, that's the whole description. short king. π«Ά
ngl, if you get a negative back, that's a failure β clock it and handle it π
π₯ SEE ALSO π₯
the kernel file it lives in:
./drivers/net/ethernet/huawei/hinic/hinic_hw_dev.c
and the whole friend group β every single one, no skipping:
parse_capability(9)get_capability(9)get_dev_cap(9)init_msix(9)disable_msix(9)hinic_port_msg_cmd(9)init_fw_ctxt(9)set_hw_ioctxt(9)clear_io_resources(9)get_base_qpn(9)hinic_hwdev_ifup(9)hinic_hwdev_ifdown(9)hinic_hwdev_cb_register(9)hinic_hwdev_cb_unregister(9)nic_mgmt_msg_handler(9)init_pfhwdev(9)free_pfhwdev(9)hinic_init_hwdev(9)hinic_free_hwdev(9)hinic_hwdev_num_qps(9)hinic_hwdev_get_sq(9)hinic_hwdev_get_rq(9)hinic_hwdev_msix_cnt_set(9)hinic_hwdev_msix_set(9)hinic_hwdev_hw_ci_addr_set(9)hinic_hwdev_set_msix_state(9)
and that's the page, bestie π source is ./drivers/net/ethernet/huawei/... and the date on this baddie is October 2026 β shoutout to set_resources_state(9), she ate and left no crumbs πβπ
π¦ 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