freebsd-dev/sys
Marcelo Araujo 8951f05525 Rework CTL frontend & backend options to use nv(3), allow creating multiple
ioctl frontend ports.

This revision introduces two changes to CTL:
- Changes the way options are passed to CTL_LUN_REQ and CTL_PORT_REQ ioctls.
  Removes ctl_be_arg structure and associated logic and replaces it with
  nv(3)-based logic for passing in and out arguments.
- Allows creating multiple ioctl frontend ports using either ctladm(8) or
  ctld(8).
  New frontend ports are represented by /dev/cam/ctl<pp>.<vp> nodes, eg /dev/cam/ctl5.3.
  Those device nodes respond only to CTL_IO ioctl.

New command-line options for ctladm:
# creates new ioctl frontend port with using free pp and vp=0
ctladm port -c
# creates new ioctl frontend port with pp=10 and vp=0
ctladm port -c -O pp=10
# creates new ioctl frontend port with pp=11 and vp=12
ctladm port -c -O pp=11 -O vp=12
# removes port with number 4 (it's a "targ_port" number, not pp number)
ctladm port -r -p 4

New syntax for ctl.conf:
target ... {
    port ioctl/<pp>
    ...
}

target ... {
    port ioctl/<pp>/<vp>
    ...

Note: Most of this work was made by jceel@, thank you.

Submitted by:	jceel
Reworked by:	myself
Reviewed by:	mav (earlier versions and recently during the rework)
Obtained from:  FreeNAS and TrueOS
Relnotes:	Yes
Sponsored by:	iXsystems Inc.
Differential Revision:	https://reviews.freebsd.org/D9299
2018-05-10 03:50:20 +00:00
..
amd64 amd64: depessimize bcmp for small buffers 2018-05-09 15:16:25 +00:00
arm Standardize SPDX tag on files I've added 2018-05-09 16:52:28 +00:00
arm64 arm64: rockchip: cru: Call clk_set_assigned 2018-05-07 07:31:25 +00:00
bsm
cam Rework CTL frontend & backend options to use nv(3), allow creating multiple 2018-05-10 03:50:20 +00:00
cddl Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
compat Remove "All rights reserved" from my files. 2018-05-09 20:57:18 +00:00
conf Simplify things a little 2018-05-10 02:31:48 +00:00
contrib Fix style error introduced in r333393. 2018-05-09 19:05:27 +00:00
crypto opencrypto: Integrate Chacha20 algorithm into OCF 2018-03-29 04:02:50 +00:00
ddb Restore db_radix on parse error, otherwise we'll silently change it to 2018-04-17 15:44:05 +00:00
dev cxgbe(4): Determine whether the firmware supports the FILTER2 work 2018-05-10 00:04:14 +00:00
dts arm: overlays: Update to new path-based sugar format 2018-05-04 14:38:48 +00:00
fs Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
gdb amd64: Protect the kernel text, data, and BSS by setting the RW/NX bits 2018-03-06 14:28:37 +00:00
geom Introduce the 'n' flag for the geli attach command. 2018-05-09 20:53:38 +00:00
gnu gnu/dts: Update our copy of arm dts from Linux 4.16 2018-04-20 19:37:08 +00:00
i386 Remove unused bcopyb. 2018-05-10 02:31:54 +00:00
isa Revert r330780, it was improperly tested and results in taking a spin 2018-03-11 20:13:15 +00:00
kern Add taskqgroup_config_gtask_deinit to support teardown after 2018-05-09 18:51:35 +00:00
kgssapi kgssapi: Remove trivial deadcode 2018-02-14 00:12:03 +00:00
libkern Simplify things a little 2018-05-10 02:31:48 +00:00
mips Print the dump progress indicator after calling dump_start(). 2018-05-01 17:32:43 +00:00
modules Bring in some last changes in NAT64 implementation: 2018-05-09 11:59:24 +00:00
net Add IFCAP_LINKSTATE support to if_loop(4). 2018-05-09 10:50:51 +00:00
net80211 Use an accessor function to access ifr_data. 2018-03-30 18:50:13 +00:00
netgraph Correct pseudo misspelling in sys/ comments 2018-02-23 18:15:50 +00:00
netinet Use the full year, for real this time. 2018-05-09 20:26:37 +00:00
netinet6 Fix for missing network interface address event when adding the default IPv6 2018-05-08 11:39:01 +00:00
netipsec Merge r1.22-1.23 from NetBSD: 2018-04-26 12:23:31 +00:00
netpfil Bring in some last changes in NAT64 implementation: 2018-05-09 11:59:24 +00:00
netsmb Eliminate the overhead of gratuitous repeated reinitialization of cap_rights 2018-05-09 18:47:24 +00:00
nfs Remove support for FDDI networks. 2018-04-11 17:28:24 +00:00
nfsclient
nfsserver
nlm Use syscall_helper_register() to register syscalls and initialize though 2018-02-10 01:09:22 +00:00
ofed Improve copy-and-pasted versions of SIOCGIFADDR. 2018-03-27 20:51:49 +00:00
opencrypto cryptosoft: Do not exceed crd_len around *crypt_multi 2018-04-19 15:24:21 +00:00
powerpc Move MI-ish bcopy routine to libkern 2018-05-10 02:31:38 +00:00
riscv Remove the unused fuwintr() and suiwintr() functions. 2018-04-17 18:04:28 +00:00
rpc
security Use an accessor function to access ifr_data. 2018-03-30 18:50:13 +00:00
sparc64 Report TRAP_BRKPT for breakpoint traps on sparc64. 2018-05-09 15:25:26 +00:00
sys Rework CTL frontend & backend options to use nv(3), allow creating multiple 2018-05-10 03:50:20 +00:00
teken Pedantic polishing of code to please FlexeLint. 2018-04-08 19:23:50 +00:00
tests
tools Add dtb overlays support 2018-03-24 21:30:24 +00:00
ufs Renumber soft-update types starting at 1 instead of 0 to avoid confusion 2018-04-05 00:32:01 +00:00
vm Fix some races introduced in r332974. 2018-05-04 17:17:30 +00:00
x86 Put the CPU starting on one line. 2018-05-07 21:09:21 +00:00
xdr
xen xen: fix gntdev 2018-05-02 10:19:17 +00:00
Makefile