From owner-freebsd-scsi@freebsd.org Thu Aug 11 20:43:21 2016 Return-Path: Delivered-To: freebsd-scsi@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 D2DD6BB6CBD for ; Thu, 11 Aug 2016 20:43:21 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6542C1B17 for ; Thu, 11 Aug 2016 20:43:21 +0000 (UTC) (envelope-from ben.rubson@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id i5so15468477wmg.0 for ; Thu, 11 Aug 2016 13:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3JrPnpun1e89a3z5LpAXBrX6WWSaEbMHShO+VolcqbI=; b=l85dnTXeAB/RPkpA6B7yjPBPQkCToB97mGp/vcU4eAp3JyCStSQ9mey5L06pCrihs4 zl+bvV5MH+XqPzYZHhQKJvN6HlJLVYGpabSCbbsDuD+StwLU+620GM5XXGhCsA+bhfsL 0JmZP4d1Vx8lWV08C5bA/ACoD5gY4cN1N8QqY5jiks7uB2zUfdaxkpryTEAExMTZTMj0 iV03cm3M6zg0st7ZuJvhvyfC6QPnrn4h1dhTZS7BeTuWts+TkChmpTIw9aBoBwAtWnVJ xi/6Rdw3A9CD6HEvOFNVWmeRmpAqxnVc5nfQA+IM2ZNbGBJlotzNVduDZoJlwT3sb4oS Ambg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=3JrPnpun1e89a3z5LpAXBrX6WWSaEbMHShO+VolcqbI=; b=BOwhLlXw/MReoKU7Euko0v5QTh8XIoh1CBnF8vGb5zcSLBxxgV93MlrugbyWk0+YSk f9/LwBGfYO5fT1ZE4VuR0WktJK6NVaM00v757BiG8nxeHGB4/1Tu/yqOP7PF9NvAMcfR OAl9OfMdZkHwP4F+LjYW2UMacWpVcRR2gbpo3JNKieyuPTH70oXfFtO7t+bXqsTBhND1 XSJeXpfQobwqUB+l7yhRkyUgzpAHq5oE9buseBMten7eoYU2nxiMQVVIVL5QbUDda7Da Q+Uta030Oz5F7Ii2g3NazAPDZi09IgAPQNh16HO3BUJGM+p8YXSx3zhym5uZa+KyZwIt 8hqg== X-Gm-Message-State: AEkoous7VNaJNOPi0M+lF7c54UzkoVcHeUuZULbvMPgU62r9RCXWrn3aIJ24f5as0S+T1g== X-Received: by 10.28.29.211 with SMTP id d202mr10726004wmd.64.1470948199512; Thu, 11 Aug 2016 13:43:19 -0700 (PDT) Received: from macbook-air-de-benjamin-1.home (LFbn-1-7077-85.w90-116.abo.wanadoo.fr. [90.116.246.85]) by smtp.gmail.com with ESMTPSA id v203sm1471518wmv.2.2016.08.11.13.43.18 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 11 Aug 2016 13:43:18 -0700 (PDT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Subject: Re: Help to make iSER working From: Ben RUBSON In-Reply-To: <621BCC32-4612-410F-B658-D1086A7A3A09@gmail.com> Date: Thu, 11 Aug 2016 22:43:17 +0200 Cc: Hans Petter Selasky , Oren Duer , Oded Shanoon , Meny Yossefi , Roy Shterman Content-Transfer-Encoding: quoted-printable Message-Id: <8207D6A0-3647-48B4-A4E0-3F1FCF3A6723@gmail.com> References: <71E4886B-61C3-4091-A7FF-E5A4F59AEACE@gmail.com> <64d8bc44-b6a3-4c0a-6d13-f919bf26685a@mellanox.com> <41CCC244-A781-4087-A811-B33847EDEC01@gmail.com> <6a464f2c-c048-d29c-e602-c129b35a5d4a@mellanox.com> <621BCC32-4612-410F-B658-D1086A7A3A09@gmail.com> To: freebsd-scsi@freebsd.org X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Aug 2016 20:43:21 -0000 Here are the tests with udaddy from FreeBSD, trying to connect to Linux = : # udaddy -s 192.168.2.2 libibverbs: Warning: couldn't open config directory '/etc/ibverbs/'. libibverbs: Warning: couldn't open config directory '/etc/ibverbs/'. udaddy: starting client udaddy: connecting libibverbs: Warning: couldn't open config directory '/etc/ibverbs/'. udaddy: event: RDMA_CM_EVENT_ADDR_ERROR, error: -19 test complete return status -19 Sounds like the issue is with FreeBSD itself. Ben > On 11 Aug 2016, at 18:59, Ben RUBSON wrote: >=20 >=20 >> On 11 Aug 2016, at 18:10, Max Gurtovoy wrote: >>=20 >> On 8/11/2016 6:33 PM, Ben RUBSON wrote: >>> Thank you very much Max for your help. >>>=20 >>>=20 >>>=20 >>> I managed to compile the kernel with iSER support doing the 3 = modifications below. >>>=20 >>> I added the following to /usr/src/sys/conf/options : >>> ICL_KERNEL_PROXY opt_global.h >>>=20 >>> And I added "options ICL_KERNEL_PROXY" to my kernel configuration = file. >>>=20 >>> I then faced this compilation error : >>> /usr/src/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:1358:2: = error: implicit declaration of function 'icl_conn_handoff_sock' >>> icl_conn_handoff_sock(cs->cs_conn, so); >>> /usr/src/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:1358:2: = note: did you mean 'icl_soft_handoff_sock'? >>> /usr/src/sys/dev/iscsi/icl.h:158:7: note: 'icl_soft_handoff_sock' = declared here >>> int icl_soft_handoff_sock(struct icl_conn *ic, struct socket *so); >>>=20 >>> So I replaced icl_conn_handoff_sock by icl_soft_handoff_sock (sounds = like it is the needed correction). >>>=20 >>> iscsictl -r now does not produce previous "invalid argument" error. >>>=20 >>> @trasz : perhaps these modifications should be done in FreeBSD 11 = source tree ? >=20 > I'm also rebuilding world with the following to see if it can help : > # cat /etc/src.conf=20 > WITH_ICL_KERNEL_PROXY=3D"YES" > WITH_OFED=3D"YES" >=20 >>> Now I'm facing the following issue : >>>=20 >>> # iscsictl -A -r -t iqn.2012-06.com.test:target1 -p 192.168.2.2 >>> iscsid[8743]: 192.168.2.2 (iqn.2012-06.com.test:target1): failed to = connect to 192.168.2.2 using ICL kernel proxy: ISCSIDCONNECT: = Input/output error >>> kernel: ERROR: iser_connect_error: conn 0xfffff8096786f000 >>> iscsid[1078]: child process 8743 terminated with exit status 1 >>=20 >> please increase the debug level in both initiator and target and sent = it out. >=20 > Logs from the initiator : > iscsid[39668]: 192.168.2.2 (iqn.2012-06.com.test:target1): failed to = connect to 192.168.2.2 using ICL kernel proxy: ISCSIDCONNECT: = Input/output error > kernel: INFO: iser_free_ib_conn_res: freeing conn 0xfffff8048d276000 = cma_id 0 qp 0 > kernel: DEBUG: iser_conn_connect: before cv_wait: 0xfffff8048d276000 > kernel: INFO: iser_cma_handler: event 1 status -19 conn = 0xfffff8048d276000 id 0xfffff80880606800 > kernel: ERROR: iser_connect_error: conn 0xfffff8048d276000 > kernel: DEBUG: iser_conn_connect: after cv_wait: 0xfffff8048d276000 > iscsid[1078]: child process 39668 terminated with exit status 1 >=20 > Logs from the target (here I tried TGT) : > No logs, as if TGT did not receive anything. > If I try to connect without the "-r", here is what I get : > tgtd: login_start(502) Target iqn.2012-06.com.test:target1 is RDMA, = but conn cid:0 from iqn.1994-09.org.freebsd:srv1 is TCP > So target is correctly iSER configured. > I tried without iSER on both sides, of course it works. >=20 >> =46rom first look I think you need to configure the LIO target to = work with demo mode. >=20 > I double-checked, LIO was in demo mode, I followed this guideline : > https://community.mellanox.com/docs/DOC-1468 >=20 > One strange thing, on initiator, sounds like no packet goes through = the interface when trying to connect : > # sysctl hw.mlxen1.stat.rx_packets hw.mlxen1.stat.tx_packets > hw.mlxen1.stat.rx_packets: 386 > hw.mlxen1.stat.tx_packets: 409 > # iscsictl -A -r -t iqn.2012-06.com.test:target1 -p 192.168.2.2 > # sysctl hw.mlxen1.stat.rx_packets hw.mlxen1.stat.tx_packets > hw.mlxen1.stat.rx_packets: 386 > hw.mlxen1.stat.tx_packets: 409 >=20 >> Another thing you can try is the user space tgt target (compile with = make ISCSI_RDMA=3D1) that I work with mostly. >>=20 >>>=20 >>> If I remove the "-r" option from the iscsictl command, it correctly = connects to the target. >>>=20 >>> On target side, Lio, targetcli : >>> /> ls iscsi/ >>> o- iscsi ............................................. [1 Target] >>> o- iqn.2012-06.com.test:target1 ....................... [1 TPG] >>> o- tpg1 ........................................... [enabled] >>> o- acls .......................................... [0 ACLs] >>> o- luns ........................................... [1 LUN] >>> | o- lun0 ..................... [iblock/block1 (/dev/sdc7)] >>> o- portals ..................................... [1 Portal] >>> o- 192.168.2.2:3260 .................. [OK, iser enabled] >>>=20 >>> I wanted to make some RDMA connection tests with udaddy for example, = but I did not found the FreeBSD version. >>>=20 >>> Any advice ? >>>=20 >>> Many thanks ! >>>=20 >>> Ben >>>=20 >>>=20 >>>=20 >>>> On 11 Aug 2016, at 15:44, Max Gurtovoy wrote: >>>>=20 >>>> These are the instructions I get from iscsi maintainer that merged = our code to FreeBSD-11: >>>> 1. set WITH_OFED=3Dyes in /etc/make.conf >>>> 2. "make buildkernel buildworld installkernel installworld" >>>> 3. reboot >>>> 4. kldload iser >>>>=20 >>>> After that, make sure you configured all the interfaces correctly = and that you have ping between the 2 servers. >>>> later you need to check basic RDMA stuff on your servers (Added = Hans/Oded/Meny to help you if needed). >>>>=20 >>>> Only if the above are working you can proceed to check iser. >>>>=20 >>>> Max. >>>>=20 >>>> On 8/11/2016 4:22 PM, Ben RUBSON wrote: >>>>> I just tested to connect to a Linux iSER enabled target, but I = still get this error message at initiator side : >>>>> iscsid[1187]: 192.168.2.2 (iqn.2012-06.com.test:target1): failed = to connect to 192.168.2.2 using ICL kernel proxy: ISCSIDCONNECT: Invalid = argument >>>>>=20 >>>>>> as if my initiator did not understand the iSER command = "ISCSIDCONNECT". >>>>>> How to be sure everything is correctly compiled with = ICL_KERNEL_PROXY enabled ? >>>>>=20 >>>>> Ben >>>>>=20 >>>>>=20 >>>>>> On 10 Aug 2016, at 22:51, Max Gurtovoy wrote: >>>>>>=20 >>>>>> Hi Ben, >>>>>>=20 >>>>>> iSER initiator is supported in FreeBSD-11 but not the iser = target. >>>>>> for the target you should use Linux target such as TGT (user = space), >>>>>> Lio or SCST. >>>>>>=20 >>>>>> thanks, >>>>>> Max. >>>>>>=20 >>>>>>=20 >>>>>> On 8/10/2016 8:13 PM, Ben RUBSON wrote: >>>>>>> Hello, >>>>>>>=20 >>>>>>> I have some difficulties to make iSER (FreeBSD 11 BETA3) = working. >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>> ### My configuration : >>>>>>>=20 >>>>>>> 2 servers with Mellanox ConnectX-3 NICs. >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>> ### What I did : >>>>>>>=20 >>>>>>> I rebuilt kernel adding the following to GENERIC : >>>>>>> options OFED >>>>>>> device mlxen >>>>>>> options COMPAT_LINUXKPI >>>>>>>=20 >>>>>>> I built iser : >>>>>>> cd /usr/src/sys/modules/iser/ ; make ; make install ; kldload = iser >>>>>>> (I saw later-on that I could have used "device iser" in kernel = configuration) >>>>>>>=20 >>>>>>> My /etc/ctl.conf : >>>>>>> portal-group pg0 { >>>>>>> discovery-auth-group no-authentication >>>>>>> listen 192.168.2.2 >>>>>>> offload iser >>>>>>> } >>>>>>> target iqn.2012-06.com.test:target1 { >>>>>>> auth-group no-authentication >>>>>>> portal-group pg0 >>>>>>> alias my-iser-disk >>>>>>> lun 0 { >>>>>>> path /dev/da8 >>>>>>> } >>>>>>> } >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>> ### Error : >>>>>>>=20 >>>>>>> As soon as I do the following : >>>>>>> iscsictl -A -r -t iqn.2012-06.com.test:target1 -p 192.168.2.2 >>>>>>> I get this error : >>>>>>> iscsid[1187]: 192.168.2.2 (iqn.2012-06.com.test:target1): failed = to connect to 192.168.2.2 using ICL kernel proxy: ISCSIDCONNECT: Invalid = argument >>>>>>> iscsid[655]: child process 1187 terminated with exit status 1 >>>>>>>=20 >>>>>>> "sysctl hw.mlxen1.stat.tx_packets" on initiator shows that no = packet is sent at all when trying to connect. >>>>>>>=20 >>>>>>> Did I miss something ? >>>>>>>=20 >>>>>>> Many thanks ! >>>>>>>=20 >>>>>>> Ben