STRUCT NVEC_MSG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct nvec_msg(9) ✨

okay so bestie, welcome to the Kernel API Manual πŸ’… today we're talking about struct nvec_msg β€” literally just a buffer for a single message, no cap πŸŽ€


🌸 NAME 🌸

struct nvec_msg β€” a buffer for a single message πŸ¦‹


⭐ SYNOPSIS ⭐

struct nvec_msg {
    struct list_head node;
    unsigned char data[NVEC_MSG_SIZE];
    unsigned short size;
    unsigned short pos;
    atomic_t used;
 };

like, that's the whole vibe. five fields. she's compact, she's iconic πŸ‘‘


πŸ’– Members πŸ’–

  • node β€” messages are part of various lists in a struct nvec_chip β€” so she's linked up, she's got connections, main character energy fr fr πŸ”₯
  • data β€” the actual data of the message. the payload. the moment. the lore πŸ’€
  • size β€” for TX messages, this is the number of bytes used in data. literally just how much of the buffer is doing something 🌸
  • pos β€” for RX messages, it's the current position to write to. for TX messages, it's the position to read from. so it's giving "where are we rn" energy, iykyk πŸ¦‹
  • used β€” used for the message pool to mark a message as free/allocated. the vibe check for whether this message is claimed or up for grabs ✨

🧚 Description 🧚

this structure is used to hold outgoing and incoming messages πŸ’Œ and ngl, outgoing messages have a different format than incoming ones β€” and that is not documented yet πŸ™ˆ so yeah, that part's a mystery, we don't know her yet, she's keeping secrets 😭


πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/staging/nvec/nvec.h
  • enum nvec_event_size(9)
  • enum nvec_msg_type(9)
  • struct nvec_chip(9)

go read those next, bestie, they're lowkey required reading πŸ“šπŸ’œ


k bye ily, this page lives in ./drivers/staging/nvec and it's dated October 2026, and yes we're closing out with struct nvec_msg(9) again because she deserves a second mention 🫢✨

πŸ“¦ where this page comes from