Soft Patch Panel
 help / color / mirror / Atom feed
From: Itsuro Oda <oda@valinux.co.jp>
To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com
Subject: [spp] [PATCH 5/5] cli: support pipe PMD
Date: Wed, 26 Feb 2020 10:37:46 +0900
Message-ID: <20200226013746.2875-6-oda@valinux.co.jp> (raw)
In-Reply-To: <20200226013746.2875-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 a13137d..c6ad265 100644
--- a/src/cli/commands/pri.py
+++ b/src/cli/commands/pri.py
@@ -223,6 +223,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')
 
@@ -764,6 +770,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


  parent reply	other threads:[~2020-02-26  1:37 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 ` Itsuro Oda [this message]
2020-02-26  7:06 ` [spp] [PATCH v2 0/5] REST API and CLI support for pipe PMD 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   ` [spp] [PATCH v2 5/5] cli: support pipe PMD Itsuro Oda

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=20200226013746.2875-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

Soft Patch Panel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/spp/0 spp/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 spp spp/ https://inbox.dpdk.org/spp \
		spp@dpdk.org
	public-inbox-index spp

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.spp


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git