From owner-freebsd-arch@FreeBSD.ORG Wed Sep 11 15:06:02 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id AEC5F785; Wed, 11 Sep 2013 15:06:02 +0000 (UTC) (envelope-from outbackdingo@gmail.com) Received: from mail-pd0-x233.google.com (mail-pd0-x233.google.com [IPv6:2607:f8b0:400e:c02::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7432021F1; Wed, 11 Sep 2013 15:06:02 +0000 (UTC) Received: by mail-pd0-f179.google.com with SMTP id v10so9363952pde.10 for ; Wed, 11 Sep 2013 08:06:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=PZ1XxfmIn3i1eBm4Ky4ESb1fgOl2sGht+tPdciHJn7U=; b=rljuMJzCEZfJduXL+gDcEY0MzdL+ybEFIMg/ZCR5zBYMpnpWfi0Rw3RgpvlwE3s9ai BXlbKYlcjLzZ9i1S6DmyVsaqzPuhHGZbgkqBC2BgwlmB19nAyjKUTDoGEzj/aT/H/woG qVb6cl2m67N2vEJENfLhG6IK5nadheudHrDfL8Trgh6gMqOCVwrmb/ekQNlxQTWHs970 E7Y+A6fqgf2oCmLY/Y5Ckxd2rJFB5odrGUfApS8p0E+A62mXbtFuO0qyg2bEACJJBHo/ dBRVSsD5XIKm+Dx3LXf37/+u8GZWR6KRB6a+eoL7qhOZABeL5sAJ/R77B7RrCxqIudgf opOQ== MIME-Version: 1.0 X-Received: by 10.68.98.36 with SMTP id ef4mr2320903pbb.27.1378911961951; Wed, 11 Sep 2013 08:06:01 -0700 (PDT) Received: by 10.66.126.141 with HTTP; Wed, 11 Sep 2013 08:06:01 -0700 (PDT) In-Reply-To: References: <522A1C73.9030402@mu.org> Date: Wed, 11 Sep 2013 11:06:01 -0400 Message-ID: Subject: Re: New iSCSI stack. From: Outback Dingo To: =?ISO-8859-2?Q?Edward_Tomasz_Napiera=B3a?= Content-Type: text/plain; charset=ISO-8859-2 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-scsi@freebsd.org, "freebsd-arch@freebsd.org" , Alfred Perlstein , "freebsd-current@FreeBSD.org" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Sep 2013 15:06:02 -0000 On Sun, Sep 8, 2013 at 9:32 AM, Outback Dingo wrote= : > > > > On Sun, Sep 8, 2013 at 6:29 AM, Edward Tomasz Napiera=B3a > wrote: > >> Wiadomo=B6=E6 napisana przez Alfred Perlstein w dniu 6 w= rz >> 2013, o godz. 20:18: >> > On 9/5/13 3:27 AM, Edward Tomasz Napiera=B3a wrote: >> >> Hello. At http://people.freebsd.org/~trasz/cfiscsi-20130904.diffyou'= ll find >> >> a patch which adds the new iSCSI initiator and target, against >> 10-CURRENT. >> >> To use the new initiator, start with "man iscsictl". For the target = - >> "man >> >> ctld". >> >> >> >> All feedback is welcome. If nothing unexpected comes up, I'll commit >> it >> >> in a few days from now. Note that it's still not optimized; at this >> point >> >> I'm focusing more on reliability and interoperability. >> >> >> >> This work is being sponsored by FreeBSD Foundation. >> >> >> >> _______________________________________________ >> >> freebsd-current@freebsd.org mailing list >> >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> >> To unsubscribe, send any mail to " >> freebsd-current-unsubscribe@freebsd.org" >> >> >> > Edward, this is really exciting! >> > >> > Is there an easy way to use the userland iscsi configuration files? >> >> Which iSCSI userland configuration files, the ctl.conf(5)? If you need >> an ability to parse it and modify from a shell scripts, see confctl >> utility >> (sysutils/confctl, https://github.com/trasz/confctl/). >> >> > We would love to quickly backport and ship this with FreeNAS as an >> option for our users, having the config files be the same OR having a ve= ry >> good converter would really make that much easier for us. >> >> Porting to 9 should be quite easy - there are Capsicum API differences; >> you might also want to compare CTL between 10 and 9 to see if there are >> any changes which need to be merged. Taking a look at the code searchin= g >> for possible security issues would be also very welcome :-) >> >> As for the config files - writing a converter should be quite easy. Whi= ch >> configuration files you need to support, ctl.conf(5) and istgt >> configuration? >> > > I was i belive quite close to having it working on the last patch, howeve= r > could never seem to get the ctl kernel module to function, > And feel im a bit further away with this latest patch retracing my steps, > from previous... quite easy to backport.... maybe for you, or other > but yes, I also would like to integrate the work to stable/9 in the lab > for some benchmarks > >> >> Still trying to tackle this...... any ideas?? I think if i can get past the few errors im encountering i can get a patch against stable/9 for others to test.... clang -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/home/dingo/devel/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/= altq -fno-common -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/obj/usr/home/dingo/devel/sys/GENERIC -mno-aes -mno-avx -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=3Diso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -c /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_cam_sim.c ctfconvert -L VERSION -g ctl_frontend_cam_sim.o clang -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/home/dingo/devel/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/= altq -fno-common -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/obj/usr/home/dingo/devel/sys/GENERIC -mno-aes -mno-avx -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=3Diso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -c /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_internal.c ctfconvert -L VERSION -g ctl_frontend_internal.o clang -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -DHAVE_KERNEL_OPTION_HEADERS -include /usr/obj/usr/home/dingo/devel/sys/GENERIC/opt_global.h -I. -I@ -I@/contrib/= altq -fno-common -g -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/obj/usr/home/dingo/devel/sys/GENERIC -mno-aes -mno-avx -mcmodel=3Dkernel -mno-red-zone -mno-mmx -mno-sse -msoft-float -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -std=3Diso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -c /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:52= 5:19: error: no member named 'lun_map_fn' in 'struct ctl_nexus' io->io_hdr.nexus.lun_map_fn =3D cfiscsi_map_lun; ~~~~~~~~~~~~~~~~ ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:52= 6:19: error: no member named 'lun_map_arg' in 'struct ctl_nexus' io->io_hdr.nexus.lun_map_arg =3D cs; ~~~~~~~~~~~~~~~~ ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:58= 7:19: error: no member named 'lun_map_fn' in 'struct ctl_nexus' io->io_hdr.nexus.lun_map_fn =3D cfiscsi_map_lun; ~~~~~~~~~~~~~~~~ ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:58= 8:19: error: no member named 'lun_map_arg' in 'struct ctl_nexus' io->io_hdr.nexus.lun_map_arg =3D cs; ~~~~~~~~~~~~~~~~ ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:12= 30:6: error: no member named 'ioctl' in 'struct ctl_frontend' fe->ioctl =3D cfiscsi_ioctl; ~~ ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:12= 31:6: error: no member named 'devid' in 'struct ctl_frontend' fe->devid =3D cfiscsi_devid; ~~ ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:19= 55:25: error: use of undeclared identifier 'SCSI_PROTO_ISCSI' desc->proto_codeset =3D (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_ASCII; ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:19= 80:33: error: use of undeclared identifier 'SCSI_PROTO_ISCSI' desc1->proto_codeset =3D (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_UTF8; ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:19= 90:33: error: use of undeclared identifier 'SCSI_PROTO_ISCSI' desc2->proto_codeset =3D (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_BINARY; ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:19= 99:33: error: use of undeclared identifier 'SCSI_PROTO_ISCSI' desc3->proto_codeset =3D (SCSI_PROTO_ISCSI << 4) | SVPD_ID_CODESET_BINARY; ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 82:48: error: no member named 'options' in 'struct ctl_be_lun' &control_softc->ctl_luns[lun_id]->be_lun->options, links) { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ @/sys/queue.h:272:28: note: expanded from macro 'STAILQ_FOREACH' for((var) =3D STAILQ_FIRST((head)); \ ^ @/sys/queue.h:269:30: note: expanded from macro 'STAILQ_FIRST' #define STAILQ_FIRST(head) ((head)->stqh_first) ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 81:2: error: incomplete definition of type 'struct ctl_be_lun_option' STAILQ_FOREACH(opt, ^~~~~~~~~~~~~~~~~~~ @/sys/queue.h:274:13: note: expanded from macro 'STAILQ_FOREACH' (var) =3D STAILQ_NEXT((var), field)) ^~~~~~~~~~~~~~~~~~~~~~~~~ @/sys/queue.h:318:39: note: expanded from macro 'STAILQ_NEXT' #define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) ~~~~~^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 74:9: note: forward declaration of 'struct ctl_be_lun_option' struct ctl_be_lun_option *opt; ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 83:17: error: incomplete definition of type 'struct ctl_be_lun_option' if (strcmp(opt->name, "cfiscsi_target") =3D=3D 0) ~~~^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 74:9: note: forward declaration of 'struct ctl_be_lun_option' struct ctl_be_lun_option *opt; ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 84:16: error: incomplete definition of type 'struct ctl_be_lun_option' target =3D opt->value; ~~~^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 74:9: note: forward declaration of 'struct ctl_be_lun_option' struct ctl_be_lun_option *opt; ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 85:22: error: incomplete definition of type 'struct ctl_be_lun_option' else if (strcmp(opt->name, "cfiscsi_target_alias") =3D=3D 0= ) ~~~^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 74:9: note: forward declaration of 'struct ctl_be_lun_option' struct ctl_be_lun_option *opt; ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 86:22: error: incomplete definition of type 'struct ctl_be_lun_option' target_alias =3D opt->value; ~~~^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 74:9: note: forward declaration of 'struct ctl_be_lun_option' struct ctl_be_lun_option *opt; ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 87:22: error: incomplete definition of type 'struct ctl_be_lun_option' else if (strcmp(opt->name, "cfiscsi_lun") =3D=3D 0) ~~~^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 74:9: note: forward declaration of 'struct ctl_be_lun_option' struct ctl_be_lun_option *opt; ^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 88:13: error: incomplete definition of type 'struct ctl_be_lun_option' lun =3D opt->value; ~~~^ /usr/home/dingo/devel/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:21= 74:9: note: forward declaration of 'struct ctl_be_lun_option' struct ctl_be_lun_option *opt; ^ 18 errors generated. *** [ctl_frontend_iscsi.o] Error code 1 Stop in /usr/home/dingo/devel/sys/modules/ctl. *** [all] Error code 1 Stop in /usr/home/dingo/devel/sys/modules. *** [modules-all] Error code 1 Stop in /usr/obj/usr/home/dingo/devel/sys/GENERIC. *** [buildkernel] Error code 1 Stop in /usr/home/dingo/devel. *** [buildkernel] Error code 1 Stop in /usr/home/dingo/devel. _______________________________________________ >> freebsd-current@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-current >> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.or= g >> " >> > >