Soft Patch Panel
 help / color / mirror / Atom feed
From: ogawa.yasufumi@lab.ntt.co.jp
To: ferruh.yigit@intel.com, spp@dpdk.org, ogawa.yasufumi@lab.ntt.co.jp
Subject: [spp] [PATCH 1/2] spp-ctl: add default entry for registering MAC
Date: Tue, 25 Dec 2018 19:17:22 +0900	[thread overview]
Message-ID: <1545733043-19973-2-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <1545733043-19973-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp>

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

Spp-ctl does not accept for a request to register default entry for
registering MAC address.

  spp > vf 1; component start cls1 4 classifier_mac
  spp > vf 1; port add ring:1 tx cls1
  spp > vf 1; classifier_table add mac default ring:1
  System error occured in spp-ctl.  # failed to register default

This update is to accept the default entry.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 src/spp-ctl/spp_webapi.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/spp-ctl/spp_webapi.py b/src/spp-ctl/spp_webapi.py
index efbaee1..d88d7a9 100644
--- a/src/spp-ctl/spp_webapi.py
+++ b/src/spp-ctl/spp_webapi.py
@@ -284,7 +284,9 @@ class V1VFHandler(BaseHandler, V1VFCommon):
         if body['type'] not in ["mac", "vlan"]:
             raise KeyInvalid('type', body['type'])
         self._validate_port(body['port'])
-        self._validate_mac(body['mac_address'])
+
+        if not body['mac_address'] == 'default':
+            self._validate_mac(body['mac_address'])
 
         if body['type'] == "vlan":
             try:
-- 
2.7.4

  reply	other threads:[~2018-12-25 10:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-25 10:17 [spp] [PATCH 0/2] Add " ogawa.yasufumi
2018-12-25 10:17 ` ogawa.yasufumi [this message]
2018-12-25 10:17 ` [spp] [PATCH 2/2] controller: revise error message 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=1545733043-19973-2-git-send-email-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).