STRUCT LIBETH_RX_CSUM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct libeth_rx_csum(9) ✨

okay so bestie, this page lives in the Kernel API Manual and it's literally all about one lil struct β€” struct libeth_rx_csum β€” which holds the checksum offload bits that got decoded straight out of the Rx descriptor. that's it, that's the vibe πŸ’…


πŸ’– NAME πŸ’–

struct libeth_rx_csum β€” the checksum offload bits, decoded from the Rx descriptor πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct libeth_rx_csum {
    u32 l3l4p:1;
    u32 ipe:1;
    u32 eipe:1;
    u32 eudpe:1;
    u32 ipv6exadd:1;
    u32 l4e:1;
    u32 pprs:1;
    u32 nat:1;
    u32 raw_csum_valid:1;
    u32 pad:7;
    u32 raw_csum:16;
 };

look at her, all bitfields and perfectly packed 😌 no cap, every field is u32, and the bit widths are exactly as written above β€” do not touch, do not "clean up". fr fr.


🌸 Members 🌸

okay here's the cast of characters, one bitfield at a time πŸ‘‘

  • l3l4p β€” the detectable L3 and L4 integrity check is processed by the hardware πŸ”₯
  • ipe β€” IP checksum error πŸ’€
  • eipe β€” external (outermost) IP header β€” only for tunnels
  • eudpe β€” external (outermost) UDP checksum error β€” only for tunnels
  • ipv6exadd β€” IPv6 header with extension headers ✨
  • l4e β€” L4 integrity error 😭
  • pprs β€” set for packets that skip checksum calculation in the HW pre parser 🧚
  • nat β€” the packet is a UDP tunneled packet πŸŒ€
  • raw_csum_valid β€” set if the raw checksum is valid βœ…
  • pad β€” padding, there purely to naturally align the raw_csum field πŸŽ€
  • raw_csum β€” the raw checksum itself πŸ“
small heads-up bestie: eipe and eudpe are the external, i.e. outermost, header ones β€” and they only apply to tunnels. don't go reading them for normal packets, that's not the move πŸ™ˆ

🌈 SEE ALSO 🌈

go read these next, i'm obsessed with this little cluster of files honestly 🫢


ok that's the whole page, periodt πŸ’œ huge shoutout to the ./include/net/libeth directory for being the source of truth, and to the October 2026 release for dating this little masterpiece. go read the header file, ily, bye πŸŽ€βœ¨

πŸ“¦ where this page comes from