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 activeFNlines. with 128 zone groups each active line will contain 16 bytes (or less). with this option, if any active line inFNcontains 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=NGoption, 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.EXruns from0to65535inclusive, and0is the default. whenEXis 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 group0. if multiple function requests get sent, this field in subsequent function requests will be adjusted to reflect those descriptors already sent. heads up though: theSSvalue may be picked up fromFN, 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 thesmp_utilsman page for more info. π-n,--numzg=ZGβ number of zone groups.ZGcan be0(the default) or1.0implies 128 zone groups while1implies 256 zone groups. this option cannot be used with the--deduceoption. choose one, not both, it's not that hard. π-P,--permf=FNβFNis 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>becomesSS) unless it contradicts the command line--start=SSoption. otherwise, lines starting with"-"are ignored. π-r,--rawβ sends the response (minus the CRC field) tostdoutin binary. all error messages go tostderrinstead. keep the chaos contained. π-s,--sa=SAS_ADDRβ specifies the SAS address of the SMP target device. themptinterface needs this option, and it will typically be an expander's SAS address.SAS_ADDRis 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.SAVmay take these values:0for updating the shadow values (default),1for updating the saved values,2for updating shadow values and if available the saved values,3for 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 π
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_utilssmp_conf_zone_phy_infosmp_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. πβ¨π¦
π¦ where this page comes from
- debian bookworm: smp-utils 0.99-1 Β· BSD-3-Clause
- debian trixie: smp-utils 0.99-1 Β· BSD-3-Clause
- epel 10: smp_utils 0.99-1.el10_0 Β· BSD-3-Clause
- epel 9: smp_utils 0.99-5.el9 Β· BSD
- fedora 43: smp_utils 0.99-14.fc43 Β· BSD-3-Clause
- fedora 44: smp_utils 0.99-15.fc44 Β· BSD-3-Clause
- opensuse-leap 16.0: smp_utils 0.99-bp160.1.6 Β· BSD-3-Clause AND GPL-2.0-only
- opensuse-leap 16.0: smp_utils 0.99-bp160.1.6 Β· BSD-3-Clause AND GPL-2.0-only
- opensuse-leap 16.0: smp_utils 0.99-bp160.1.6 Β· BSD-3-Clause AND GPL-2.0-only
- opensuse-leap 16.0: smp_utils 0.99-bp160.1.6 Β· BSD-3-Clause AND GPL-2.0-only
- ubuntu jammy: smp-utils 0.99-1 Β· BSD-3-Clause
- ubuntu noble: smp-utils 0.99-1 Β· BSD-3-Clause
- ubuntu resolute: smp-utils 0.99-1build1 Β· BSD-3-Clause
- ubuntu stonking: smp-utils 0.99-1build1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms