test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Xu, HuilongX" <huilongx.xu@intel.com>
To: "Liu, Yong" <yong.liu@intel.com>, "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH 2/2] add link bond slave dynamic config test case
Date: Mon, 15 May 2017 01:08:57 +0000	[thread overview]
Message-ID: <DF2A19295B96364286FEB7F3DDA27A4668D90B8D@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <59157823.2030805@intel.com>

Hi yong,

Thanks  a lot 

> -----Original Message-----
> From: Liu, Yong
> Sent: Friday, May 12, 2017 4:54 PM
> To: Xu, HuilongX; dts@dpdk.org
> Subject: Re: [dts] [PATCH 2/2] add link bond slave dynamic config test case
> 
> Huilong,
> Some comments below.
> 
> On 05/12/2017 03:44 PM, xu,huilong wrote:
> > update list:
> > 1 add link bond slave dynamic config test case
> > 2 use two port for this suite
> >
> > Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> > ---
> >   tests/TestSuite_pmdrss_hash.py | 32
> +++++++++++++++++++++++++++++---
> >   1 file changed, 29 insertions(+), 3 deletions(-)
> >
> > diff --git a/tests/TestSuite_pmdrss_hash.py
> > b/tests/TestSuite_pmdrss_hash.py index 78ae34d..fd032f4 100644
> > --- a/tests/TestSuite_pmdrss_hash.py
> > +++ b/tests/TestSuite_pmdrss_hash.py
> > @@ -417,10 +417,10 @@ class TestPmdrssHash(TestCase):
> >           """
> >
> >           self.verify(self.nic in ["fortville_eagle", "fortville_spirit",
> > -                    "fortville_spirit_single", "redrockcanyou", "atwood",
> "boulderrapid", "fortpark_TLV"],
> > +                    "fortville_spirit_single", "redrockcanyou",
> > + "atwood", "boulderrapid", "fortpark_TLV","fortville_25g"],
> 
> Here contain pep8 issue, please check with pep8 tool.
Yes, I will update this in next version.
> >                       "NIC Unsupported: " + str(self.nic))
> >           global reta_num
> > -        if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single",
> "fortpark_TLV"]:
> > +        if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single",
> "fortpark_TLV","fortville_25g"]:
> >               reta_num = 512
> >           elif self.nic in ["niantic"]:
> >               reta_num = 128
> > @@ -429,7 +429,7 @@ class TestPmdrssHash(TestCase):
> >           else:
> >               self.verify(False, "NIC Unsupported:%s" % str(self.nic))
> >           ports = self.dut.get_ports(self.nic)
> > -        self.verify(len(ports) >= 1, "Not enough ports available")
> > +        self.verify(len(ports) >= 2, "Not enough ports available")
> We are trying to limit port usage, is this case must use two ports?
Yes, because this case must use two ports. One ports config rss by manual. Another port will auto sync rss config.

> 
> >
> >       def set_up(self):
> >           """
> > @@ -651,6 +651,32 @@ class TestPmdrssHash(TestCase):
> >
> >               self.dut.send_expect("quit", "# ", 30)
> >
> > +    def test_dynamic_rss_bond_config(self):
> > +        self.dut.send_expect("./%s/app/testpmd -c f -n 4 -- -i --txqflags=0" %
> self.target, "testpmd> ", 120)
> > +        out = self.dut.send_expect("create bonded device 3 0", "testpmd> ",
> 30)
> > +        bond_device_id = int(re.search("port \d+", out).group().split(" ")[-
> 1].strip())
> > +        self.verify(bond_device_id > 1, "not enought port for bonded
> > + test")
> 
> Please add some space line between different blocks. And add one
> comment line to describe the code block.
> It will more readable and easier for later maintenance.
Yes, I will updte next version.
> > +        self.dut.send_expect("add bonding slave 0 %d" % bond_device_id,
> "testpmd>", 30)
> > +        self.dut.send_expect("add bonding slave 1 %d" % bond_device_id,
> "testpmd>", 30)
> > +        out = self.dut.send_expect("get_hash_global_config 0", "testpmd>")
> > +        slave0_hash_function = re.search("Hash function is .+",
> out).group().split(" ")[-1].strip()
> > +        out = self.dut.send_expect("get_hash_global_config 1", "testpmd>")
> > +        slave1_hash_function = re.search("Hash function is .+",
> out).group().split(" ")[-1].strip()
> > +        self.verify(slave0_hash_function == slave1_hash_function, "default
> hash function not match")
> > +        new_hash_function = ""
> > +        for hash_function in ["toeplitz", "simple_xor"]:
> > +            if slave0_hash_function[-3:].lower() != hash_function[-3:]:
> > +                new_hash_function = hash_function
> > +        self.dut.send_expect("set_hash_global_config 0 %s ipv4-other
> enable" % new_hash_function, "testpmd>")
> > +        out = self.dut.send_expect("get_hash_global_config 0", "testpmd>")
> > +        slave0_new_hash_function = re.search("Hash function is .+",
> out).group().split(" ")[-1].strip()
> > +        out = self.dut.send_expect("get_hash_global_config 1", "testpmd>")
> > +        slave1_new_hash_function = re.search("Hash function is .+",
> out).group().split(" ")[-1].strip()
> > +        self.verify(slave0_new_hash_function == slave1_new_hash_function,
> "bond slave auto sync hash function failed")
> > +        self.verify(slave0_new_hash_function[-3:].lower() ==
> new_hash_function[-3:], "changed slave hash function failed")
> > +        self.dut.send_expect("remove bonding slave 0 %d" %
> bond_device_id, "testpmd>", 30)
> > +        self.dut.send_expect("remove bonding slave 1 %d" %
> bond_device_id, "testpmd>", 30)
> > +        self.dut.send_expect("quit","# ", 30)
> >       def tear_down(self):
> >           """
> >           Run after each test case.

  reply	other threads:[~2017-05-15  1:09 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12  7:44 [dts] [PATCH V2] add filter lldp in sniff model xu,huilong
2017-05-12  7:44 ` [dts] [PATCH V2] add fortville 25G NIC for this case xu,huilong
2017-05-12  8:47   ` Liu, Yong
2017-05-12  7:44 ` [dts] [PATCH 1/2] add link bonding rss dynamic config test plane xu,huilong
2017-05-15  2:30   ` Liu, Yong
2017-05-12  7:44 ` [dts] [PATCH] fix check packet failure by lldp have different packet size xu,huilong
2017-05-15  2:54   ` Liu, Yong
2017-05-12  7:44 ` [dts] [PATCH V2] fix test app compile error xu,huilong
2017-05-12  8:57   ` Liu, Yong
2017-05-12  7:44 ` [dts] [PATCH V2] fix timeout when setup dpdk app xu,huilong
2017-05-12  9:01   ` Liu, Yong
2017-05-12  7:44 ` [dts] [PATCH V2] fix user space ethtool failed case xu,huilong
2017-05-12  9:07   ` Liu, Yong
2017-05-15  1:27     ` Xu, HuilongX
2017-05-12  7:44 ` [dts] [PATCH] remove --crc-strip parameter in testpmd xu,huilong
2017-05-12  9:10   ` Liu, Yong
2017-05-12  7:44 ` [dts] [PATCH 1/2] update fdir test case xu,huilong
2017-05-15  2:19   ` Liu, Yong
2017-05-12  7:44 ` [dts] [PATCH V2] update testpmd path in dpdk xu,huilong
2017-05-12  9:12   ` Liu, Yong
2017-05-12  7:44 ` [dts] [PATCH 2/2] add link bond slave dynamic config test case xu,huilong
2017-05-12  8:53   ` Liu, Yong
2017-05-15  1:08     ` Xu, HuilongX [this message]
2017-05-12  7:44 ` [dts] [PATCH 2/2] update fdir test plane xu,huilong
2017-05-15  2:16   ` Liu, Yong
2017-05-12  8:45 ` [dts] [PATCH V2] add filter lldp in sniff model 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=DF2A19295B96364286FEB7F3DDA27A4668D90B8D@SHSMSX101.ccr.corp.intel.com \
    --to=huilongx.xu@intel.com \
    --cc=dts@dpdk.org \
    --cc=yong.liu@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).