From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 38EA8A055E for ; Wed, 26 Feb 2020 02:37:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DACD11BFD2; Wed, 26 Feb 2020 02:37:50 +0100 (CET) Received: from valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by dpdk.org (Postfix) with ESMTP id 98D432C02 for ; Wed, 26 Feb 2020 02:37:48 +0100 (CET) Received: by valinux.co.jp (Postfix, from userid 1000) id 1A0602408A1; Wed, 26 Feb 2020 10:37:47 +0900 (JST) From: Itsuro Oda To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Wed, 26 Feb 2020 10:37:46 +0900 Message-Id: <20200226013746.2875-6-oda@valinux.co.jp> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200226013746.2875-1-oda@valinux.co.jp> References: <20200226013746.2875-1-oda@valinux.co.jp> Subject: [spp] [PATCH 5/5] cli: support pipe PMD 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: , Errors-To: spp-bounces@dpdk.org Sender: "spp" 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 --- 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