SMP_CONF_ZONE_PERM_TBL(8)

✨ SMP_CONF_ZONE_PERM_TBL πŸ’… (section 8 of the smp_utils manual, bestie)

okay so real talk, this is the man page for smp_conf_zone_perm_tbl, one of the little tools that live in smp_utils. it's giving "i configure zone permission tables and i'm not sorry about it" energy. let's go πŸ¦‹


πŸŽ€ NAME πŸŽ€

smp_conf_zone_perm_tbl β€” the thing you run to invoke the CONFIGURE ZONE PERMISSION TABLE function. that's it, that's the name, periodt.


🌈 SYNOPSIS 🌈

smp_conf_zone_perm_tbl [--deduce] [--expected=EX] [--help] [--hex]
[--interface=PARAMS] [--numzg=NG] --permf=FN [--raw] [--sa=SAS_ADDR]
[--save=SAV] [--start=SS] [--verbose] [--version] SMP_DEVICE[,N]

πŸ’– DESCRIPTION πŸ’–

so basically this sends one or more SAS Serial Management Protocol (SMP) CONFIGURE ZONE PERMISSION TABLE function requests over to an SMP target. the SMP target is identified by the SMP_DEVICE plus the --sa=SAS_ADDR. depending on which interface you're on, the SAS_ADDR might just get deduced from the SMP_DEVICE β€” no biggie. the mpt interface is the diva that uses SMP_DEVICE to identify an HBA (that's an SMP initiator, iykyk) and it needs the extra ,N to tell the difference between HBAs when there's more than one hanging around. πŸ’€

the zone permission table has a row for every source zone group and a column for every destination zone group. each element in the table, ZP[s,d], is literally one single bit that says whether the source zone group can access the destination zone group β€” bit set = 1 (yes bestie), bit clear = 0 (absolutely not). 🚫

there are two different table sizes: 128 and 256 zone groups. descriptors handed to this function request are either 16 bytes (128 bits) or 32 bytes (256 bits) long. each descriptor is basically one row in the zone permission table. cute, right?

but wait β€” apart from being a row in the zone permission table, each descriptor also gets transposed and applied to the corresponding destination column. in the words of the draft (not me, the draft said this): it "maintains symmetry about the ZP[s,s] table axis". also, descriptors get applied in the order they show up in the request, i.e. ascending source zone group numbers. no queue-jumping. ⭐

the maximum number of descriptors one single CONFIGURE ZONE PERMISSION TABLE function request can hold is limited to 63 if there are 128 zone groups, and limited to 31 if there are 256 zone groups. a full zone table will contain 128 (or 256) descriptors, so configuring a whole full table takes multiple CONFIGURE ZONE PERMISSION TABLE requests. it's a whole journey, not a single text. 😭

the number of zone permission configuration descriptors is determined by reading the FN file that comes with the --permf=FN option. if there are more descriptors than can fit into one CONFIGURE ZONE PERMISSION TABLE function request, then multiple requests get sent. all descriptors found in the FN file will be sent unless an earlier function response indicates there's been an error β€” then we stop, because we're not embarrassing ourselves. 🫢


πŸ’… OPTIONS πŸ’…

