nvmet_rdma_device_removal(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nvmet_rdma_device_removal β€” like, the Kernel API Manual page for it

okay so bestie, welcome to the Kernel API Manual entry for nvmet_rdma_device_removal β€” it's giving "small function, big responsibility" and honestly we're obsessed πŸŽ€

✨ NAME ✨

nvmet_rdma_device_removal β€” literally the handler for RDMA device removal πŸ¦‹

🌸 SYNOPSIS 🌸

int nvmet_rdma_device_removal (struct rdma_cm_id *cm_id , struct
       nvmet_rdma_queue *queue );

like yes, that's the whole signature, no cap ✨

πŸŽ€ ARGUMENTS πŸŽ€

  • cm_id β€” the rdma_cm id, which is used for the nvmet port πŸ’–
  • queue β€” the nvmet rdma queue (it's the cm id's qp_context, iykyk) 🫢

πŸ’… DESCRIPTION πŸ’…

so the DEVICE_REMOVAL event is basically the kernel sliding into your DMs to tell you the RDMA device is about to unplug 😭 like, the hardware's leaving the group chat. and heads up: this event can be generated on a normal queue cm_id and/or on a device bound listener cm_id β€” and in that listener case, queue will be null (yep, null, main character energy of absent values πŸ’€).

but here's the slay part: we already registered an ib_client to handle device removal for queues, so the only thing left for us to deal with is the listening port cm_ids πŸ‘‘ in that case we nullify the priv to prevent double cm_id destruction, and we destroy the cm_id implicitly by returning a non-zero rc to the callout. periodt. πŸ”₯

no extra steps, no overthinking β€” just nullify that priv, bounce a non-zero rc back at the callout, and let the implicit destruction do its thing ✨

🌈 SEE ALSO 🌈

  • Kernel file ./drivers/nvme/target/rdma.c β€” go read it, fr fr πŸ“–

and that's the vibe check, bestie πŸ’œ this icon of a page comes from ./drivers/nvme/target, dated October 2026, and it's filed under nvmet_rdma_device_removal(9) πŸŽ€ ty for coming to my ted talk, mwah 🫢🌸

πŸ“¦ where this page comes from