From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama50.ecl.ntt.co.jp (tama50.ecl.ntt.co.jp [129.60.39.147]) by dpdk.org (Postfix) with ESMTP id B11A41B3D8 for ; Tue, 25 Dec 2018 11:19:36 +0100 (CET) Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id wBPAJZkA032285; Tue, 25 Dec 2018 19:19:35 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 4B0BAEA8378; Tue, 25 Dec 2018 19:19:35 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id 328FAEA81BD; Tue, 25 Dec 2018 19:19:35 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: ferruh.yigit@intel.com, spp@dpdk.org, ogawa.yasufumi@lab.ntt.co.jp Date: Tue, 25 Dec 2018 19:17:22 +0900 Message-Id: <1545733043-19973-2-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1545733043-19973-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1545733043-19973-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 1/2] spp-ctl: add default entry for registering MAC 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: Tue, 25 Dec 2018 10:19:38 -0000 From: Yasufumi Ogawa 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 --- 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