From owner-freebsd-scsi@freebsd.org Fri Aug 12 07:38:24 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 527A5BB6B21 for ; Fri, 12 Aug 2016 07:38:24 +0000 (UTC) (envelope-from hanss@mellanox.com) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0085.outbound.protection.outlook.com [104.47.0.85]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7A66617B4 for ; Fri, 12 Aug 2016 07:38:22 +0000 (UTC) (envelope-from hanss@mellanox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=0/75CsST6Leu02pFlutTXFzEhjz6dXA9mb0FYTXoKvg=; b=AK63lKa7WK0yi23it+niu+evP1hnT+w5R0vns7LaELLPbLKmOc9b2Nc8z19tsRCrj46gUL1oeKBCpSj372Yb6AlWjRW32KAXzE41FYqROByTfbGidgHj+7zgSLfh7TpsVf3WonAB7/78C7H6m4SczC323xU5wPrnEBaLuOcOHvo= Received: from AM5PR0501MB2580.eurprd05.prod.outlook.com (10.169.152.7) by AM5PR0501MB2580.eurprd05.prod.outlook.com (10.169.152.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15; Fri, 12 Aug 2016 07:38:13 +0000 Received: from AM5PR0501MB2580.eurprd05.prod.outlook.com ([10.169.152.7]) by AM5PR0501MB2580.eurprd05.prod.outlook.com ([10.169.152.7]) with mapi id 15.01.0549.026; Fri, 12 Aug 2016 07:38:03 +0000 From: Hans Petter Selasky To: Max Gurtovoy , Ben RUBSON , "freebsd-scsi@freebsd.org" CC: Oren Duer , Oded Shanoon , "Meny Yossefi" , Roy Shterman Subject: RE: Help to make iSER working Thread-Topic: Help to make iSER working Thread-Index: AQHR89afeAUqYlaWPEGlnNhjMqc1iKBD49OAgAAKYwCAAA2XAIAAPn+AgAAjyQCAAJKkgA== Date: Fri, 12 Aug 2016 07:38:03 +0000 Message-ID: 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> <8207D6A0-3647-48B4-A4E0-3F1FCF3A6723@gmail.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=hanss@mellanox.com; x-originating-ip: [62.141.129.119] x-ms-office365-filtering-correlation-id: 2d0fc593-437b-463a-6d02-08d3c2839801 x-microsoft-exchange-diagnostics: 1; AM5PR0501MB2580; 6:Kc6Zsm3GjOG3EJImgncm/DrYLZHxQ0DMm4OeOknNep+s4jT3l+AUczDk41TYxwu9/P7tjZMqmazW2aGv/YoY0E0TntIuO29DB3TYgz4jD60eZgcC8iucOsXLdzW2t+qsNNy9pvVKLAyNMku7cqLWZpvLcX7YV8PG+819YSBjEYIwt2Pav67pC/nqZ/YRv5dOMIqa80E9A6Gqdui7Sz9tZiu1baevGmBYcofoSZJ6yUB9snyBmwcs1D520H7G2Ttnsb+5sfqBIzX9pxQBm0e6/R81sQqco+FeG+yTyvphr6wQF0tnQqFTddXGWu+GXtJJYezvYvU0O8CBuDCgU3du9A==; 5:QhjQ4aa503kMz7z9zmFPFR5QZ0xJ8bmPjTpZuR0jfAdJRbnru8R+PqcLFxAupSt7VZgdXPjMvj7OPvqcm9vSCPxPIx1qiQEJ5jibQTbAD1NXgcIl53Xf72x1y8c2Si1MIlWBAxTXK2roiv/4ICOmZA==; 24:pV1sm/cMDbnHOVXLJgE+xxjSyJbnp2e+MpqJ33sTKjPRfOTqEYYJHpQB0IICxGa7M0hO5+tYn9HOUBemxJ5zNQ35Blpvt/qdEo+Hqw23644=; 7:DnfbkjVQDC16RzexFGFl3nJMwmoQFeTgghW+5atxAsBtUWlv0czEnOfAsNJxuHenetJT/uVYU6bBdzTq+/5ejEmmZrwq8oxGd/OmXnIZShCJeSHLfh2h2qbfR8BSAsdlo6A0qOOSvAPMXRJjnjzWW6D2A4M/DKdVfFbXEnWwKRPO1YA/9KT+2hctdR9OWI1EdIfzFnjQkPAs6llknDgeIoA/lB8rtqunyUxMwi3YJjKdPXOIq5EvkfgCnZFPK4JF x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0501MB2580; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(258220229709018)(227817650892897)(75325880899374)(275809806118684)(21532816269658); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:AM5PR0501MB2580; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0501MB2580; x-forefront-prvs: 003245E729 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(24454002)(13464003)(189002)(377454003)(199003)(54094003)(45984002)(66654002)(2950100001)(68736007)(2501003)(92566002)(76176999)(50986999)(54356999)(2906002)(2900100001)(81156014)(86362001)(8676002)(106116001)(106356001)(81166006)(7846002)(74316002)(101416001)(9686002)(8936002)(5001770100001)(10400500002)(97736004)(4001430100002)(76576001)(189998001)(87936001)(7696003)(305945005)(107886002)(7736002)(586003)(4326007)(19580405001)(122556002)(77096005)(6116002)(3900700001)(102836003)(33656002)(5002640100001)(3660700001)(3846002)(93886004)(19580395003)(105586002)(3280700002)(15975445007)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR0501MB2580; H:AM5PR0501MB2580.eurprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Aug 2016 07:38:03.3894 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0501MB2580 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: Fri, 12 Aug 2016 07:38:24 -0000 Hi, Error 19 means ENODEV. Possibly something is not supported. Meny: I wonder if it is better if Ben install our infiniband patches to bri= ng the IB code up to v3.2? --HPS -----Original Message----- From: Max Gurtovoy=20 Sent: Friday, August 12, 2016 1:51 AM To: Ben RUBSON ; freebsd-scsi@freebsd.org Cc: Oren Duer ; Oded Shanoon ; Meny = Yossefi ; Hans Petter Selasky ; Roy= Shterman Subject: Re: Help to make iSER working Hi, On 8/11/2016 11:43 PM, Ben RUBSON wrote: > 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 yes, you got the same event in iser (event 1). There is a configuration issue with your setup. Once you overcome this, iSER should work for you. Meny/Hans, can you assist here ? Thanks, Max. > test complete > return status -19 > > Sounds like the issue is with FreeBSD itself. > > Ben > > > >> On 11 Aug 2016, at 18:59, Ben RUBSON wrote: >> >> >>> On 11 Aug 2016, at 18:10, Max Gurtovoy wrote: >>> >>> On 8/11/2016 6:33 PM, Ben RUBSON wrote: >>>> Thank you very much Max for your help. >>>> >>>> >>>> >>>> I managed to compile the kernel with iSER support doing the 3 modifica= tions below. >>>> >>>> I added the following to /usr/src/sys/conf/options : >>>> ICL_KERNEL_PROXY opt_global.h >>>> >>>> And I added "options ICL_KERNEL_PROXY" to my kernel configuration file= . >>>> >>>> I then faced this compilation error : >>>> /usr/src/sys/modules/ctl/../../cam/ctl/ctl_frontend_iscsi.c:1358:2: er= ror: 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: no= te: did you mean 'icl_soft_handoff_sock'? >>>> /usr/src/sys/dev/iscsi/icl.h:158:7: note: 'icl_soft_handoff_sock' decl= ared here >>>> int icl_soft_handoff_sock(struct icl_conn *ic, struct socket=20 >>>> *so); >>>> >>>> So I replaced icl_conn_handoff_sock by icl_soft_handoff_sock (sounds l= ike it is the needed correction). >>>> >>>> iscsictl -r now does not produce previous "invalid argument" error. >>>> >>>> @trasz : perhaps these modifications should be done in FreeBSD 11 sour= ce tree ? >> >> I'm also rebuilding world with the following to see if it can help : >> # cat /etc/src.conf >> WITH_ICL_KERNEL_PROXY=3D"YES" >> WITH_OFED=3D"YES" >> >>>> Now I'm facing the following issue : >>>> >>>> # 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=20 >>>> connect to 192.168.2.2 using ICL kernel proxy: ISCSIDCONNECT:=20 >>>> Input/output error >>>> kernel: ERROR: iser_connect_error: conn 0xfffff8096786f000 >>>> iscsid[1078]: child process 8743 terminated with exit status 1 >>> >>> please increase the debug level in both initiator and target and sent i= t out. >> >> Logs from the initiator : >> iscsid[39668]: 192.168.2.2 (iqn.2012-06.com.test:target1): failed to=20 >> connect to 192.168.2.2 using ICL kernel proxy: ISCSIDCONNECT:=20 >> Input/output error >> kernel: INFO: iser_free_ib_conn_res: freeing conn 0xfffff8048d276000=20 >> cma_id 0 qp 0 >> kernel: DEBUG: iser_conn_connect: before cv_wait: 0xfffff8048d276000 >> kernel: INFO: iser_cma_handler: event 1 status -19 conn=20 >> 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 >> >> 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,=20 >> but conn cid:0 from iqn.1994-09.org.freebsd:srv1 is TCP So target is cor= rectly iSER configured. >> I tried without iSER on both sides, of course it works. >> >>> From first look I think you need to configure the LIO target to work wi= th demo mode. >> >> I double-checked, LIO was in demo mode, I followed this guideline : >> https://community.mellanox.com/docs/DOC-1468 >> >> 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 #=20 >> sysctl hw.mlxen1.stat.rx_packets hw.mlxen1.stat.tx_packets >> hw.mlxen1.stat.rx_packets: 386 >> hw.mlxen1.stat.tx_packets: 409 >> >>> Another thing you can try is the user space tgt target (compile with ma= ke ISCSI_RDMA=3D1) that I work with mostly. >>> >>>> >>>> If I remove the "-r" option from the iscsictl command, it correctly co= nnects to the target. >>>> >>>> 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] >>>> >>>> I wanted to make some RDMA connection tests with udaddy for example, b= ut I did not found the FreeBSD version. >>>> >>>> Any advice ? >>>> >>>> Many thanks ! >>>> >>>> Ben >>>> >>>> >>>> >>>>> On 11 Aug 2016, at 15:44, Max Gurtovoy wrote: >>>>> >>>>> These are the instructions I get from iscsi maintainer that merged ou= r code to FreeBSD-11: >>>>> 1. set WITH_OFED=3Dyes in /etc/make.conf 2. "make buildkernel=20 >>>>> buildworld installkernel installworld" >>>>> 3. reboot >>>>> 4. kldload iser >>>>> >>>>> 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). >>>>> >>>>> Only if the above are working you can proceed to check iser. >>>>> >>>>> Max. >>>>> >>>>> 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=20 >>>>>> to connect to 192.168.2.2 using ICL kernel proxy: ISCSIDCONNECT:=20 >>>>>> Invalid argument >>>>>> >>>>>>> as if my initiator did not understand the iSER command "ISCSIDCONNE= CT". >>>>>>> How to be sure everything is correctly compiled with ICL_KERNEL_PRO= XY enabled ? >>>>>> >>>>>> Ben >>>>>> >>>>>> >>>>>>> On 10 Aug 2016, at 22:51, Max Gurtovoy wrote: >>>>>>> >>>>>>> Hi Ben, >>>>>>> >>>>>>> iSER initiator is supported in FreeBSD-11 but not the iser target. >>>>>>> for the target you should use Linux target such as TGT (user=20 >>>>>>> space), Lio or SCST. >>>>>>> >>>>>>> thanks, >>>>>>> Max. >>>>>>> >>>>>>> >>>>>>> On 8/10/2016 8:13 PM, Ben RUBSON wrote: >>>>>>>> Hello, >>>>>>>> >>>>>>>> I have some difficulties to make iSER (FreeBSD 11 BETA3) working. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> ### My configuration : >>>>>>>> >>>>>>>> 2 servers with Mellanox ConnectX-3 NICs. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> ### What I did : >>>>>>>> >>>>>>>> I rebuilt kernel adding the following to GENERIC : >>>>>>>> options OFED >>>>>>>> device mlxen >>>>>>>> options COMPAT_LINUXKPI >>>>>>>> >>>>>>>> I built iser : >>>>>>>> cd /usr/src/sys/modules/iser/ ; make ; make install ; kldload=20 >>>>>>>> iser (I saw later-on that I could have used "device iser" in=20 >>>>>>>> kernel configuration) >>>>>>>> >>>>>>>> My /etc/ctl.conf : >>>>>>>> portal-group pg0 { >>>>>>>> discovery-auth-group no-authentication listen 192.168.2.2=20 >>>>>>>> offload iser } target iqn.2012-06.com.test:target1 { auth-group=20 >>>>>>>> no-authentication portal-group pg0 alias my-iser-disk lun 0 {=20 >>>>>>>> path /dev/da8 } } >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> ### Error : >>>>>>>> >>>>>>>> As soon as I do the following : >>>>>>>> iscsictl -A -r -t iqn.2012-06.com.test:target1 -p 192.168.2.2 I=20 >>>>>>>> get this error : >>>>>>>> iscsid[1187]: 192.168.2.2 (iqn.2012-06.com.test:target1):=20 >>>>>>>> failed to connect to 192.168.2.2 using ICL kernel proxy:=20 >>>>>>>> ISCSIDCONNECT: Invalid argument >>>>>>>> iscsid[655]: child process 1187 terminated with exit status 1 >>>>>>>> >>>>>>>> "sysctl hw.mlxen1.stat.tx_packets" on initiator shows that no pack= et is sent at all when trying to connect. >>>>>>>> >>>>>>>> Did I miss something ? >>>>>>>> >>>>>>>> Many thanks ! >>>>>>>> >>>>>>>> Ben > > _______________________________________________ > freebsd-scsi@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-scsi > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" >