mandatory arguments to long options are mandatory for short options as well. yes, both. it's a package deal.

  • -d, --deduce β€” deduces the number of zone groups from the number of bytes on the active FN lines. with 128 zone groups each active line will contain 16 bytes (or less). with this option, if any active line in FN contains more than 16 bytes then 256 zone groups are assumed, otherwise 128 zone groups are assumed. this option cannot be given together with the --numzg=NG option, because they might contradict one another and we do not do drama here. πŸ™ˆ
  • -E, --expected=EX β€” sets the 'expected expander change count' field in the SMP request. EX runs from 0 to 65535 inclusive, and 0 is the default. when EX is greater than zero, then if the value doesn't match the expander change count of the SMP target (aka the expander) at the moment the request arrives, the target just ignores the request and sets a function result of "invalid expander change count" in the response. cold. 🧊
  • -f, --start=SS β€” starting (first) source zone group, default being zone group 0. if multiple function requests get sent, this field in subsequent function requests will be adjusted to reflect those descriptors already sent. heads up though: the SS value may be picked up from FN, and if this option and that value are not the same, an error is generated. pick a lane bestie. 😀
  • -h, --help β€” outputs the usage message then exits. the classic.
  • -H, --hex β€” outputs the response (minus the CRC field) in hexadecimal. hex girl summer. ✨
  • -I, --interface=PARAMS β€” interface specific parameters. "interface" here means the path through the operating system to the SMP initiator. go peek at the smp_utils man page for more info. πŸ“–
  • -n, --numzg=ZG β€” number of zone groups. ZG can be 0 (the default) or 1. 0 implies 128 zone groups while 1 implies 256 zone groups. this option cannot be used with the --deduce option. choose one, not both, it's not that hard. πŸŽ€
  • -P, --permf=FN β€” FN is a file containing zone permission configuration descriptors in ASCII hexadecimal; either as bytes separated by space, tab, comma or newline, or as longer strings of hexadecimal bytes where every 2 digits represents a byte. empty lines and lines starting with "#" are ignored. a line with "--start=<num>" will be taken as the starting source zone group number (i.e. <num> becomes SS) unless it contradicts the command line --start=SS option. otherwise, lines starting with "-" are ignored. πŸ“
  • -r, --raw β€” sends the response (minus the CRC field) to stdout in binary. all error messages go to stderr instead. keep the chaos contained. πŸ’€
  • -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. 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 slap a trailing 'h' on it. both are iconic. πŸ‘‘
  • -S, --save=SAV β€” sets the 'save' field in the SMP request. SAV may take these values: 0 for updating the shadow values (default), 1 for updating the saved values, 2 for updating shadow values and if available the saved values, 3 for updating both saved and shadow values. pick your fighter. ⭐
  • -f, --start=SS β€” see the entry above, listed here in order by its short option letter (i.e. -f). yes it appears twice. no i will not be explaining that. πŸ™ˆ
  • -v, --verbose β€” increases the verbosity of the output. can be used multiple times. spam it, go off. πŸ”₯
  • -V, --version β€” prints the version string and then exits.

🌸 NOTES 🌸

for simplicity, each active line in the FN file should contain 16 or 32 bytes. 16 bytes if there are 128 zone groups, or 32 bytes if there are 256 zone groups.

SCSI is big endian. so for 128 zone groups, the first byte placed in the zone permission configuration descriptor is ZP[0,127-120]. if the --start=SS option is given then the first byte is ZP[SS,127-120]. for 256 zone groups, the first bytes are ZP[0,255-248] and ZP[SS,255-248] respectively. write that down. πŸ–ŠοΈ

there's an annex called "Zone permission configuration descriptor examples" in recent SAS-2 and later drafts (Annex H in spl2r03.pdf). go read it, it's giving homework but make it useful.

there are some examples of the --permf=FN format in the examples directory. also, heads up: not all SAS-2 expanders properly implement descriptor transpose and only place the descriptor in the row corresponding to the source zone group. so like, your mileage may vary. 😭


🧚 CONFORMING TO 🧚

the SMP CONFIGURE ZONE PERMISSION TABLE function was introduced in SAS-2.


πŸ’œ AUTHORS πŸ’œ

written by Douglas Gilbert. legend behaviour, no cap.


🫢 REPORTING BUGS 🫢

report bugs to <dgilbert at interlog dot com>. tell him everything. πŸ’Œ


copyright Β© 2011 Douglas Gilbert

this software is distributed under a FreeBSD license. there is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. like, none. zero. don't come for us. πŸ’€


🌈 SEE ALSO 🌈

  • smp_utils
  • smp_conf_zone_phy_info
  • smp_zone_activate(smp_utils)

and that's the whole page bestie!! πŸŽ€ this was smp_utils-0.97, dated September 2011 β€” she's an older icon but she still ate, fr fr. go configure some zone permission tables, you've got this. πŸ’–βœ¨πŸ¦‹