From patchwork Mon May 15 22:47:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9728165 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 13B1660386 for ; Mon, 15 May 2017 22:48:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F168328464 for ; Mon, 15 May 2017 22:47:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E628E288B0; Mon, 15 May 2017 22:47:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0D8628464 for ; Mon, 15 May 2017 22:47:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752322AbdEOWr4 (ORCPT ); Mon, 15 May 2017 18:47:56 -0400 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:8431 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752336AbdEOWrt (ORCPT ); Mon, 15 May 2017 18:47:49 -0400 X-IronPort-AV: E=Sophos;i="5.38,346,1491235200"; d="scan'208";a="114745212" Received: from mail-cys01nam02lp0055.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) ([207.46.163.55]) by ob1.hgst.iphmx.com with ESMTP; 16 May 2017 06:51:45 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=h2WNHxkIN9gFUJuAgo7PCIf1f2fAWTdaAW6TqW0N3Vc=; b=j3YG1tU40w3ezrHvLptJuRdnePi9TBzNV80EBBAH/pT6HFYxaohBSY+T+AxYhs78QkFcjL+M/kCac6rJqYYmZnb56Ybmc/8wdd3Uf1MKG7djFlwQXsL1WHArQsVrc3JFmH+btHzX+rbeXrK25m9I21Ns7ITQgEsrBHlOu9Q8P1M= Received: from CY4PR04CA0031.namprd04.prod.outlook.com (10.172.133.17) by BY2PR04MB711.namprd04.prod.outlook.com (10.141.221.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16; Mon, 15 May 2017 22:47:43 +0000 Received: from CO1NAM04FT042.eop-NAM04.prod.protection.outlook.com (2a01:111:f400:7e4d::206) by CY4PR04CA0031.outlook.office365.com (2603:10b6:903:c6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16 via Frontend Transport; Mon, 15 May 2017 22:47:43 +0000 Authentication-Results: spf=pass (sender IP is 63.163.107.225) smtp.mailfrom=sandisk.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=bestguesspass action=none header.from=sandisk.com; Received-SPF: Pass (protection.outlook.com: domain of sandisk.com designates 63.163.107.225 as permitted sender) receiver=protection.outlook.com; client-ip=63.163.107.225; helo=milsmgep14.sandisk.com; Received: from milsmgep14.sandisk.com (63.163.107.225) by CO1NAM04FT042.mail.protection.outlook.com (10.152.91.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.1075.5 via Frontend Transport; Mon, 15 May 2017 22:47:43 +0000 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 4B.32.19026.E003A195; Mon, 15 May 2017 15:47:42 -0700 (PDT) Received: from milsmgip11.sandisk.com (10.177.9.6) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Mon, 15 May 2017 15:47:37 -0700 X-AuditID: 0ac94371-41ba798000004a52-0c-591a300e292d Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.8.100]) by (Symantec Messaging Gateway) with SMTP id 15.E3.11415.8003A195; Mon, 15 May 2017 15:47:37 -0700 (PDT) From: Bart Van Assche To: Doug Ledford CC: , Jason Gunthorpe , Leon Romanovsky , Bart Van Assche Subject: [PATCH rdma-core 3/5] srp_daemon: Add command-line option -j Date: Mon, 15 May 2017 15:47:31 -0700 Message-ID: <20170515224733.29586-10-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20170515224733.29586-1-bart.vanassche@sandisk.com> References: <20170515224733.29586-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrKLMWRmVeSWpSXmKPExsXCddJ5kS6fgVSkwcdd8hYvz39gtfh+w9Ti ZN8/Zotnh3pZHFg8nk0/zOTxfUcvo8f7fVfZPD5vkgtgieKySUnNySxLLdK3S+DKmDV3MXvB ZNmKx707WBoY34l3MXJySAiYSGxvWcPexcjFISSwlEmi89AyKGcbo8Tr2f2sXYwcYFXvGuUg 4psZJb4em8IE0s0mYCTx7f1MFhBbREBNYtOrRWDNzAJrGCV+bPnFDpIQFnCVmPuonxHEZhFQ lXgyrwOsgVfAQeL15m9sEGfIS5zdspMZxOYEiv+9+ZQJZLGQgL3Ez9NqIDMlBJpYJSYsmsEO 0SsocXLmE7A5zAISEgdfvADrFRJQlzi5ZD7TBEahWUjKZiEpW8DItIpRLDczpzg3PbXA0ESv ODEvJbM4Wy85P3cTIySwC3cwvr7tfYhRgINRiYd3xQrJSCHWxLLiytxDjBIczEoivBzcUpFC vCmJlVWpRfnxRaU5qcWHGKU5WJTEebNkp0YICaQnlqRmp6YWpBbBZJk4OKUaGE+vbJL6PmfH KY/AiY8aPhetqQ08dG0xx//3NdpP26/35U7puBD/bMGl+DVRJ6e/vdH7tKu3QubKjq+JOlt0 wh2aLc4/5fE/4dG5ufqsw/lZhpmbe0uWN4R5hlxqkzn8jOXLt7l71HInTtv2wFB9roC6wtvO ngeKTw04Ntx3eKqywqhQ4Pnsv9uUWIozEg21mIuKEwHWUuiJaAIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrEJMWRmVeSWpSXmKPExsXCtZEjRZfTQCrS4IiRxcGfbYwWL89/YLX4 fsPU4mTfP2aLZ4d6WRxYPZ5NP8zk8X1HL6PH+31X2TymrTnP5PF5k1wAaxSXTUpqTmZZapG+ XQJXxqy5i9kLJstWPO7dwdLA+E68i5GDQ0LAROJdo1wXIxeHkMBGRomP/z6xdzFycrAJGEl8 ez+TBcQWEVCT2PRqEVicWWANo8TGvWBxYQFXibmP+hlBbBYBVYkn8zrA4rwCDhLvjtwFsyUE 5CXObtnJDGJzAsX/3nzKBLJXSMBe4udptQmM3AsYGVYxiuVm5hTnpmcWGBrqFSfmpWQWZ+sl 5+duYgSHAmfkDsanE80PMTJxcEo1MIY3Pfc8u8BE1LCyhfnglc+6od2rPzlUcXyv/VQpeHPv a5sZqzm5vxiEztBbxPthabWpYtZ3kxlm7f7qqXe9w/JerBJ6MqOlLOQoQ5u8dmjHylQl7s81 zqHqC94WTbeQdViWoel35fSNFxUndFKDuOW222o5fDpzYbvNSXOjr4JRncaHrW1OKbEUZyQa ajEXFScCALxXP/+1AQAA MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:63.163.107.225; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10019020)(979002)(6009001)(39450400003)(39850400002)(39840400002)(39410400002)(39860400002)(39400400002)(2980300002)(438002)(189002)(199003)(9170700003)(50226002)(5003940100001)(1076002)(2950100002)(6916009)(48376002)(77096006)(356003)(8936002)(6666003)(8676002)(36756003)(81166006)(5660300001)(2906002)(575784001)(86362001)(47776003)(478600001)(305945005)(4326008)(50466002)(72206003)(106466001)(53936002)(33646002)(110136004)(107886003)(38730400002)(76176999)(50986999)(54906002)(189998001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR04MB711; H:milsmgep14.sandisk.com; FPR:; SPF:Pass; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM04FT042; 1:c4+oNu/KQwBo2UTEml/+3s0vU5DQ4JsHlau6Y/T7nUbBUv6GeT4dHXRb8aK3wYdPbJgLDjmmemhAQEuGoHzrFKUHsWxkwj2LbD/78N1za2B9A8UenNVSRyu4Gz2/hjeqrJFYef62u/31dbcL019dD7Kc85FgZg2tqa39fBTVNsfQHy8ykJ8mPYvPTcfwJoJrXmoqXoPrZiwd8bNW7x4K70y15R/4QjlerDwIkKG2JTqsMWNfzQC9zi5TaL9eWW64OYOqTyRUTDLPPxrSotcvPdqtg9y6IdDMY0L6orRed/yorZn6ZiSxwr66Ft/xBn8tjVqCUYviKwSMT+URSQPqxCIvgHb7LiBWDHmjm1EuUzYoPlnuET0Lv0oWxVT6tO8rj23MGot7mzIUdcMC/VoXth7t+2GNsHKzfbF4I52YpV67sp/yc8PAbbmn/E80cWxG8k4/9X4blwDPr+FV4fPA3kHeIxoCk7UGj4BuNgiRkDi+xQi0pbj6HVRvQkDcUETplZR9mmmwk3sm3D7Bqse0kAbJuljWO+j4vYjSittm9559AXDd09H9PzwYK65w0Xp9 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 67a852f4-556a-4c45-c25f-08d49be46644 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(8251501002)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BY2PR04MB711; X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB711; 3:8OkNN1s23T9OEP508hvHgE2y5/HAx/zpeU1fYwfv9ullPScvN2LKRapsrOxq6B2vg3suiCso4TKcEiDmzvR0t6Tr17xWWzbIUFwpuOrwyuLtbsvk51K533qibbABofUBdLKbItKNulzV1ayVHFsfL4WtpqfpKlyfAk5HmhNfBAhbOeNw9Kwa0j+20DjWLhi8CIsAdvjbEG6HLuQ9uCQliAq1FKua4Feom31Q/oiT2KX15ApMj7exgfj+lfQTIEIO9+P+qGoXXmsKiXkt4LY6dJMmqz5OQsAywMcQdt+l1znQYcKRRe6pFKpkDs9wcyJA2jW3EUO19wMCb/RTVd/3ET21Fk+oZIdT8+av//U+4ujf3rkbmsTlm2FHIpqPLvlpY6e7g654b17vVkPFgitkVPr0mEV2VzRz2o0yIcGTgOJFIMTe+17kuC6jTaXEOfUHDI/z5MuGhFW5sQPl7fOv22c7N5lFTxSCJdJgctP40uN3qakJj2R/7u1WFsiM3XThrPbma9N3Qfrrlq0YBu1RoQ== X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB711; 25:cLyLnOHP0/AbFBLCln4fuJO889jguvZgTqe2Fv3Z1j8JNXWMMhyeYGSqu7F9/1MgOr1RNBayaXAirQgr/q7EG5tV4Ya2zYaErOq2dPF4iBLnancPLTt/ajgLBe0mJ4/nN1wqW2B8Vd6e+O44R/KMj3ZguknqhwOkwKyuyxmhru/0zFtkyVbFPVFvuTcRJVYnHAIgYOdKbnWuFehNbafua8dtRg94hz1jrEtGOlwjf9PJEspuHX8pCHW7VJTr3vr8ZP7AKrQAVsFteIkuetij2Ao3HXD8Bd6XlgqX3WD02Mqzxs3aQNv1iMVF+HjmsVDFahx9H2CQDE3E0S88X5lRP3C+Ugyp1NxiTshr6rFUogO3IrpXgYKRCt8Pcbqlx4vzqqMmXUIN420v64bIEMXZMkGK2a8/vWKE0nggUr7WjOigwNAEBhFxP/HlUfO4GOExdouiyqkRfEBR3CEhVgPM/7mIdoVFn9brPFq3QAGGU7o=; 31:RN1OahY5/blRkd5kEbJiqpw/GDZrT1+izI0UX2F9GAXotLPUlRSVrbUya+8VRJ8eTUwBM9DDqjxkQGj3DDxbHJVILbG0eRpTERSVAPcv4P0xb9rYj+O1MA1dgBimeIPmY1nt4eu3zV+nrPvArAEZJ89dfYU6xQM0Q6vQVYjd5krnssKMRoDDYjN82YKOsRPT+24iJNwKEy/0tGDOABuJbEmadLOahkwM62TXL1tUKkp4znkIRZwLzw6E7/tPEzpkvlrQEunuWEgjz4FaXcN7BQ== WDCIPOUTBOUND: EOP-TRUE X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB711; 20:WbzieRYKBoJFwPC/S2t38MDa72ZuD8CLi1ReB9MSvO/zkCwsAuu9aAqQKBcVVBsRzLt7gI+W4wcV9kdOumluGXVfSH8fgYsJbC1XrbTPeDF6W4sTYiNL+Gs0dCDjexCn196KBVzgB7tpwwm7u8R84xfeSLH6IbHXyX3/u/oOSaogP2hwk+eFy+zIZpGM3GUBHz7ADbrS8Fr/kFVCElltm5g44l64F9R3TmTPA+PtC0SP5Rhw28vEPKsQmX/xZC6NZ4vpausx77NIDfZz4YXcejwyjQRHvVu2hU48pG0hN5YtC3I6YoCjy1diHhOcXxNhh11rKgwzLdhyhtFhdl0HE6sBX26BjcOQHlXA49qOQ/hSSGt4ysMCfHWbFsWv5pIcVTxrD9H98eH2/k1i+mU8XT+qA/voZHRJhIEd+GrebTuw77oBvBvNKu6cqcBUgtYhw7RD15yW1mvaEouzNoGl/sm1PiB2gv/cUr1YAo0FZUZE9b95PlqVepi505bsCRjC X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(21532816269658)(42932892334569); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(13016025)(13018025)(8121501046)(10201501046)(3002001)(93006095)(93004095)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148); SRVR:BY2PR04MB711; BCL:0; PCL:0; RULEID:; SRVR:BY2PR04MB711; X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB711; 4:gFVEJKzP6IN2Cm5dOeNzVEFGuSoT9fdvpJT+0r85lkBtbbSgR5MUdKQEv59USrGM2bxH+c7Y4biCuWHk9xde1B2dfdzxFU3tb1PhT2/E72OrS9pRd0QqXmumWluBgiy4grtaySo6ULNcCKKnUrfYLDaAwdJ4yEXzsoTs28YkNMwtJDrjT0I7WCPyKKYQF93ug5Cm+FdE2HxW6A4/AyPT6uTYEwrjO8ntVwY0gNs5MylGafCtwSauMOMBksmWgtGOA3lufpTpHSy0oGz0PGe4nmwDnsXRPgf3Qjsnp+vc8Sm3gqde+FVIudBEh0SdiZcTLBL459MoKCAEJ0oxtThXzAcYFE5RrSMFX5e1xrnlcoggmqVvFcbdpKFFvuCkPs1BhAB5ZTGkSYW2+8ACDiiBXIJ6oYteVps19B4buqYu2ljAOQXtP4ZGBDGEVtgGigeT6D376hw4S2MqYWspiUsJKlYHUjb6vB+IFUNlrX2TtGoMyWCz2sjBsdcQhJQICSXXfcHFlzrUOHjn2oD/k+CgW20lPlQJ3xEmlHhKKTxwKTlZ6/b8AmL0xuIV/osGLPY6w2LMKbCuNJBN5q8jexUgokjZU0uWWQU68xPGJrkXLgWr9nuJnZqMbSgETOBj0RZ055LIRN6224AOkb7vq1OgeHwZX7+XpIMmGrnd6evBB6G5k/PZzT7kGT30SLJ1gWG5Y9C0g0U050WP4DWhb5oLV145g/XKpSTP9o5tS2IekmJLOF7Yuko1pR/t3RDhIkCM+NEu7Rx6wQC1DDb1JNeeh+dV3526H2pKPVnkyuhixZVzY2FGHz3+Xj3IH3Jy+BTFjFQsTQzfFf21jG+7JE0yo8YYqG72DzC7mx1WqgxqgZsIFNBWFljx6H6eixF8W/TsridA3qu/Vn+SYPuCxu7SBP+StAyU407LWKmoLR5vGzA = X-Forefront-PRVS: 0308EE423E X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR04MB711; 23:qDmSuPduG1NEvYFHku8uOkDnKuFCvLqpjZEOO6YHQc?= =?us-ascii?Q?ZGwuWFoVXxfIOLfeDtvsDCHkP1SwNEWmZE0nYBudByaV9VqQ6MDmbD5ExtZt?= =?us-ascii?Q?b20On260996RACboSflC50DEbdEWOaS1/PuGdUIiD1+cGHkhyjhLJSXYNZbM?= =?us-ascii?Q?BOUynQtLgO/luumV0HME7+59JlFQF+6SUacigT9xQDDSfzaLrsNA2WZFG2kP?= =?us-ascii?Q?YvZg9L/KJvRiIE00lqfwuV9RKVRdlqpbcjatMVcGnGYjPzPTCDOqiSptJQDb?= =?us-ascii?Q?u1h0PNsahyBJwwd95cUlvNmWxk80QOz7UmUidUrELu+s1qpqD/QoM2zPUnxL?= =?us-ascii?Q?4lAHbtQJ9s0gZwNEGTbGxG47/6NqXAGwqpXDAonvEQh1vv1oQfBQ2fgzsVFm?= =?us-ascii?Q?/reYL2vw+1QGayD1hqjPLhG0//UmLIAnJU3Mku6rFuKsMCtf7NIDPUtXWmKv?= =?us-ascii?Q?+4b5tKheAcNfEnfKrIaxX6Bv1CSzBWCFTbmp3U0BepwYS24QTkEm7sERBktF?= =?us-ascii?Q?tMbVMqwfrwWKnHhHceoxQVb/ZB9fefRkXFdOm/3UFvRcnXkenaJQvGHpmj0M?= =?us-ascii?Q?QhZxCOW9cjts4b1mOEy+DRr+/AdvM75qd9ZFqLL12UK6U1tcfh+wUhcRjRhg?= =?us-ascii?Q?/SQ4vhNkS9tx8SuCwR5ZTu3NWj6AfpP8mO2zM5LxPM1Qpe4QSz8YsJKWyvzS?= =?us-ascii?Q?yO9KfKvci68kA9vVtVe17mFTO1C2PpHVNb0UTTF+Lss/iZIVed6z+0k/Xyo9?= =?us-ascii?Q?puuObgqA16eJzql8z/sBNZPWcONnD0i/AT2cCItONnjsSRTZluqXv4OQU+lr?= =?us-ascii?Q?qy9n7l9PsKQ51bGqlnNP3gjXDj3zcwLIDov0mzoJMdSJ+wCyMI8UdUR04lrn?= =?us-ascii?Q?IVUb4QIqOPmouLa3vKoYnM8/GroyKX3U1Ll+GZPr5ApulpBaplQk8gQlSQGd?= =?us-ascii?Q?rxK7/0v/krEw3NztzDEpT8lOVi7eNL3Qm9a5hpqpyyICOIaRydoOCQzxRAZI?= =?us-ascii?Q?bj3Sy8sA+IlFQWxWsxSzey6p3wmoZlQvYZvIBRWFPN1daVuf0lGIi27E0kDI?= =?us-ascii?Q?7biGMc6zbxq78buHA2UwGODLpTCll/xjeMp6PHDIvJ5dbYwryPDs0Le+BplD?= =?us-ascii?Q?xwZ8JLkA50ax2BZhRd81kMQgs8XA+OiSDp1o1nzxnE2IXEf1q0WtOa8pAE0Q?= =?us-ascii?Q?YbF4CX+UTbbhZ+1uGatBl1DAxHXbvnM4BY9FBta74gyqbiqOGZx3YqOg=3D?= =?us-ascii?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB711; 6:M4iqP6BgFJv0F0yDXq4aAl9KUQt37uFPXQE/fILqCrWnX2EGuvTw3796BAld6859cngQ65v79b7U2xIGvB1bwfIBzy7UlYBPNn11i/o2Y+jodINtVRKcCsA+1XPLgV2mJFnhU24oBRrASrG4RK7q9La9T6XjZ94CS/gP30rdygPxFVkPkXcVEfcs6U371XF/8B8WTg1j+3HoIN6G4Yus8aSu56BmVHa2/BhnG3vJblsef64lIixUoqEdyRvSCGVSC4MPEdyupHx2hce6TdpZ0PZ3pidozVWhjAUFTL23ihBUu3Ekm1AYtp1XjB9NfWJOCOKXXfbRI3prX7Pqnyu5zyWt0vbILaK/zcgU7fyx86TMS7vfroqW9wxyDptTzWgqRBOO7M0Zd4GzxS+hC6yF4byzNfn6OnHZu9w3mY0tIaYf9qOCbYEkNcXtu/Ln573CNhHf0RqCXXNvzE500NJzMbKXkP42b191D5b4h8UrFh4cxKHWK/YhfWD1l+ehCZm0rmmHV7/PkHYv3y9S5Y3S7a4mO/1f6Xy7ZqK80LqrxAk=; 5:IgJFEI8Gq++Izua60dkCzwZbOP+Fo+xPIhsul2xORMDW5S8WLT98VLDSVdfwVMmad1qcWDQyMAEhPZiePuue+RuT+tmAWsHs0njBcO0XYQkobuT/n2uWc99aKj/GDYqIEUBT0Y5qrgK07VhtygOZcQ==; 24:asqCLzlzfPFgxhkNTjg4RKHpA5JsAwZc8RpuOL+6AqED80CDiIeUc8OsJk/ILo8cALj181wFqlXwsRg238LcGToanYYBzaaeUMd6z+wJpvM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR04MB711; 7:tFwKR1RagghbBrRBR9wbPsRpAQp11IDVKjn8vR7R6Nx2MbVFfX3aGQvmWpxSmZkr96JCjv7QGFTzRFi08wS/iz3ktxyXFFTvmxYHtSS2PJwTj+zpPH2myDUYEYySsUoB6tsD3mU0DDidt7GvVk2nGtglNlYEPItt5EO3284AiO/narH2Msg2Qx8/L4pEEJpOA++Adi1S7EQGGXpe6Wt9zInp+i1zn3EkmPScE9QM58PN2C/XiyYLzQdf4NvGtDC+q7u8PChhili26gnmOe3rz+BcpWKTgrg1EL/6BH9ENkOKIzQ0hKeW6MQxjtJfxCLz9Izoxl+3HUYUx/zGO0z9ww==; 20:/GdkUwThHxTdSQgWUPKpy9AfH0fuRgUYVVxqqKPQRidLW4qD7nuuBJRePZViXxjzMannqmx30Mj+THF5+8Jc+xW5gk9xSsZM+yC19wrMJ4tvfjkWM4mgFDblEKzUmbkgGdLqo+/EJPiCt7UIZoJ1ZU8tOURw78B2M2L8alPHtCM= X-OriginatorOrg: sandisk.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2017 22:47:43.3900 (UTC) X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=b61c8803-16f3-4c35-9b17-6f65f441df86; Ip=[63.163.107.225]; Helo=[milsmgep14.sandisk.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR04MB711 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This command-line option is used in a later patch to avoid having to start a shell script from a udev rule. Signed-off-by: Bart Van Assche --- srp_daemon/srp_daemon.1.in | 15 +++++++++++---- srp_daemon/srp_daemon.c | 16 +++++++++++++++- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/srp_daemon/srp_daemon.1.in b/srp_daemon/srp_daemon.1.in index 02e1f2df..82dc3241 100644 --- a/srp_daemon/srp_daemon.1.in +++ b/srp_daemon/srp_daemon.1.in @@ -5,7 +5,7 @@ srp_daemon \- Discovers SRP targets in an InfiniBand Fabric .SH SYNOPSIS -.B srp_daemon\fR [\fB-vVcaeon\fR] [\fB-d \fIumad-device\fR | \fB-i \fIinfiniband-device\fR [\fB-p \fIport-num\fR]] [\fB-t \fItimeout(ms)\fR] [\fB-r \fIretries\fR] [\fB-R \fIrescan-time\fR] [\fB-f \fIrules-file\fR] +.B srp_daemon\fR [\fB-vVcaeon\fR] [\fB-d \fIumad-device\fR | \fB-i \fIinfiniband-device\fR [\fB-p \fIport-num\fR] | \fB-j \fIdev:port\fR] [\fB-t \fItimeout(ms)\fR] [\fB-r \fIretries\fR] [\fB-R \fIrescan-time\fR] [\fB-f \fIrules-file\fR] .SH DESCRIPTION @@ -41,13 +41,20 @@ Print more verbose output Print even more verbose output (debug mode) .TP \fB\-i\fR \fIinfiniband-device\fR -Work on \fIinfiniband-device\fR. This option should not be used with -d. +Work on \fIinfiniband-device\fR. This option should not be used with -d nor +with -j. .TP \fB\-p\fR \fIport-num\fR -Work on port \fIport-num\fR (default 1). This option must be used with -i and should not be used with -d. +Work on port \fIport-num\fR (default 1). This option must be used with -i and +should not be used with -d nor with -j. +.TP +\fB\-j\fR \fIdev:port\fR +Work on port number \fIport\fR of InfiniBand device \fIdev\fR. This option +should not be used with -d, -i nor with -p. .TP \fB\-d\fR \fIumad-device\fR -Use device file \fIumad-device\fR (default /dev/infiniband/umad0) This option should not be used with -i or -p. +Use device file \fIumad-device\fR (default /dev/infiniband/umad0) This option +should not be used with -i, -p nor with -j. .TP \fB\-c\fR Generate output suitable for piping directly to a diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c index 9011fe5e..c0e8d23d 100644 --- a/srp_daemon/srp_daemon.c +++ b/srp_daemon/srp_daemon.c @@ -226,6 +226,7 @@ static void usage(const char *argv0) fprintf(stderr, "-d use umad Device \n"); fprintf(stderr, "-i use InfiniBand device \n"); fprintf(stderr, "-p use Port num \n"); + fprintf(stderr, "-j : use the IB dev / port_num combination \n"); fprintf(stderr, "-R perform complete Rescan every seconds\n"); fprintf(stderr, "-T Retries to connect to existing target after Timeout of seconds\n"); fprintf(stderr, "-l Transport retry count before failing IO. should be in range [2..7], (default 2)\n"); @@ -1623,7 +1624,7 @@ static int get_config(struct config_t *conf, int argc, char *argv[]) while (1) { int c; - c = getopt(argc, argv, "caveod:i:p:t:r:R:T:l:Vhnf:"); + c = getopt(argc, argv, "caveod:i:j:p:t:r:R:T:l:Vhnf:"); if (c == -1) break; @@ -1645,6 +1646,19 @@ static int get_config(struct config_t *conf, int argc, char *argv[]) return -1; } break; + case 'j': { + char dev[32]; + int port_num; + + if (sscanf(optarg, "%31[^:]:%d", dev, &port_num) != 2) { + pr_err("Bad dev:port specification %s\n", + optarg); + return -1; + } + conf->dev_name = strdup(dev); + conf->port_num = port_num; + } + break; case 'c': ++conf->cmd; break;