Soft Patch Panel
 help / color / mirror / Atom feed
From: ogawa.yasufumi@lab.ntt.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com
Cc: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
Subject: [spp] [PATCH 0/5] Change primary status command to be detailed
Date: Mon,  1 Oct 2018 12:14:08 +0900	[thread overview]
Message-ID: <20181001031413.75652-1-ogawa.yasufumi@lab.ntt.co.jp> (raw)

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

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

             reply	other threads:[~2018-10-01  3:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01  3:14 ogawa.yasufumi [this message]
2018-10-01  3:14 ` [spp] [PATCH 1/5] shared: change socket buffer length ogawa.yasufumi
2018-10-01  3:14 ` [spp] [PATCH 2/5] controller: " ogawa.yasufumi
2018-10-01  3:14 ` [spp] [PATCH 3/5] primary: change status command detailed ogawa.yasufumi
2018-10-01  3:14 ` [spp] [PATCH 4/5] controller: change msg format in ConnectionThread ogawa.yasufumi
2018-10-01  3:14 ` [spp] [PATCH 5/5] controller: simply print primary status 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=20181001031413.75652-1-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).