2549fc5001
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
31 lines
637 B
Makefile
31 lines
637 B
Makefile
# $FreeBSD$
|
|
|
|
.include <src.opts.mk>
|
|
|
|
CFLAGS+=-I${SRCTOP}/contrib/libucl/include
|
|
.PATH: ${SRCTOP}/contrib/libucl/include
|
|
|
|
PROG= ctld
|
|
SRCS= chap.c ctld.c discovery.c isns.c kernel.c keys.c log.c
|
|
SRCS+= login.c parse.y pdu.c token.l y.tab.h uclparse.c
|
|
CFLAGS+= -I${.CURDIR}
|
|
CFLAGS+= -I${SRCTOP}/sys
|
|
CFLAGS+= -I${SRCTOP}/sys/cam/ctl
|
|
CFLAGS+= -I${SRCTOP}/sys/dev/iscsi
|
|
#CFLAGS+= -DICL_KERNEL_PROXY
|
|
MAN= ctld.8 ctl.conf.5
|
|
|
|
LIBADD= bsdxml l md sbuf util ucl m nv
|
|
|
|
YFLAGS+= -v
|
|
CLEANFILES= y.tab.c y.tab.h y.output
|
|
|
|
WARNS?= 6
|
|
NO_WMISSING_VARIABLE_DECLARATIONS=
|
|
|
|
.if ${MK_ISCSI} != "no"
|
|
CFLAGS+= -DWANT_ISCSI
|
|
.endif
|
|
|
|
.include <bsd.prog.mk>
|