ctucan_rx(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ctucan_rx β€” the Kernel API Manual page you didn't know you needed

okay so bestie, welcome to ctucan_rx(9), a real Kernel API Manual situation, and honestly? she's niche but she's iconic. let's get into it ✨


🌸 NAME 🌸

ctucan_rx β€” okay so this is the function that gets called from the CAN ISR (interrupt service routine) to finish the received-frame processing. she's the closer, the finisher, the one who ties the bow on the rx frame πŸŽ€


✨ SYNOPSIS ✨

int ctucan_rx (struct net_device *ndev );

that's it. that's the whole vibe. one function, one pointer, no cap πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • ndev β€” a pointer to the net_device structure. that's her whole personality, honestly. she takes the net device and she does the thing. 🫢

πŸ’– DESCRIPTION πŸ’–

so here's the tea β˜•: this function gets invoked from the CAN isr (that's the poll, iykyk) to process the Rx frames.

and the way that she's so lowkey about it? she does minimal processing β€” like, literally the bare minimum, she's not here to overwork herself β€” and then she invokes netif_receive_skb to handle the rest of the processing. so she hands it off to the network layer and lets them take it from there. delegation queen πŸ‘‘


πŸ”₯ RETURN πŸ”₯

the returns, bestie, let's break them down:

  • 1 β€” the frame got passed along to the network layer. slay! a total win, main character energy πŸ’–
  • 0 β€” the first frame word was read BUT the system is temporally out of free SKBs 😭 so the code is left to resolve the SKB allocation later. not a fail, just a "we'll deal with this in a sec" moment.
  • -EAGAIN β€” this is the case where the Rx FIFO is just... empty. nothing there. ghost town πŸ’€
ngl, remember that 0 is not an error β€” it's a later problem, not a never problem. the code left to resolve the SKB allocation later handles it πŸ™ˆ

🧚 SEE ALSO 🧚

the whole friend group, the whole squad, the whole kernel file:

like, that's literally the entire group chat. go read them too, they're all worth it πŸ’œ


and that's the page, bestie!! mwah πŸ’‹ this whole thing lives in ./drivers/net/can/ctucanfd, it's dated October 2026, and it's officially known as ctucan_rx(9). catch you in the next manpage β€” ily, stay hydrated, and may your Rx FIFO never be empty πŸ“βœ¨

πŸ“¦ where this page comes from