STRUCT HFI1_NETDEV_RX(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct hfi1_netdev_rx(9)

okay bestie, welcome to the Kernel API Manual ✨ this one's a struct page β€” the whole thing you need to set up and run an HFI netdev. it's giving backstage-pass energy: all the bookkeeping, none of the spotlight πŸŽ€


🌸 NAME

struct hfi1_netdev_rx β€” literally the data required to setup and run HFI netdev. that's it, that's the whole vibe πŸ’–

✨ SYNOPSIS

struct hfi1_netdev_rx {
    struct net_device *rx_napi;
    struct hfi1_devdata *dd;
    struct hfi1_netdev_rxq *rxq;
    int num_rx_q;
    int rmt_start;
    struct xarray dev_tbl;
    atomic_t enabled;
    atomic_t netdevs;
 };

yes the closing brace is indented, no we are not fixing it, it's iconic πŸ’…

πŸ‘‘ Members

  • rx_napi β€” the dummy netdevice that exists so you can "poll" the receive contexts. the quotes are doing a lot of work there and honestly they've earned it 🫢
  • dd β€” it's an hfi1_devdata. that's the whole description. short king behavior fr fr πŸ‘‘
  • rxq β€” pointer to the dummy netdev's receive queues πŸ¦‹
  • num_rx_q β€” number of receive queues. a count. we love a simple int ✨
  • rmt_start β€” okay so this one is in the struct but the Members list does not describe it. i'm not gonna sit here and make something up about it, that's not the move πŸ™ˆ it's an int, it's called rmt_start, that's genuinely all we're told. iykyk πŸ’€
  • dev_tbl β€” the netdev table for unique identifier IPoIb VLANs πŸŽ€
  • enabled β€” atomic counter of netdevs that are enabling receive queues. when it hits 0, NAPI gets disabled. so like… last one out turns the lights off 🌈
  • netdevs β€” atomic counter of netdevs using the dummy netdev. when this one hits 0, the receive queues get freed 😭 two counters, two different jobs, do not mix them up
ngl the two atomic counters are the main character energy of this struct β€” one is about NAPI, one is about freeing rx queues, and they both bottom out at 0. keep your eyes on them πŸ‘€

πŸ”₯ SEE ALSO

  • Kernel file ./drivers/infiniband/hw/hfi1/netdev.h
  • struct hfi1_netdev_rxq(9)

that's the page, bestie, go forth and poll responsibly β­πŸ’œ this little gem lives under ./drivers/infiniband/hw/hfi1 and it's dated October 2026 β€” mwah, slay, periodt πŸ’…πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from