From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id CC9CE37A4 for ; Wed, 13 Apr 2016 11:43:33 +0200 (CEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP; 13 Apr 2016 02:43:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,479,1455004800"; d="scan'208";a="944149120" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga001.fm.intel.com with ESMTP; 13 Apr 2016 02:43:32 -0700 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u3D9hUIZ001328; Wed, 13 Apr 2016 17:43:30 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u3D9hS8C020163; Wed, 13 Apr 2016 17:43:30 +0800 Received: (from hengdinx@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u3D9hRYe020159; Wed, 13 Apr 2016 17:43:27 +0800 From: Ding Heng To: dts@dpdk.org Cc: Ding Heng Date: Wed, 13 Apr 2016 17:43:27 +0800 Message-Id: <1460540607-20128-1-git-send-email-hengx.ding@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dts] [PATCH] br.py: change some BR nic config so that vlan could run correctly on this nic X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2016 09:43:34 -0000 Signed-off-by: Ding Heng diff --git a/nics/br.py b/nics/br.py index ae9f9a2..2e4aadd 100644 --- a/nics/br.py +++ b/nics/br.py @@ -46,13 +46,13 @@ FUNC_RULES = [ #redirect PEP0 to EPL0 'create acl 0', 'create acl-rule 0 0', - 'add acl-rule condition 0 0 src-port 0', + 'add acl-rule condition 0 0 src-port 11', 'add acl-rule action 0 0 redirect 1', 'add acl-rule action 0 0 count', #redirect PEP1 to EPL1 'create acl 1', 'create acl-rule 1 0', - 'add acl-rule condition 1 0 src-port 11', + 'add acl-rule condition 1 0 src-port 0', 'add acl-rule action 1 0 redirect 5', 'add acl-rule action 1 0 count', 'apply acl', @@ -214,31 +214,31 @@ class BoulderRapid(NetDevice): def add_vlan(self, vlan_id=0): self.ctrl_crb.send_expect("create vlan %d" % vlan_id, "<0>%") if self.sec_port: - self.ctrl_crb.send_expect("add vlan port %d 1,0" % vlan_id, "<0>%") + self.ctrl_crb.send_expect("add vlan port %d 5,0" % vlan_id, "<0>%") else: - self.ctrl_crb.send_expect("add vlan port %d 5,11" % vlan_id, "<0>%") + self.ctrl_crb.send_expect("add vlan port %d 1,11" % vlan_id, "<0>%") def delete_vlan(self, vlan_id=0): if self.sec_port: - self.ctrl_crb.send_expect("del vlan port %d 1,0" % vlan_id, "<0>%") + self.ctrl_crb.send_expect("del vlan port %d 5,0" % vlan_id, "<0>%") else: - self.ctrl_crb.send_expect("del vlan port %d 5,11" % vlan_id, "<0>%") + self.ctrl_crb.send_expect("del vlan port %d 1,11" % vlan_id, "<0>%") self.ctrl_crb.send_expect("del vlan %d" % vlan_id, "<0>%") def add_txvlan(self, vlan_id=0): if self.sec_port: - self.ctrl_crb.send_expect("set vlan tagging %d 1 tag" % vlan_id, "<0>%") - else: self.ctrl_crb.send_expect("set vlan tagging %d 5 tag" % vlan_id, "<0>%") + else: + self.ctrl_crb.send_expect("set vlan tagging %d 1 tag" % vlan_id, "<0>%") def delete_txvlan(self, vlan_id=0): if self.sec_port: - self.ctrl_crb.send_expect("set vlan tagging %d 1 untag" % vlan_id, "<0>%") - else: self.ctrl_crb.send_expect("set vlan tagging %d 5 untag" % vlan_id, "<0>%") + else: + self.ctrl_crb.send_expect("set vlan tagging %d 1 untag" % vlan_id, "<0>%") def enable_jumbo(self, framesize=0): if self.sec_port: - self.ctrl_crb.send_expect("set port config 1 max_frame_size %d" % framesize, "<0>%") - else: self.ctrl_crb.send_expect("set port config 5 max_frame_size %d" % framesize, "<0>%") + else: + self.ctrl_crb.send_expect("set port config 1 max_frame_size %d" % framesize, "<0>%") -- 1.9.3