ctucan_start_xmit(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… ctucan_start_xmit(9) β€” the "go go go, send the frame bestie" function

okay so this page is from the Kernel API Manual, and it's all about ctucan_start_xmit β€” the function that literally kicks off a transmission. No cap, it's giving "main character of the TX path" energy. Let's get into it πŸŽ€


✨ SYNOPSIS ✨

netdev_tx_t ctucan_start_xmit (struct sk_buff *skb , struct net_device
       *ndev );

that's the whole signature, copy it exactly bestie, no typos allowed πŸ’…


🌸 ARGUMENTS 🌸

  • skb β€” a sk_buff pointer, and it's the one holding the data that's gonna be Txed. that's the whole payload package, the little parcel of bytes 🫢
  • ndev β€” pointer to the net_device structure. yes, that net_device. the network device in question ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

so the upper layers call this one to initiate transmission. it grabs the next available free TXT Buffer, populates its fields, and starts the transmission. that's it, that's the plot πŸ”₯

like, it doesn't overthink it: find a free TXT buffer, fill in the fields, ship it. iconic behaviour honestly πŸ’–


⭐ RETURN ⭐

  • NETDEV_TX_OK β€” on success πŸŽ‰ slay
  • NETDEV_TX_BUSY β€” when no free TXT buffer is available 😭 every buffer was taken, tragic, try again later
  • negative return values β€” reserved for error cases πŸ’€ so if you see a negative number bestie, something went wrong

πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file lives at ./drivers/net/can/ctucanfd/ctucanfd_base.c β€” go read it, iykyk 🌈

and here's the whole friend group, all the siblings, every single one:

ctucan_state_to_str(9), ctucan_reset(9), ctucan_set_btr(9), ctucan_set_bittiming(9), ctucan_set_data_bittiming(9), ctucan_set_secondary_sample_point(9), ctucan_set_mode(9), ctucan_chip_start(9), ctucan_do_set_mode(9), ctucan_get_tx_status(9), ctucan_is_txt_buf_writable(9), ctucan_insert_frame(9), ctucan_give_txtb_cmd(9), ctucan_read_rx_frame(9), ctucan_rx(9), ctucan_read_fault_state(9), ctucan_get_rec_tec(9), ctucan_err_interrupt(9), ctucan_rx_poll(9), ctucan_rotate_txb_prio(9), ctucan_tx_interrupt(9), ctucan_interrupt(9), ctucan_chip_stop(9), ctucan_open(9), ctucan_close(9), ctucan_get_berr_counter(9)


lowkey the whole family tree is in ./drivers/net/can/ctucanfd β€” that's the source path, that's where the magic lives 🧚

and that's the page!! πŸ’œ this one came from the shoulder of ./drivers/net/can/ctucanfd and it's dated October 2026 β€” so yeah, timestamped from the future, periodt. go forth and transmit, bestie πŸ¦‹βœ¨πŸŽ€

πŸ“¦ where this page comes from