STRUCT VIRTCHNL2_RX_FLEX_DESC_ADV_NIC_3(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

struct virtchnl2_rx_flex_desc_adv_nic_3 β€” bestie, this is the RX descriptor writeback format. It lives in the Kernel API Manual, section 9. That's the vibe check for today 🫢


✨ SYNOPSIS ✨

okay so here's the literal shape of it, don't touch anything, copy it exactly:

struct virtchnl2_rx_flex_desc_adv_nic_3 {
    u8 rxdid_ucast;
    u8 status_err0_qw0;
    __le16 ptype_err_fflags0;
    __le16 pktlen_gen_bufq_id;
    __le16 hdrlen_flags;
    u8 status_err0_qw1;
    u8 status_err1;
    u8 fflags1;
    u8 ts_low;
    __le16 buf_id;
    union {
      __le16 raw_cs;
      __le16 l2tag1;
      __le16 rscseglen;
    } misc;
    __le16 hash1;
    union {
      u8 fflags2;
      u8 mirrorid;
      u8 hash2;
    } ff2_mirrid_hash2;
    u8 hash3;
    __le16 l2tag2;
    __le16 fmd4;
    __le16 l2tag1;
    __le16 fmd6;
    __le32 ts_high;
 };

πŸŽ€ Members πŸŽ€

like, every single field, no skipping, ngl this is the whole cast πŸ‘‘

  • rxdid_ucast β€” the bit layout is ucast=[7:6], rsvd=[5:4], profile_id=[3:0]. she's packed, she's compact, she's iconic ✨
  • status_err0_qw0 β€” Status/Error section 0, but specifically in quad word 0.
  • ptype_err_fflags0 β€” the packing is ff0=[15:12], udp_len_err=[11], ip_hdr_err=[10], ptype=[9:0]. three whole things in one little __le16, ate πŸ’…
  • pktlen_gen_bufq_id β€” bufq_id=[15] only in splitq, gen=[14] only in splitq, and plen=[13:0]. note the splitq-only bits, don't forget them fr fr
  • hdrlen_flags β€” miss_prepend=[15], trunc_mirr=[14], int_udp_0=[13], ext_udp0=[12], sph=[11] only in splitq, rsc=[10] only in splitq, header=[9:0]. that's a lot of flags crammed in there, main character energy honestly 🌈
  • status_err0_qw1 β€” Status/Error section 0, but this time in quad word 1. yes there are two, they're siblings 🫢
  • status_err1 β€” Status/Error section 1.
  • fflags1 β€” Flexible flags section 1.
  • ts_low β€” the lower word of the timestamp value.
  • buf_id β€” Buffer identifier. Only in splitq mode. (say it with me: only in splitq)
  • misc β€” it's a union πŸ¦‹
    • misc.raw_cs β€” Raw checksum.
    • misc.l2tag1 β€” Stripped L2 tag from the received packet.
    • misc.rscseglen β€” (the original page gives this one no description, so we're not inventing one πŸ’€)
  • hash1 β€” the lower bits of the Rx hash value.
  • ff2_mirrid_hash2 β€” another union ✨
    • ff2_mirrid_hash2.fflags2 β€” Flexible flags section 2.
    • ff2_mirrid_hash2.mirrorid β€” Mirror id.
  • hash3 β€” the upper bits of the Rx hash value.
  • l2tag2 β€” Extracted L2 tag 2 from the packet.
  • fmd4 β€” Flexible metadata container 4.
  • l2tag1 β€” Stripped L2 tag from the received packet. (yes, this is a separate member from misc.l2tag1 β€” two different l2tag1s, lowkey chaotic, but that's the struct πŸ™ˆ)
  • fmd6 β€” Flexible metadata container 6.
  • ts_high β€” Timestamp higher word of the timestamp value.

🌸 Description 🌸

Profile ID 0x2, SplitQ, flex writeback format. periodt.

and here's the flex-field map, she's giving ✨ organized ✨:

  • Flex-field 0: BufferID
  • Flex-field 1: Raw checksum/L2TAG1/RSC Seg Len (determined by HW)
  • Flex-field 2: Hash[15:0]
  • Flex-flags 2: Hash[23:16]
  • Flex-field 3: L2TAG2
  • Flex-field 5: L2TAG1
  • Flex-field 7: Timestamp (upper 32 bits)
heads up bestie: flex-field 1 is determined by HW, so don't go assuming which one of Raw checksum / L2TAG1 / RSC Seg Len you're getting πŸ‘€ that's the hardware's call, not ours.

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next, iykyk πŸ’–

  • Kernel file ./include/linux/net/intel/virtchnl2_lan_desc.h
  • struct virtchnl2_splitq_rx_buf_desc(9)
  • struct virtchnl2_singleq_rx_buf_desc(9)
  • struct virtchnl2_singleq_base_rx_desc(9)
  • struct virtchnl2_rx_flex_desc_nic(9)

and that's the whole page, bestie πŸŽ€ it ships from ./include/linux/net/intel, dated October 2026, and it's section 9 of the Kernel API Manual. go forth and parse those descriptors, you're gonna slay πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from