STRUCT TBNET(9)
β¨ struct tbnet β the ThunderboltIP network driver's private data, bestie β¨
okay so this is a page from the Kernel API Manual (section 9, kernel-adjacent girlies rise up π
), and it's all about struct tbnet. That's the private data blob for the ThunderboltIP network driver. Not public, not for you to poke at, just the driver's own little diary π
π¦ NAME
struct tbnet β the ThunderboltIP network driver's private data. That's it, that's the whole vibe. It's the driver's personal info stash, no cap.
πΈ SYNOPSIS
here's the whole struct, literally copy-pasted with love so you don't have to squint at the source:
struct tbnet {
const struct tb_service *svc;
struct tb_xdomain *xd;
struct tb_protocol_handler handler;
struct net_device *dev;
struct napi_struct napi;
struct tbnet_stats stats;
struct sk_buff *skb;
atomic_t command_id;
bool login_sent;
bool login_received;
int local_transmit_path;
int remote_transmit_path;
struct mutex connection_lock;
int login_retries;
struct delayed_work login_work;
struct work_struct connected_work;
struct work_struct disconnect_work;
struct thunderbolt_ip_frame_header rx_hdr;
struct tbnet_ring rx_ring;
atomic_t frame_id;
struct tbnet_ring tx_ring;
};
π Members
okay bestie, member-by-member tour, let's go π«Ά
svcβ the XDomain service this driver is bound to. Like, the service it said "yes, I'm yours" to.xdβ the XDomain that the service belongs to. The bigger picture, the main character it lives inside β¨handlerβ the ThunderboltIP configuration protocol handler. It handles the config protocol, periodt.devβ the networking device. your actual net device, hi bestie πnapiβ the NAPI structure used for Rx polling. NAPI is out here doing the polling for receives.statsβ network statistics. the receipts πskbβ the network packet that is currently being processed on the Rx path. one packet at a time, it's giving focus πcommand_idβ the ID used for the next configuration protocol packet.login_sentβ the ThunderboltIP login message was successfully sent. slay, it went out πlogin_receivedβ the ThunderboltIP login message was received from the remote host. and they said hi back πlocal_transmit_pathβ the HopID we are using to send out packets.remote_transmit_pathβ the HopID the other end is using to send packets to us.connection_lockβ the lock that serializes access tologin_sent,login_receivedandtransmit_path. no concurrent chaos allowed, we stan a mutex πlogin_retriesβ the number of login retries currently done. we keep trying, bestie.login_workβ the worker that sends ThunderboltIP login packets.connected_workβ the worker that finalizes the ThunderboltIP connection setup and enables the DMA paths for high speed data transfers. it's the glow-up phase π₯disconnect_workβ the worker that handles tearing down the ThunderboltIP connection. sad but necessary πrx_hdrβ a copy of the currently processed Rx frame, used when a network packet consists of multiple Thunderbolt frames. In host byte order. keep that in mind, it matters πrx_ringβ the software ring holding Rx frames. a whole little ring buffer of receives πframe_idβ the Frame ID use for the next Tx packet (ifTBNET_MATCH_FRAGS_IDis supported in both ends). iykyk.tx_ringβ the software ring holding Tx frames. matching ring, but for sends π¦
π SEE ALSO
- Kernel file
./drivers/net/thunderbolt/main.cstruct thunderbolt_ip_frame_header(9)
lowkey a reminder: ifTBNET_MATCH_FRAGS_IDisn't supported in both ends, that wholeframe_idsituation changes. both ends or it doesn't count, fr fr π
and that's the page, bestie π this lil' drop came from ./drivers/net/thunderbolt, dated October 2026, and it's filed under struct tbnet(9) β catch you in the kernel docs π§β¨
π¦ 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