From: Itsuro Oda <oda@valinux.co.jp>
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH v2 5/5] cli: support pipe PMD
Date: Wed, 26 Feb 2020 16:06:10 +0900 [thread overview]
Message-ID: <20200226070610.3496-6-oda@valinux.co.jp> (raw)
In-Reply-To: <20200226070610.3496-1-oda@valinux.co.jp>
This patch adds add pipe command to the primary.
Infomation about pipe is added to the output of status command
of the primary too.
Signed-off-by: Itsuro Oda <oda@valinux.co.jp>
---
src/cli/commands/pri.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/cli/commands/pri.py b/src/cli/commands/pri.py
index dbe56d5..6fc7f00 100644
--- a/src/cli/commands/pri.py
+++ b/src/cli/commands/pri.py
@@ -229,6 +229,12 @@ class SppPrimary(object):
else:
print(' - {} -> {}'.format(port, dst))
+ if ('pipes' in json_obj):
+ print(' - pipes:')
+ for pipe in json_obj['pipes']:
+ print(' - pipe:{} ring:{} ring:{}'.format(pipe['id'],
+ pipe['rx'], pipe['tx']))
+
if ('phy_ports' in json_obj) or ('ring_ports' in json_obj):
print('- stats')
@@ -798,6 +804,10 @@ class SppPrimary(object):
print("'%s' is already added." % params[0])
else:
req_params = {'action': 'add', 'port': params[0]}
+ if len(params) == 3:
+ # add pipe:X ring:A ring:B
+ req_params['rx'] = params[1]
+ req_params['tx'] = params[2]
res = self.spp_ctl_cli.put('primary/ports', req_params)
if res is not None:
--
2.17.1
prev parent reply other threads:[~2020-02-26 7:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 1:37 [spp] [PATCH 0/5] REST API and CLI support for " Itsuro Oda
2020-02-26 1:37 ` [spp] [PATCH 1/5] shared: add PIPE port type Itsuro Oda
2020-02-26 1:37 ` [spp] [PATCH 2/5] primary: suport pipe PMD Itsuro Oda
2020-02-26 6:29 ` Yasufumi Ogawa
2020-02-26 1:37 ` [spp] [PATCH 3/5] spp_nfv: ignore " Itsuro Oda
2020-02-26 1:37 ` [spp] [PATCH 4/5] spp-ctl: enable add pipe port to the primary Itsuro Oda
2020-02-26 1:37 ` [spp] [PATCH 5/5] cli: support pipe PMD Itsuro Oda
2020-02-26 7:06 ` [spp] [PATCH v2 0/5] REST API and CLI support for " Itsuro Oda
2020-02-26 7:06 ` [spp] [PATCH v2 1/5] shared: add PIPE port type Itsuro Oda
2020-02-26 7:06 ` [spp] [PATCH v2 2/5] primary: suport pipe PMD Itsuro Oda
2020-02-26 7:06 ` [spp] [PATCH v2 3/5] spp_nfv: ignore " Itsuro Oda
2020-02-26 7:06 ` [spp] [PATCH v2 4/5] spp-ctl: enable add pipe port to the primary Itsuro Oda
2020-02-26 7:06 ` Itsuro Oda [this message]
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=20200226070610.3496-6-oda@valinux.co.jp \
--to=oda@valinux.co.jp \
--cc=ferruh.yigit@intel.com \
--cc=spp@dpdk.org \
--cc=yasufum.o@gmail.com \
/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).