From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from USCAMAIL.TILERA.COM (uscamail.tilera.com [12.218.212.166]) by dpdk.org (Postfix) with ESMTP id 2EC92156 for ; Thu, 3 Apr 2014 19:28:48 +0200 (CEST) Received: from sclab-apps-2.internal.tilera.com (10.108.0.15) by USCAEXCH2.tad.internal.tilera.com (10.103.0.33) with Microsoft SMTP Server (TLS) id 14.0.702.0; Thu, 3 Apr 2014 10:30:23 -0700 Received: (from cchemparathy@localhost) by sclab-apps-2.internal.tilera.com (8.14.4/8.14.4/Submit) id s33HUNwl029243; Thu, 3 Apr 2014 10:30:23 -0700 X-Authentication-Warning: sclab-apps-2.internal.tilera.com: cchemparathy set sender to cchemparathy@tilera.com using -f From: Cyril Chemparathy To: Date: Thu, 3 Apr 2014 10:30:13 -0700 Message-ID: <1396546216-29200-4-git-send-email-cchemparathy@tilera.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1396546216-29200-1-git-send-email-cchemparathy@tilera.com> References: <1396546216-29200-1-git-send-email-cchemparathy@tilera.com> MIME-Version: 1.0 Content-Type: text/plain Subject: [dpdk-dev] [PATCH 3/6] test-pmd: allow command line selection of forwarding mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Apr 2014 17:28:48 -0000 This commit allows testpmd forwarding mode selection through command line parameters instead of having to set this up in interactive mode. Signed-off-by: Cyril Chemparathy --- app/test-pmd/parameters.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c index 18b52cc..67081d7 100644 --- a/app/test-pmd/parameters.c +++ b/app/test-pmd/parameters.c @@ -158,6 +158,7 @@ usage(char* progname) printf(" --disable-rss: disable rss.\n"); printf(" --port-topology=N: set port topology (N: paired (default) or " "chained).\n"); + printf(" --forward-mode=N: set forwarding mode.\n"); printf(" --rss-ip: set RSS functions to IPv4/IPv6 only .\n"); printf(" --rss-udp: set RSS functions to IPv4/IPv6 + UDP.\n"); printf(" --rxq=N: set the number of RX queues per port to N.\n"); @@ -515,6 +516,7 @@ launch_args_parse(int argc, char** argv) { "enable-drop-en", 0, 0, 0 }, { "disable-rss", 0, 0, 0 }, { "port-topology", 1, 0, 0 }, + { "forward-mode", 1, 0, 0 }, { "rss-ip", 0, 0, 0 }, { "rss-udp", 0, 0, 0 }, { "rxq", 1, 0, 0 }, @@ -775,6 +777,8 @@ launch_args_parse(int argc, char** argv) " must be: paired or chained \n", optarg); } + if (!strcmp(lgopts[opt_idx].name, "forward-mode")) + set_pkt_forwarding_mode(optarg); if (!strcmp(lgopts[opt_idx].name, "rss-ip")) rss_hf = ETH_RSS_IPV4 | ETH_RSS_IPV6; if (!strcmp(lgopts[opt_idx].name, "rss-udp")) -- 1.8.3.1