parse_test_vector(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… parse_test_vector(9) πŸ’…

okay so this is parse_test_vector(9) from the Kernel API Manual β€” manual name folded in near the top like a lil name tag, because we're cute like that. This page is about parsing a single test vector string, and the energy is very "I know her." I'm obsessed, honestly. ✨

🌸 NAME 🌸

parse_test_vector β€” parse a single test vector string. It's giving short, sweet, iconic.

✨ SYNOPSIS ✨

The exact signature, no edits, no cap:

int parse_test_vector (const char *entry , u64 *dpa , int *pos , u8
*r_eiw , u16 *r_eig , u8 *hb_ways , int *math , u64 *expect_hpa );

πŸŽ€ ARGUMENTS πŸŽ€

The ARGUMENTS section is serving us -- undescribed -- eight times in a row, which is a choice πŸ’€. But I'm keeping every single one, exactly:

  • entry β€” -- undescribed --
  • dpa β€” -- undescribed --
  • pos β€” -- undescribed --
  • r_eiw β€” -- undescribed --
  • r_eig β€” -- undescribed --
  • hb_ways β€” -- undescribed --
  • math β€” -- undescribed --
  • expect_hpa β€” -- undescribed --

not me reading that and being like "bestie where is the info" 😭 β€” but don't worry, DESCRIPTION has the actual tea below, iykyk.

πŸ’– DESCRIPTION πŸ’–

Here's what DESCRIPTION spills, with the labels exactly as written:

  • entry: test vector string to parse
  • dpa: device physical address
  • pos: expected position in region interleave
  • r_eiw: region encoded interleave ways
  • r_eig: region encoded interleave granularity
  • hb_ways: host bridge interleave ways
  • math: interleave arithmetic (MODULO_MATH or XOR_MATH)
  • expect_spa: expected system physical address
not me noticing that DESCRIPTION says expect_spa while ARGUMENTS says expect_hpa β€” I'm just the messenger, bestie πŸ’€.

🌈 RETURN 🌈

0 on success, negative error code on failure. That's the whole return vibe, periodt.

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./tools/testing/cxl/test/cxl_translate.c is right there, plus to_hpa(9), to_dpa(9), to_pos(9), and run_translation_test(9). Go off, icons. πŸ‘‘


mwah πŸ’‹ β€” source/version: ./tools/testing/cxl/test Β· date: October 2026.

πŸ“¦ where this page comes from