test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] br.py: change some BR nic config so that vlan could run correctly on this nic
@ 2016-04-13  9:43 Ding Heng
  2016-04-15  6:52 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: Ding Heng @ 2016-04-13  9:43 UTC (permalink / raw)
  To: dts; +Cc: Ding Heng

Signed-off-by: Ding Heng <hengx.ding@intel.com>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-15  6:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13  9:43 [dts] [PATCH] br.py: change some BR nic config so that vlan could run correctly on this nic Ding Heng
2016-04-15  6:52 ` Liu, Yong

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).