STRUCT TB_CFG_REQUEST(9)
π struct tb_cfg_request(9) β Kernel API Manual
okay so bestie, welcome to the Kernel API Manual β¨ and today's main character is struct tb_cfg_request, which is literally just a Control channel request π like that's the whole NAME vibe, it's giving "i am a request, i live on a control channel, i'm booked and busy" π
β¨ SYNOPSIS β¨
here's the whole struct in all its glory, no edits, no notes, she's perfect πΈ
struct tb_cfg_request {
struct kref kref;
struct tb_ctl *ctl;
const void *request;
size_t request_size;
enum tb_cfg_pkg_type request_type;
void *response;
size_t response_size;
enum tb_cfg_pkg_type response_type;
size_t npackets;
bool (*match)(const struct tb_cfg_request *req, const struct ctl_pkg *pkg);
bool (*copy)(struct tb_cfg_request *req, const struct ctl_pkg *pkg);
void (*callback)(void *callback_data);
void *callback_data;
unsigned long flags;
struct work_struct work;
struct tb_cfg_result result;
struct list_head list;
};
π«Ά Members
like a group chat roll call but for struct fields, everybody say hi π
krefβ Reference count π« (she's counting her refs, respect it)ctlβ Pointer to the control channel structure. ngl this one's only set when the request is queued π¬requestβ Request is stored here π₯request_sizeβ Size of the request packet (in bytes), yes in bytes, keep up bestie π₯request_typeβ Type of the request packet π·οΈresponseβ Response is stored here π€response_sizeβ Maximum size of one response packet, maximum, not a suggestion πresponse_typeβ Expected type of the response packet πnpacketsβ Number of packets expected to be returned with this request πmatchβ Function used to match the incoming packet π΅οΈββοΈcopyβ Function used to copy the incoming packet toresponseπcallbackβ Callback called when the request is finished successfully β (emphasis on successfully, she's picky)callback_dataβ Data to be passed tocallbackπflagsβ Flags for the request π©workβ Work item used to complete the request π οΈresultβ Result after the request has been completed πlistβ Requests are queued using this field π§΅ (the queue is a group chat and this is the invite link)
π Description
so basically this is an arbitrary request over the Thunderbolt control channel π¦ that's the whole gig. she's flexible, she's a generalist, she's arbitrary β¨
but like β for a standard control channel message, you should really use tb_cfg_read/write and friends if possible π«Ά that's the polite thing to do, okay? no cap. don't make this struct do a job the friend group already handles π
fr fr bestie: this is the arbitrary path. the standard-message path has tb_cfg_read/write and friends waiting for you, so use those when you can π
π SEE ALSO
- Kernel file
./drivers/thunderbolt/ctl.hπ go read it, she's iconic
pink and that's the whole page!! π courtesy of ./drivers/thunderbolt, dated October 2026, living in the Kernel API Manual as struct tb_cfg_request(9) β mwah, slay, periodt β¨ππ¦
π¦ 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