From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-eopbgr30061.outbound.protection.outlook.com ([40.107.3.61]:22244 "EHLO EUR03-AM5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752453AbeB1Km4 (ORCPT ); Wed, 28 Feb 2018 05:42:56 -0500 From: Ido Schimmel To: netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: davem@davemloft.net, shuah@kernel.org, jiri@mellanox.com, dsahern@gmail.com, roopa@cumulusnetworks.com, nikolay@cumulusnetworks.com, andrew@lunn.ch, f.fainelli@gmail.com, vivien.didelot@savoirfairelinux.com, mlxsw@mellanox.com, Ido Schimmel Subject: [PATCH net-next v2 10/14] selftests: forwarding: Allow to get netdev interfaces names from commandline Date: Wed, 28 Feb 2018 12:25:15 +0200 Message-Id: <20180228102519.4156-11-idosch@mellanox.com> In-Reply-To: <20180228102519.4156-1-idosch@mellanox.com> References: <20180228102519.4156-1-idosch@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain Sender: netdev-owner@vger.kernel.org List-ID: From: Jiri Pirko Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/lib.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 083a16eb7803..3385ba76ac19 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -45,6 +45,21 @@ if [[ ! -v NUM_NETIFS ]]; then exit 0 fi +############################################################################## +# Command line options handling + +count=0 + +while [[ $# -gt 0 ]]; do + if [[ "$count" -eq "0" ]]; then + unset NETIFS + declare -A NETIFS + fi + count=$((count + 1)) + NETIFS[p$count]="$1" + shift +done + ############################################################################## # Network interfaces configuration -- 2.14.3 From mboxrd@z Thu Jan 1 00:00:00 1970 From: idosch at mellanox.com (Ido Schimmel) Date: Wed, 28 Feb 2018 12:25:15 +0200 Subject: [PATCH net-next v2 10/14] selftests: forwarding: Allow to get netdev interfaces names from commandline In-Reply-To: <20180228102519.4156-1-idosch@mellanox.com> References: <20180228102519.4156-1-idosch@mellanox.com> Message-ID: <20180228102519.4156-11-idosch@mellanox.com> From: Jiri Pirko Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/lib.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 083a16eb7803..3385ba76ac19 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -45,6 +45,21 @@ if [[ ! -v NUM_NETIFS ]]; then exit 0 fi +############################################################################## +# Command line options handling + +count=0 + +while [[ $# -gt 0 ]]; do + if [[ "$count" -eq "0" ]]; then + unset NETIFS + declare -A NETIFS + fi + count=$((count + 1)) + NETIFS[p$count]="$1" + shift +done + ############################################################################## # Network interfaces configuration -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: idosch@mellanox.com (Ido Schimmel) Date: Wed, 28 Feb 2018 12:25:15 +0200 Subject: [PATCH net-next v2 10/14] selftests: forwarding: Allow to get netdev interfaces names from commandline In-Reply-To: <20180228102519.4156-1-idosch@mellanox.com> References: <20180228102519.4156-1-idosch@mellanox.com> Message-ID: <20180228102519.4156-11-idosch@mellanox.com> Content-Type: text/plain; charset="UTF-8" Message-ID: <20180228102515.TKWAXzZWa7wIME6z_8PWhsKVppcC6WMiiKucKDIRCF8@z> From: Jiri Pirko Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel --- tools/testing/selftests/net/forwarding/lib.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh index 083a16eb7803..3385ba76ac19 100644 --- a/tools/testing/selftests/net/forwarding/lib.sh +++ b/tools/testing/selftests/net/forwarding/lib.sh @@ -45,6 +45,21 @@ if [[ ! -v NUM_NETIFS ]]; then exit 0 fi +############################################################################## +# Command line options handling + +count=0 + +while [[ $# -gt 0 ]]; do + if [[ "$count" -eq "0" ]]; then + unset NETIFS + declare -A NETIFS + fi + count=$((count + 1)) + NETIFS[p$count]="$1" + shift +done + ############################################################################## # Network interfaces configuration -- 2.14.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html