From owner-svn-src-head@freebsd.org Fri May 6 13:45:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78D60B3145B; Fri, 6 May 2016 13:45:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 525FB1B2E; Fri, 6 May 2016 13:45:43 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u46Djgue073236; Fri, 6 May 2016 13:45:42 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u46Djg4I073234; Fri, 6 May 2016 13:45:42 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201605061345.u46Djg4I073234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Fri, 6 May 2016 13:45:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r299175 - head/usr.bin/iscsictl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2016 13:45:43 -0000 Author: trasz Date: Fri May 6 13:45:42 2016 New Revision: 299175 URL: https://svnweb.freebsd.org/changeset/base/299175 Log: Add the "-r" flag to iscsictl(8). MFC after: 1 month Sponsored by: The FreeBSD Foundation Modified: head/usr.bin/iscsictl/iscsictl.8 head/usr.bin/iscsictl/iscsictl.c Modified: head/usr.bin/iscsictl/iscsictl.8 ============================================================================== --- head/usr.bin/iscsictl/iscsictl.8 Fri May 6 13:44:56 2016 (r299174) +++ head/usr.bin/iscsictl/iscsictl.8 Fri May 6 13:45:42 2016 (r299175) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 1, 2015 +.Dd May 6, 2016 .Dt ISCSICTL 8 .Os .Sh NAME @@ -39,9 +39,12 @@ .Fl p Ar portal Fl t Ar target .Op Fl u Ar user Fl s Ar secret .Op Fl w Ar timeout +.Op Fl r .Nm .Fl A -.Fl d Ar discovery-host Op Fl u Ar user Fl s Ar secret +.Fl d Ar discovery-host +.Op Fl u Ar user Fl s Ar secret +.Op Fl r .Nm .Fl A .Fl a Op Fl c Ar path @@ -115,6 +118,8 @@ Session ID, as displayed by The "nickname" of session defined in the configuration file. .It Fl p Target portal - host name or address - for statically defined targets. +.It Fl r +Use iSER (iSCSI over RDMA) instead of plain iSCSI over TCP/IP. .It Fl s CHAP secret. .It Fl t Modified: head/usr.bin/iscsictl/iscsictl.c ============================================================================== --- head/usr.bin/iscsictl/iscsictl.c Fri May 6 13:44:56 2016 (r299174) +++ head/usr.bin/iscsictl/iscsictl.c Fri May 6 13:45:42 2016 (r299175) @@ -683,7 +683,8 @@ checked_strdup(const char *s) int main(int argc, char **argv) { - int Aflag = 0, Mflag = 0, Rflag = 0, Lflag = 0, aflag = 0, vflag = 0; + int Aflag = 0, Mflag = 0, Rflag = 0, Lflag = 0, aflag = 0, + rflag = 0, vflag = 0; const char *conf_path = DEFAULT_CONFIG_PATH; char *nickname = NULL, *discovery_host = NULL, *portal = NULL, *target = NULL, *user = NULL, *secret = NULL; @@ -698,7 +699,7 @@ main(int argc, char **argv) argc = xo_parse_args(argc, argv); xo_open_container("iscsictl"); - while ((ch = getopt(argc, argv, "AMRLac:d:i:n:p:t:u:s:vw:")) != -1) { + while ((ch = getopt(argc, argv, "AMRLac:d:i:n:p:rt:u:s:vw:")) != -1) { switch (ch) { case 'A': Aflag = 1; @@ -737,6 +738,9 @@ main(int argc, char **argv) case 'p': portal = optarg; break; + case 'r': + rflag = 1; + break; case 't': target = optarg; break; @@ -789,6 +793,8 @@ main(int argc, char **argv) xo_errx(1, "-a and -n and mutually exclusive"); if (discovery_host != NULL) xo_errx(1, "-a and -d and mutually exclusive"); + if (rflag != 0) + xo_errx(1, "-a and -r and mutually exclusive"); } else if (nickname != NULL) { if (portal != NULL) xo_errx(1, "-n and -p and mutually exclusive"); @@ -800,6 +806,8 @@ main(int argc, char **argv) xo_errx(1, "-n and -s and mutually exclusive"); if (discovery_host != NULL) xo_errx(1, "-n and -d and mutually exclusive"); + if (rflag != 0) + xo_errx(1, "-n and -r and mutually exclusive"); } else if (discovery_host != NULL) { if (portal != NULL) xo_errx(1, "-d and -p and mutually exclusive"); @@ -844,6 +852,8 @@ main(int argc, char **argv) xo_errx(1, "-n and -s and mutually exclusive"); } + if (rflag != 0) + xo_errx(1, "-r cannot be used with -M"); if (vflag != 0) xo_errx(1, "-v cannot be used with -M"); if (timeout != -1) @@ -875,6 +885,8 @@ main(int argc, char **argv) if (session_id != -1) xo_errx(1, "-i cannot be used with -R"); + if (rflag != 0) + xo_errx(1, "-r cannot be used with -R"); if (vflag != 0) xo_errx(1, "-v cannot be used with -R"); if (timeout != -1) @@ -895,6 +907,8 @@ main(int argc, char **argv) xo_errx(1, "-L and -n and mutually exclusive"); if (discovery_host != NULL) xo_errx(1, "-L and -d and mutually exclusive"); + if (rflag != 0) + xo_errx(1, "-L and -r and mutually exclusive"); if (session_id != -1) xo_errx(1, "-i cannot be used with -L"); @@ -953,6 +967,8 @@ main(int argc, char **argv) targ->t_session_type = SESSION_TYPE_NORMAL; targ->t_address = portal; } + if (rflag != 0) + targ->t_protocol = PROTOCOL_ISER; targ->t_user = user; targ->t_secret = secret;