qman_create_fq(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… qman_create_fq β€” the Kernel API Manual, bestie edition ✨

Okay so we're in the Kernel API Manual today, and the star of the show is qman_create_fq(9). Buckle up, this one's actually kinda iconic.


✨ NAME ✨

qman_create_fq β€” literally just allocates a FQ. That's it. That's the whole vibe. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int qman_create_fq (u32 fqid , u32 flags , struct qman_fq *fq );

🌸 ARGUMENTS 🌸

  • fqid β€” the index of the FQD to encapsulate, and no cap it must be "Out of Service". Like, non-negotiable. πŸ’€
  • flags β€” a bit-mask of QMAN_FQ_FLAG_*** options. Mix and match, bestie.
  • fq β€” the memory for storing the 'fq', with callbacks filled in. You bring the memory, it brings the callbacks. 🫢

πŸ’– DESCRIPTION πŸ’–

So what it does: it creates a frame queue object for the given fqid β€” unless the QMAN_FQ_FLAG_DYNAMIC_FQID flag is set in flags, in which case a FQID gets dynamically allocated instead (or, plot twist, the function fails if none are available 😭).

Once it's created, the caller should not touch the memory at 'fq' β€” the only exception is adjacent memory that's been extended for user-defined fields (peep the definition of "struct qman_fq" for more info on that). Hands off, it's giving main character energy and doesn't need your help. πŸ™ˆ

Now, NO_MODIFY β€” that one's only intended for enqueuing to pre-existing frame-queues that aren't supposed to be otherwise interfered with. It prevents all other modifications to the frame queue. All of them. Periodt. πŸ‘‘

Then there's the TO_DCPORTAL flag, which causes the driver to honour any context_b modifications requested in the qm_init_fq API. Why? Because that indicates the frame queue will be consumed by a direct-connect portal (PME, CAAM, or Fman). ✨

Lowkey important: when frame queues are consumed by software portals, the context_b field is controlled by the driver and can't be modified by the caller. So don't even try it. πŸ’…

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/soc/fsl/qman.h and honestly the whole squad:


Okay bestie, that's the page! 🧚 Coming to you from ./include/soc/fsl, dated October 2026 β€” screenshot it, memorize it, slay the day. πŸ’œβ­

πŸ“¦ where this page comes from