From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mogw1207.ocn.ad.jp (mogw1207.ocn.ad.jp [153.149.235.8]) by dpdk.org (Postfix) with ESMTP id 8AAD51B200 for ; Thu, 14 Feb 2019 03:47:29 +0100 (CET) Received: from mf-smf-ucb025c1 (mf-smf-ucb025c1.ocn.ad.jp [153.153.66.163]) by mogw1207.ocn.ad.jp (Postfix) with ESMTP id 2C408A00270; Thu, 14 Feb 2019 11:47:28 +0900 (JST) Received: from ocn-vc-mts-104c1.ocn.ad.jp ([153.138.237.81]) by mf-smf-ucb025c1 with ESMTP id u6z5gNeq9u8ANu73ggoY1e; Thu, 14 Feb 2019 11:47:28 +0900 Received: from smtp.ocn.ne.jp ([153.149.227.167]) by ocn-vc-mts-104c1.ocn.ad.jp with ESMTP id u73ggyARpq2v1u73ggdmVu; Thu, 14 Feb 2019 11:47:28 +0900 Received: from localhost.localdomain (unknown [192.47.164.146]) by smtp.ocn.ne.jp (Postfix) with ESMTPA; Thu, 14 Feb 2019 11:47:28 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Date: Thu, 14 Feb 2019 11:47:24 +0900 Message-Id: <20190214024726.40861-5-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190214024726.40861-1-ogawa.yasufumi@lab.ntt.co.jp> References: <20190214024726.40861-1-ogawa.yasufumi@lab.ntt.co.jp> Subject: [spp] [PATCH 4/6] controller: add pcap support for pri completion X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2019 02:47:29 -0000 From: Yasufumi Ogawa This update is to add `pri; launch` completion for pcap. Optional args, `--out-dir` and `--fsize`, are expected to be given by user and not completed. Here is an example. # press TAB after `pri; launch pcap 2 ` spp > pri; launch pcap 2 -l 1,2-3 ... -s 192.168.1.100:6666 -c phy:0 Signed-off-by: Yasufumi Ogawa --- src/controller/commands/pri.py | 7 +++++++ src/controller/config/default.yml | 3 +++ 2 files changed, 10 insertions(+) diff --git a/src/controller/commands/pri.py b/src/controller/commands/pri.py index d76da2e..2e3c208 100644 --- a/src/controller/commands/pri.py +++ b/src/controller/commands/pri.py @@ -239,6 +239,13 @@ class SppPrimary(object): nof_workers = int( cli_config[tmpkey]['val']) + if 'sec_pcap_port' in cli_config.keys(): + temp = '-c {}'.format( + cli_config['sec_pcap_port']['val']) + + self.launch_template = '{} {}'.format( + self.launch_template, temp) + last_core = lcore_base + nof_workers - 1 # Decide lcore option based on configured number of diff --git a/src/controller/config/default.yml b/src/controller/config/default.yml index ee42bc3..223359e 100644 --- a/src/controller/config/default.yml +++ b/src/controller/config/default.yml @@ -31,3 +31,6 @@ sec_pcap_nof_lcores: sec_vhost_cli: val: "" desc: Vhost client mode, activated if set any of values +sec_pcap_port: + val: "phy:0" + desc: Default captured port -- 2.17.1