Soft Patch Panel
 help / color / mirror / Atom feed
From: ogawa.yasufumi@lab.ntt.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp
Subject: [spp] [PATCH 4/6] controller: add pcap support for pri completion
Date: Thu, 14 Feb 2019 11:47:24 +0900	[thread overview]
Message-ID: <20190214024726.40861-5-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <20190214024726.40861-1-ogawa.yasufumi@lab.ntt.co.jp>

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

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 <ogawa.yasufumi@lab.ntt.co.jp>
---
 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

  parent reply	other threads:[~2019-02-14  2:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14  2:47 [spp] [PATCH 0/6] Update for spp_pcap ogawa.yasufumi
2019-02-14  2:47 ` [spp] [PATCH 1/6] spp_pcap: refactor app options ogawa.yasufumi
2019-02-14  2:47 ` [spp] [PATCH 2/6] spp-ctl: update spp_pcap opts for validation ogawa.yasufumi
2019-02-14  2:47 ` [spp] [PATCH 3/6] controller: remove local default config ogawa.yasufumi
2019-02-14  2:47 ` ogawa.yasufumi [this message]
2019-02-14  2:47 ` [spp] [PATCH 5/6] spp_pcap: refactor name of funcs and vars ogawa.yasufumi
2019-02-14  2:47 ` [spp] [PATCH 6/6] makefile: update dist-clean task ogawa.yasufumi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190214024726.40861-5-ogawa.yasufumi@lab.ntt.co.jp \
    --to=ogawa.yasufumi@lab.ntt.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).