SMP_REP_ROUTE_INFO(8)

πŸ’– SMP_REP_ROUTE_INFO πŸ’– (from the SMP_UTILS manual, section 8, bestie)

okay so, hi!! welcome to the little page that teaches you how to yell REPORT ROUTE INFORMATION at a SAS expander and get its whole route table tea β˜•βœ¨


✨ NAME ✨

smp_rep_route_info β€” the tool that invokes the REPORT ROUTE INFORMATION SMP function. that's it, that's the job πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

smp_rep_route_info [--help] [--hex] [--index=IN] [--interface=PARAMS]
[--multiple] [--num=NUM] [--phy=ID] [--raw] [--sa=SAS_ADDR] [--verbose]
[--version] [--zero] SMP_DEVICE[,N]

like look at her. she's got options. she's got range. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

So bestie, what this does is: it sends a SAS Serial Management Protocol (that's SMP, iykyk) REPORT ROUTE INFORMATION function request to an SMP target. no cap.

And who is that SMP target? it's identified by the SMP_DEVICE and the SAS_ADDR. and here's the cute part β€” depending on which interface you're using, the SAS_ADDR might just be deduced from the SMP_DEVICE all on its own. self-sufficient queen ✨

the mpt interface is the exception: it uses SMP_DEVICE to identify an HBA (that's an SMP initiator), and it needs that extra ,N bit to tell HBAs apart when there's more than one hanging out in your system. important!! don't forget the comma-N 🫢


okay now the lore πŸ“– because this actually matters:

there are two expander route table types:

  • phy-based
  • expander-based

the expander-based route table was introduced in SAS-2 and it supersedes the phy-based route tables. she's the newer model, she ate πŸ’…

the REPORT ROUTE INFORMATION function is associated with a phy-based route table. and the CONFIGURE ROUTE INFORMATION function is the one provided to manually set up a phy-based route table. different function, different vibe.

every phy in a SAS expander that has an associated routing attribute of "table" has a router table. and how many rows (or entries) does each router table have? that's given by the "expander route indexes" field in the response of the REPORT GENERAL function. go ask smp_rep_general about it, she knows 🌸


now the fun part: --multiple πŸŽ‰

when you pass --multiple, the REPORT ROUTE INFORMATION function gets called multiple times. the index value increments on each iteration, starting from --index=IN (and that default is 0).

if --num=NUM is given and NUM is greater than zero, then that's your maximum number of iterations performed. slay, bounded.

but if --num=NUM is not given (or NUM is zero)? then iterations just keep going until there are 4 adjacent disabled route entries (or some error gets detected). she'll stop eventually. probably. 😭


πŸ’œ OPTIONS πŸ’œ

quick housekeeping first: mandatory arguments to long options are mandatory for short options as well. the rules apply to everyone, no favorites πŸ’–

  • -h, --help β€” outputs the usage message, then exits. bye bestie πŸ‘‹
  • -H, --hex β€” outputs the response (minus the CRC field) in hexadecimal. for the hex girlies πŸ”₯
  • -i, --index=IN β€” the expander route index. IN is a value between 0 and 65535. default is 0. and more precisely, the maximum index value is (expander_route_indexes - 1). yes, precisely. she's precise. ✨
  • -I, --interface=PARAMS β€” interface specific parameters. and when we say "interface" here, we mean the path through the operating system to the SMP initiator. go read the smp_utils man page for more info, she explains it better 🫢
  • -m, --multiple β€” calls the REPORT ROUTE INFORMATION function multiple times, starting at --index=IN, incrementing the index value on each iteration for a maximum of --num=NUM iterations. for each enabled route table entry, one line is output. and if --num=NUM is not given (or NUM is zero) then iterations continue until 4 adjacent disabled entries are found (or some error occurs). the "keep going till it gets quiet" mode fr fr
  • -n, --num=NUM β€” used with the --multiple option to specify the maximum number of iterations. besties, they work as a duo πŸ‘―
  • -p, --phy=ID β€” the phy identifier. ID is a value between 0 and 254. default is 0.
  • -r, --raw β€” sends the response (minus the CRC field) to stdout in binary. all error messages are sent to stderr. binary to stdout, drama to stderr πŸ’€
  • -s, --sa=SAS_ADDR β€” specifies the SAS address of the SMP target device. typically this is an expander. this option may not be needed if the SMP_DEVICE already has the target's SAS address inside it. the SAS_ADDR is in decimal, but most SAS addresses are shown in hexadecimal (chaotic, I know). to give a number in hexadecimal, either prefix it with 0x or put a trailing h on it. both slay 🌈
  • -v, --verbose β€” increases the verbosity of the output. can be used multiple times. stack it. layer it. πŸŽ€
  • -V, --version β€” prints the version string, then exits.
  • -z, --zero β€” zeroes the Allocated Response Length field in the request. this option also zeroes the Request Length field in the request. this is required for strict SAS-1.1 compliance. however β€” and this is the big one β€” this option should not be given in SAS-2 and later; if it is given, an abridged response may result. ⚠️ so like, know your SAS version before you start zeroing things, bestie. don't be reckless.

🌟 CONFORMING TO 🌟

the SMP REPORT ROUTE INFORMATION function was introduced in SAS-1. and the "Expander change count" field was added in SAS-2. glow-up behavior tbh ✨


πŸ‘‘ AUTHORS πŸ‘‘

written by Douglas Gilbert. the icon. the legend. the main character of this man page πŸ’…


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? report bugs to <dgilbert at interlog dot com>. he wants to know!! fr fr 🫢


Copyright Β© 2006-2011 Douglas Gilbert

this software is distributed under a FreeBSD license. and there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. like, none. zero. we told you. 😭


🌈 SEE ALSO 🌈

  • smp_utils
  • smp_rep_general(smp_utils)

and that's the whole page bestie!! go forth and route-inspect responsibly πŸ§šπŸ’–

this was the smp_utils-0.96 era, dated May 2011 β€” she's vintage, she's iconic, she still works. periodt. πŸ‘‘πŸ’