From patchwork Wed Apr 27 09:52:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Elo, Matias \(Nokia - FI/Espoo\)" X-Patchwork-Id: 66776 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp2087156qge; Wed, 27 Apr 2016 02:52:53 -0700 (PDT) X-Received: by 10.107.175.227 with SMTP id p96mr8959153ioo.72.1461750773049; Wed, 27 Apr 2016 02:52:53 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id m16si8706932iod.199.2016.04.27.02.52.52; Wed, 27 Apr 2016 02:52:53 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE dis=NONE) header.from=nokia.com Received: by lists.linaro.org (Postfix, from userid 109) id 5E024611F9; Wed, 27 Apr 2016 09:52:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id C5C6E610D4; Wed, 27 Apr 2016 09:52:46 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 9FA5B610E1; Wed, 27 Apr 2016 09:52:44 +0000 (UTC) Received: from demumfd002.nsn-inter.net (demumfd002.nsn-inter.net [93.183.12.31]) by lists.linaro.org (Postfix) with ESMTPS id C6718610D4 for ; Wed, 27 Apr 2016 09:52:43 +0000 (UTC) Received: from demuprx016.emea.nsn-intra.net ([10.150.129.55]) by demumfd002.nsn-inter.net (8.15.2/8.15.2) with ESMTPS id u3R9qfdH031809 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 27 Apr 2016 09:52:42 GMT Received: from 10.144.19.15 ([10.144.104.109]) by demuprx016.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id u3R9qej9005143 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 27 Apr 2016 11:52:41 +0200 From: Matias Elo To: lng-odp@lists.linaro.org Date: Wed, 27 Apr 2016 12:52:39 +0300 Message-Id: <1461750759-21543-2-git-send-email-matias.elo@nokia.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1461750759-21543-1-git-send-email-matias.elo@nokia.com> References: <1461750759-21543-1-git-send-email-matias.elo@nokia.com> X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-size: 1352 X-purgate-ID: 151667::1461750762-00002418-DEAE8987/0/0 X-Topics: patch Subject: [lng-odp] [PATCH 2/2] example: switch: set minimum interface count to two X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" There is no use for a switch with a single interface. Signed-off-by: Matias Elo --- example/switch/odp_switch.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/example/switch/odp_switch.c b/example/switch/odp_switch.c index b0e5b91..96229ff 100644 --- a/example/switch/odp_switch.c +++ b/example/switch/odp_switch.c @@ -717,7 +717,7 @@ static void usage(char *progname) "\n" "Mandatory OPTIONS:\n" " -i, --interface Eth interfaces (comma-separated, no spaces)\n" - " Interface count min 1, max %i\n" + " Interface count min 2, max %i\n" "\n" "Optional OPTIONS:\n" " -c, --count CPU count.\n" @@ -800,7 +800,7 @@ static void parse_args(int argc, char *argv[], appl_args_t *appl_args) appl_args->if_count = i; - if (appl_args->if_count < 1 || + if (appl_args->if_count < 2 || appl_args->if_count > MAX_PKTIOS) { usage(argv[0]); exit(EXIT_FAILURE); @@ -892,7 +892,6 @@ int main(int argc, char **argv) odp_instance_t instance; odph_linux_thr_params_t thr_params; - /* Init ODP before calling anything else */ if (odp_init_global(&instance, NULL, NULL)) { printf("Error: ODP global init failed.\n");