cxl_switch_gather_bandwidth(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ cxl_switch_gather_bandwidth(9) ✨

okay bestie, welcome to the kernel API manual πŸ’… this one's a <blue>9</blue>-section page (kernel internals, iykyk), and it's all about hoarding bandwidth at the switch level πŸŽ€


🌸 NAME 🌸

cxl_switch_gather_bandwidth β€” literally collect all the bandwidth at switch level, in an xarray, no cap 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

struct xarray * cxl_switch_gather_bandwidth (struct cxl_region *cxlr ,
struct xarray *input_xa , bool *gp_is_root );

πŸŽ€ ARGUMENTS πŸŽ€

  • cxlr β€” the region being operated on, the main character of this whole function ✨
  • input_xa β€” xarray indexed by the upstream device of a switch, holding data of struct cxl_perf_ctx πŸ’–
  • gp_is_root β€” (output) a bool telling you whether the grandparent is cxl root. yes she's an output param, she writes back πŸ‘‘

🌈 RETURN 🌈

an xarray of resulting cxl_perf_ctx per parent switch or root port β€” or ERR_PTR(-errno) if things go sideways 😭


πŸ’œ DESCRIPTION πŸ’œ

So here's the vibe: we iterate through the xarray πŸ”₯

Then we take the minimum of these three besties:

  • the downstream calculated bandwidth
  • the upstream link bandwidth
  • the SSLBIS of the upstream switch, if it exists (conditional queen πŸ™ˆ)

Then we sum the resulting bandwidth under the switch upstream device or an RP device ✨

And she's reusable, fr fr β€” the function can be iterated over multiple switches if the switches are present, periodt πŸ’…


πŸ“ SEE ALSO πŸ“

go read those too, they're iconic, iykyk πŸ‘‘


and that's the page, bestie!! 🧚 this little gem lives in ./drivers/cxl/core and the version/date vibe is October 2026 β€” see you next time, mwah πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from