t4vf_bar2_sge_qregs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ‘‘ t4vf_bar2_sge_qregs β€” return BAR2 SGE Queue register information πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ β€” yes we're in kernel-land today, and no, it's not scary, i promise 🫢. this one's a little function with a big name: t4vf_bar2_sge_qregs. say it with me. iconic.


🌸 SYNOPSIS 🌸

int t4vf_bar2_sge_qregs (struct adapter *adapter , unsigned int qid ,
enum t4_bar2_qtype qtype , u64 *pbar2_qoffset , unsigned int *pbar2_qid
);

she takes a bunch of stuff and returns an int, that's the whole vibe πŸŽ€


πŸ’– ARGUMENTS πŸ’–

  • adapter β€” the adapter. yes. that's it. that's the whole description. the adapter. πŸ¦‹
  • qid β€” the Queue ID. lowkey the main character of this whole function ngl.
  • qtype β€” the Ingress or Egress type for qid. pick your fighter 🌈
  • pbar2_qoffset β€” the BAR2 Offset of the qid Registers. she gets written into, she's a pointer bestie πŸ’«
  • pbar2_qid β€” the BAR2 SGE Queue ID, or 0 of qid. two moods fr fr 😭

πŸ”₯ DESCRIPTION πŸ”₯

so what does she actually do. buckle up 🎒

Returns the BAR2 SGE Queue Registers information associated with the indicated Absolute Queue ID. all that good stuff gets passed back through the return value pointers β€” that's literally why pbar2_qoffset and pbar2_qid are pointers, they're the delivery mechanism 🚚✨

qtype should be T4_BAR2_QTYPE_EGRESS for Egress Queue and T4_BAR2_QTYPE_INGRESS for Ingress Queues. no cap, those are the two values, don't get creative πŸ’…

⚠️ heads up bestie: this may return an error which indicates that BAR2 SGE Queue registers aren't available. so like. sometimes she just says no. it's not you, it's the hardware 😭

If an error is not returned, then the following values are returned:

  • If the returned BAR2 Queue ID is 0, then BAR2 SGE registers which require the "Inferred Queue ID" ability may be used. E.g. the Write Combining Doorbell Buffer. πŸ”” slay.
  • If the BAR2 Queue ID is not 0, then these "Inferred Queue ID" register may not be used. that's the whole rule. no inferred queue id for you πŸ™ˆ

so basically: 0 = you get the fancy inferred-queue-id registers, not-0 = you don't. vibe check passed βœ…


πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/net/ethernet/chelsio/cxgb4vf/t4vf_hw.c β€” that's where the source lives btw, go read her πŸ’œ

and now the whole friend group, in order, no one gets left out 🫢:


and that's the page bestie πŸ’–βœ¨ go forth and query your BAR2 SGE Queue registers responsibly πŸŽ€

source/version: ./drivers/net/ethernet/chelsio... Β· dated October 2026 Β· mwah, bye πŸ“

πŸ“¦ where this page comes from