test suite reviews and discussions
 help / color / mirror / Atom feed
From: Ding Heng <hengx.ding@intel.com>
To: dts@dpdk.org
Cc: Ding Heng <hengx.ding@intel.com>
Subject: [dts] [PATCH] br.py: change some BR nic config so that vlan could run correctly on this nic
Date: Wed, 13 Apr 2016 17:43:27 +0800	[thread overview]
Message-ID: <1460540607-20128-1-git-send-email-hengx.ding@intel.com> (raw)

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

             reply	other threads:[~2016-04-13  9:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13  9:43 Ding Heng [this message]
2016-04-15  6:52 ` Liu, Yong

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=1460540607-20128-1-git-send-email-hengx.ding@intel.com \
    --to=hengx.ding@intel.com \
    --cc=dts@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).