From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama500.ecl.ntt.co.jp (tama500.ecl.ntt.co.jp [129.60.39.148]) by dpdk.org (Postfix) with ESMTP id 6DC9C201 for ; Mon, 1 Oct 2018 05:14:22 +0200 (CEST) Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id w913EL3Q013654; Mon, 1 Oct 2018 12:14:21 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 723FB63889A; Mon, 1 Oct 2018 12:14:21 +0900 (JST) Received: from localhost.localdomain (unknown [129.60.13.51]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 638D6638705; Mon, 1 Oct 2018 12:14:21 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com Cc: Yasufumi Ogawa Date: Mon, 1 Oct 2018 12:14:08 +0900 Message-Id: <20181001031413.75652-1-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.13.1 X-TM-AS-MML: disable Subject: [spp] [PATCH 0/5] Change primary status command to be detailed 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: Mon, 01 Oct 2018 03:14:24 -0000 From: Yasufumi Ogawa Status command of primary simply returns 'running' or 'idling'. It is no meaning because primary is always running and does not have status 'idling'. It would be helpful for users if status command returns stats of port forwarding info instead of running status. This series of patches is for changing status command to show the stats. spp > pri;status Physical Ports: ID rx tx tx_drop mac_addr 0 78932932 78932931 1 56:48:4f:53:54:00 Ring Ports: ID rx tx rx_drop rx_drop 0 89283 89283 0 0 ... For this update, the message format from primary to controller is changed to be structured as JSON. Socket buffer length is also changed to 2048 because it might exceed 1000 if network configuration is complexed. Here is an example of the message format from primary. { "phy_ports": [ { "eth": "56:48:4f:12:34:00", "id": 0, "rx": 78932932, "tx": 78932931, "tx_drop": 1, } ... ], "ring_ports": [ { "id": 0, "rx": 89283, "rx_drop": 0, "tx": 89283, "tx_drop": 0 }, ... ] } Yasufumi Ogawa (5): shared: change socket buffer length controller: change socket buffer length primary: change status command detailed controller: change msg format in ConnectionThread controller: simply print primary status src/controller/conn_thread.py | 16 ++++----- src/controller/shell.py | 61 +++++++++++++++++++++++++++++++- src/controller/spp.py | 2 +- src/controller/spp_common.py | 3 ++ src/primary/main.c | 81 ++++++++++++++++++++++++++++++++++++++++--- src/shared/common.h | 2 +- 6 files changed, 149 insertions(+), 16 deletions(-) -- 2.7.4