test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Liu, Yong" <yong.liu@intel.com>
To: Ding Heng <hengx.ding@intel.com>, dts@dpdk.org
Subject: Re: [dts] [PATCH] br.py: change some BR nic config so that vlan could run correctly on this nic
Date: Fri, 15 Apr 2016 14:52:25 +0800	[thread overview]
Message-ID: <57108FA9.6070603@intel.com> (raw)
In-Reply-To: <1460540607-20128-1-git-send-email-hengx.ding@intel.com>

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 <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>%")

      reply	other threads:[~2016-04-15  6:49 UTC|newest]

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

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=57108FA9.6070603@intel.com \
    --to=yong.liu@intel.com \
    --cc=dts@dpdk.org \
    --cc=hengx.ding@intel.com \
    /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).