SMP_REP_ZONE_PERM_TBL(8)

πŸ¦‹ NAME πŸ¦‹

smp_rep_zone_perm_tbl β€” bestie, all it does is invoke the REPORT ZONE PERMISSION TABLE function. iconic. that's the whole job. πŸ’…


✨ SYNOPSIS ✨

smp_rep_zone_perm_tbl [--append] [--bits=COL] [--help] [--hex]
[--interface=PARAMS] [--multiple] [--nocomma] [--num=MD] [--permf=FN]
[--raw] [--report=RT] [--sa=SAS_ADDR] [--start=SS] [--verbose]
[--version] SMP_DEVICE[,N]

🌸 DESCRIPTION 🌸

okay so. this little utility sends one or more SAS Serial Management Protocol (SMP) REPORT ZONE PERMISSION TABLE function requests to an SMP target. πŸŽ€

which target, you ask? that's the SMP_DEVICE plus the --sa=SAS_ADDR. depending on which interface you're using, the SAS_ADDR might just be deduced from the SMP_DEVICE β€” convenient! ✨ but the mpt interface is a little extra: it uses SMP_DEVICE to identify a HBA (aka an SMP initiator), and it needs that extra ,N on the end to tell HBAs apart when there's more than one hanging around. no cap. 😌

so what do you actually get back? this SMP function returns zone permission descriptors, and each one represents a row of the zone permission table. there's a row for every source zone group, starting at zone group 0 and finishing at zone group 127 or zone group 255. πŸ¦‹

here's the annoying part: the SMP response size is restricted to 1028 bytes (and yes, that includes the trailing CRC πŸ’€). that means not all the zone permission table rows can be returned in one REPORT ZONE PERMISSION TABLE function response. so you might need multiple function calls, and on the later calls you use the --start=SS option to say which source zone group to start at next. it's giving relay race. πŸƒβ€β™€οΈ

and then there's --multiple, which is the queen of convenience πŸ‘‘ β€” it keeps firing off REPORT ZONE PERMISSION TABLE requests until all source zone groups (or all of them starting from --start=SS) have been output. this is genuinely the most convenient way to dump the whole zone permission table, periodt. but heads up: if you don't pass --multiple, only one REPORT ZONE PERMISSION TABLE request gets sent. one and done. πŸ™ˆ

one more thing and it's lowkey the best part: the output of this utility is designed to be usable as input to the smp_conf_zone_perm_tbl utility. so basically these two are a duo β€” save and restore your zone permission table settings. πŸ«ΆπŸ’–


πŸ’– OPTIONS πŸ’–

just so you know: mandatory arguments to long options are mandatory for short options as well. no exceptions, bestie. πŸ’…

  • -a, --append β€” used together with --permf=FN so you append to FN if it already exists. and if FN doesn't exist? it gets created. either way you win. ✨
  • -B, --bits=COL β€” this is an alternate zone permission table representation that shows single bits, with the origin (i.e. ZP[0,0]) sitting up in the top left. the output is a bit array with COL columns and up to COL rows. this format resembles the example zone permission tables in the SAS draft documents (over at t10.org). the default (i.e. without this option) is output that reflects the byte oriented, big endian nature of SCSI (and hence SMP) commands. ⚠️ careful though: the output produced by this option is not suitable as input for the smp_conf_zone_perm_tbl utility. it's pretty, not portable. πŸ’€
  • -f, --start=SS β€” the starting (first and lowest numbered) source zone group. default is zone group 0. 🌱
  • -h, --help β€” outputs the usage message and then dips. bye! πŸ‘‹
  • -H, --hex β€” outputs the response (less the CRC field) in hexadecimal. πŸ”’
  • -I, --interface=PARAMS β€” interface specific parameters. and in this case "interface" means the path through the operating system to the SMP initiator. go read the smp_utils man page for more info, iykyk. 🧚
  • -m, --multiple β€” starting at source zone group 0 (or SS), multiple REPORT ZONE PERMISSION TABLE requests get issued until the last (127th and 255th) source zone descriptor is output. πŸŽ‰ but bestie, this option should not be given together with the --num=MD option. pick a lane. πŸ’…
  • -N, --nocomma β€” outputs each zone group descriptor as one long string of hexadecimal digits, two digits per byte. the default action is to output a comma separated list of hexadecimal ASCII bytes for each zone group descriptor. commas are cancelled. 🚫
  • -n, --num=MD β€” where MD is the maximum number of descriptors that can be reported in the one response. the default value is 63. and 63 is the maximum number of "128 zone groups" sized descriptors that can fit in one response. but if the expander is using "256 zone groups" sized descriptors, then a maximum of 31 descriptors can fit in one response. also, this option should not be given together with the --multiple option. same energy as above. πŸ™…β€β™€οΈ
  • -P, --permf=FN β€” FN is a file to write the zone permission descriptors to. the default action is to output the zone permissions descriptors to stdout. note that the whole permissions table may not fit in one response (we talked about this 😭). if FN already exists then it gets truncated prior to the write β€” unless --append is given. to append to the existing FN, add the --append option. 🌈
  • -r, --raw β€” sends the response (less the CRC field) to stdout in binary. all error messages go to stderr. messy but honest. πŸ’œ
  • -R, --report=RT β€” sets the 'report type' field in the SMP request. RT may take these values: 0 for report current values (default); 1 for report the shadow values; 2 for report saved values; 3 for report default values. pick your timeline. ⏳
  • -s, --sa=SAS_ADDR β€” specifies the SAS address of the SMP target device. the mpt interface needs this option, and it will typically be an expander's SAS address. the SAS_ADDR is in decimal, but most SAS addresses are shown in hexadecimal. to give a number in hexadecimal, either prefix it with '0x' or put a trailing 'h' on it. πŸŽ€
  • -f, --start=SS β€” see the entry above, listed in order by its short option letter (i.e. -f). yes it's here twice, that's just how it's listed, don't come for me. 😭
  • -v, --verbose β€” increases the verbosity of the output. can be used multiple times, so go off. πŸ“’
  • -V, --version β€” prints the version string and then exits. ⭐

πŸ“ NOTES πŸ“

when --permf=FN is given and SS is greater than zero, then a line of the form "--start=SS" gets written to FN just before the first row of zone permissions. cute, right? πŸ₯°

also there are some examples of the --permf=FN format in the examples directory. go look. πŸ‘€


🧚 CONFORMING TO 🧚

the SMP REPORT ZONE PERMISSION TABLE function was introduced in SAS-2. so it's a legacy queen at this point. πŸ‘‘


πŸ’œ AUTHORS πŸ’œ

Written by Douglas Gilbert. we stan. 🫢


😭 REPORTING BUGS 😭

report bugs to <dgilbert at interlog dot com>. please be nice, it's giving constructive. πŸ™


Copyright Β© 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. nada. πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

  • smp_utils
  • smp_conf_zone_perm_tbl
  • smp_zone_lock(smp_utils)

okay bestie, that's the whole page, you ate it. πŸ’…βœ¨ this was smp_utils-0.96, from June 2011 β€” yes it's an elder but it's still iconic, SMP_REP_ZONE_PERM_TBL(8) forever. πŸŽ€πŸ¦‹πŸ’–