register_cb_ops(9)
π register_cb_ops β the "here's my number, call me when packets arrive" page π
Ok bestie, welcome to register_cb_ops(9) from the Kernel API Manual. This is the moment where your protocol driver slides its callback functions over to the LL2 layer and is like "here, you handle the Rx/Tx gossip, I trust you π". Lowkey important: this has to happen before start. Like, before-before. Not after. Before. No cap.
β¨ NAME β¨
register_cb_ops β "Protocol driver register the callback for Rx/Tx packets. Should be called before `start'." π¦
That's the whole vibe: you register the callbacks for Rx and Tx packets, and you do it before start. Not me showing up to the group chat after the party already ended π.
πΈ SYNOPSIS πΈ
void register_cb_ops (struct qed_dev *cdev , const struct qed_ll2_cb_ops
*ops , void *cookie );
Yeah she's void in the signature and she's returning 0 on success down in RETURN β that's literally what the page says, iykyk, we don't question the icon π.
π«Ά ARGUMENTS π«Ά
cdevβ the Qed dev pointer. Your main character pointer, the one everything else hangs off of π.opsβ the callback functions to register for Rx / Tx. This is you handing over your little black book of "call this when stuff happens" β¨.cookieβ to be passed to the callback functions. A little treat that gets handed to your callbacks π β you put it in, they get it back, adorable.
π₯ RETURN π₯
0 on success, otherwise an error value. Zero is the good one, zero is slay, anything else means something went sideways π.
π SEE ALSO π
- Kernel file
./include/linux/qed/qed_ll2_if.h start(9)stop(9)start_xmit(9)get_stats(9)
Go read those too bestie, they're all in ./include/linux/qed and they're all part of the era π°οΈπ
.
π gentle reminder fr fr: if you callregister_cb_opsafterstart, you are not the moment. The page says call it beforestart. Periodt.
And that's the whole page! Shoutout to the source ./include/linux/qed, dated October 2026 β she was born in the future and she's already iconic βπ¦ β catch you in the next manpage, bestie! ππ§ββοΈ
π¦ 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