From patchwork Mon Nov 28 21:47:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 9450609 X-Patchwork-Delegate: ira.weiny@intel.com 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 3DD3A6071C for ; Mon, 28 Nov 2016 21:48:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2DC2027BFF for ; Mon, 28 Nov 2016 21:48:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 226D627F89; Mon, 28 Nov 2016 21:48:00 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 7388C27BFF for ; Mon, 28 Nov 2016 21:47:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755568AbcK1Vr6 (ORCPT ); Mon, 28 Nov 2016 16:47:58 -0500 Received: from mail-wm0-f47.google.com ([74.125.82.47]:37192 "EHLO mail-wm0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755613AbcK1Vr5 (ORCPT ); Mon, 28 Nov 2016 16:47:57 -0500 Received: by mail-wm0-f47.google.com with SMTP id t79so168871684wmt.0 for ; Mon, 28 Nov 2016 13:47:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dev-mellanox-co-il.20150623.gappssmtp.com; s=20150623; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=PlT4uoKxI34F3GUl3Sc0VyJZKnW070UhunRZlKr409Y=; b=rb9jtBcSVetv4MlrdWfD32sAH8F+VI/7WGHQp7+4D/3hVbVgMEs3Kxb9RybjSjl6Hx B17OZSP5zAkZIoOCEayk6nQqFkDUGSLH5AZOpECAfouBQhc/X2k3Hc7w0Beh2E3m0Mon MuFgxtTHX1CBKquGwAEIbSXgGBtmBKWJUBl7k+8XsoiTYTqDPZv8AeDLIe25Zmi8hWjH fDph6oKewLaD9qistTi1RhiTLmXX67K3XnDEqPb3MZv+/+hVtPzHyn1fcmqKeQeFjP5b VFBd/23tMXWbulgDFIIdGiHySra3WqWLS2HSsHqyApNJdZD2TnPzARK29bhxZx/sGIZW BV/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=PlT4uoKxI34F3GUl3Sc0VyJZKnW070UhunRZlKr409Y=; b=iawBMxOIGYWjyLEL/3gHrioHIuL6LJAGqXky/c2cHloI1X+3AGJ/F9dlu4zZTAk97U tFnC3s4CUNovjqKDIqE57PjbRZBw/+Whtbe74YG882a2t3cewcipQo70ZC1eVK7nLkLJ 9BYYolOHB0APe8X3PKnrA05Dc2iMz29M8PD9dTj3fSocgdkbD0z48gYO7ka0GtY9x029 pIB7L7u64Za+fe/yJli8sl+ZvYbWo63TQKrm8rd21GUtalVPzlCyBbH7zNMNfgxPmx+n kHM4rQeiFOAVLmvDNWmX7ojP1sNKOXsAJAq1LoUMU9nafk7armCV0QLNbZW4d0sggfbi 5GNQ== X-Gm-Message-State: AKaTC01TvyUnMHoQxJH0lovzO7Q+m3Dba2Mx12yqoN1IZnd8XoF0Fp6eyZOzo9il9NNQwg== X-Received: by 10.28.178.10 with SMTP id b10mr22914883wmf.83.1480369675479; Mon, 28 Nov 2016 13:47:55 -0800 (PST) Received: from [192.168.1.183] (c-50-177-105-67.hsd1.ma.comcast.net. [50.177.105.67]) by smtp.googlemail.com with ESMTPSA id x188sm30858266wmx.4.2016.11.28.13.47.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Nov 2016 13:47:54 -0800 (PST) To: "Weiny, Ira" Cc: "linux-rdma@vger.kernel.org" From: Hal Rosenstock Subject: [PATCH infiniband-diags] scripts: Add mkey support into ibhosts, ibswitches, and ibrouters Message-ID: Date: Mon, 28 Nov 2016 16:47:52 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 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 Signed-off-by: Hal Rosenstock --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/ibhosts.in b/scripts/ibhosts.in index fda0541..c37260c 100644 --- a/scripts/ibhosts.in +++ b/scripts/ibhosts.in @@ -3,19 +3,32 @@ IBPATH=${IBPATH:-@IBSCRIPTPATH@} usage() { - echo Usage: `basename $0` "[-h] [ | -C ca_name" \ - "-P ca_port -t timeout_ms]" + echo Usage: `basename $0` "[-h] [ | -y mkey" \ + "-C ca_name -P ca_port -t timeout_ms]" exit -1 } topofile="" ca_info="" +mkey="0" while [ "$1" ]; do case $1 in -h | --help) usage ;; + -y | --m_key) + case $2 in + -*) + usage + ;; + esac + if [ x$2 = x ] ; then + usage + fi + shift + mkey="$1" + ;; -P | --Port | -C | --Ca | -t | --timeout) case $2 in -*) @@ -44,7 +57,7 @@ done if [ "$topofile" ]; then netcmd="cat $topofile" else - netcmd="$IBPATH/ibnetdiscover $ca_info" + netcmd="$IBPATH/ibnetdiscover -y $mkey $ca_info" fi text="`eval $netcmd`" diff --git a/scripts/ibrouters.in b/scripts/ibrouters.in index ae66ca4..b3e5a1d 100644 --- a/scripts/ibrouters.in +++ b/scripts/ibrouters.in @@ -3,19 +3,32 @@ IBPATH=${IBPATH:-@IBSCRIPTPATH@} usage() { - echo Usage: `basename $0` "[-h] [ | -C ca_name" \ - "-P ca_port -t timeout_ms]" + echo Usage: `basename $0` "[-h] [ | -y mkey" \ + "-C ca_name -P ca_port -t timeout_ms]" exit -1 } topofile="" ca_info="" +mkey="0" while [ "$1" ]; do case $1 in -h | --help) usage ;; + -y | --m_key) + case $2 in + -*) + usage + ;; + esac + if [ x$2 = x ] ; then + usage + fi + shift + mkey="$1" + ;; -P | --Port | -C | --Ca | -t | --timeout) case $2 in -*) @@ -44,7 +57,7 @@ done if [ "$topofile" ]; then netcmd="cat $topofile" else - netcmd="$IBPATH/ibnetdiscover $ca_info" + netcmd="$IBPATH/ibnetdiscover -y $mkey $ca_info" fi text="`eval $netcmd`" diff --git a/scripts/ibswitches.in b/scripts/ibswitches.in index 0f3aa91..743f1db 100644 --- a/scripts/ibswitches.in +++ b/scripts/ibswitches.in @@ -3,19 +3,32 @@ IBPATH=${IBPATH:-@IBSCRIPTPATH@} usage() { - echo Usage: `basename $0` "[-h] [ | -C ca_name" \ - "-P ca_port -t timeout_ms]" + echo Usage: `basename $0` "[-h] [ | -y mkey" \ + "-C ca_name -P ca_port -t timeout_ms]" exit -1 } topofile="" ca_info="" +mkey="0" while [ "$1" ]; do case $1 in -h | --help) usage ;; + -y | --m_key) + case $2 in + -*) + usage + ;; + esac + if [ x$2 = x ] ; then + usage + fi + shift + mkey="$1" + ;; -P | --Port | -C | --Ca | -t | --timeout) case $2 in -*) @@ -44,7 +57,7 @@ done if [ "$topofile" ]; then netcmd="cat $topofile" else - netcmd="$IBPATH/ibnetdiscover $ca_info" + netcmd="$IBPATH/ibnetdiscover -y $mkey $ca_info" fi text="`eval $netcmd`"