From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 992462965 for ; Fri, 15 Apr 2016 08:49:47 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP; 14 Apr 2016 23:49:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,486,1455004800"; d="scan'208";a="686632325" Received: from stv-crb-56.sh.intel.com (HELO [10.239.128.116]) ([10.239.128.116]) by FMSMGA003.fm.intel.com with ESMTP; 14 Apr 2016 23:49:46 -0700 Message-ID: <57108FA9.6070603@intel.com> Date: Fri, 15 Apr 2016 14:52:25 +0800 From: "Liu, Yong" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Ding Heng , dts@dpdk.org References: <1460540607-20128-1-git-send-email-hengx.ding@intel.com> In-Reply-To: <1460540607-20128-1-git-send-email-hengx.ding@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [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: Fri, 15 Apr 2016 06:49:48 -0000 Hi Heng, There's no need to change those settings. Even BR pep sequence is the same as pci port sequence, we can just adjust to it by our port configurations. Let's assume that the previous pci device is the second port for BR device, and actually it is the second pep. On 04/13/2016 05:43 PM, Ding Heng wrote: > 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>%")