test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1][dts 1/2] add allmutlicast and broadcast test plan
@ 2016-04-22  6:02 xu,huilong
  2016-04-22  6:02 ` [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast test case xu,huilong
  2016-05-04 17:10 ` [dts] [PATCH V1][dts 1/2] add allmutlicast and broadcast test plan Liu, Yong
  0 siblings, 2 replies; 6+ messages in thread
From: xu,huilong @ 2016-04-22  6:02 UTC (permalink / raw)
  To: dts; +Cc: xu,huilong

Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
 test_plans/dynamic_config_test_plan.rst | 57 ++++++++++++++++++++++++++++++++-
 1 file changed, 56 insertions(+), 1 deletion(-)

diff --git a/test_plans/dynamic_config_test_plan.rst b/test_plans/dynamic_config_test_plan.rst
index f1dbd1b..93a0434 100644
--- a/test_plans/dynamic_config_test_plan.rst
+++ b/test_plans/dynamic_config_test_plan.rst
@@ -1,4 +1,4 @@
-.. Copyright (c) <2010, 2011>, Intel Corporation
+.. Copyright (c) <2010, 2016>, Intel Corporation
    All rights reserved.
    
    Redistribution and use in source and binary forms, with or without
@@ -194,6 +194,61 @@ Send a packet with with destination MAC address equal with the port 8 address.::
 
 Verify that the packet was received (RX-packets incremented).
 
+Test Case: Disable Promiscuous Mode boardcast
+===================================
+
+Disable promiscuous mode and verify that the packets are received boardcast packet.::
+  
+  testpmd> set promisc all off
+  testpmd> set fwd io
+  testpmd> clear port stats all
+Send a packet with destination MAC address different than the port 0 address.::
+
+  testpmd> show port stats 1
+
+    ######################## NIC statistics for port 1  ########################
+    RX-packets: 0          RX-errors: 0         RX-bytes: 0
+    TX-packets: 0          TX-errors: 0         TX-bytes: 0
+    ############################################################################
+
+Verify that no packet was fwd (port 1 TX-packets is 0).
+  testpmd> clear port stats all
+Send a boardcast packet .::
+
+    ######################## NIC statistics for port 1  ########################
+    RX-packets: 0          RX-errors: 0         RX-bytes: 0
+    TX-packets: 1          TX-errors: 0         TX-bytes: 80
+    ############################################################################
+
+Verify that the packet was received and fwd(TX-packets is 1).
 
+Test Case: Disable Promiscuous Mode mutlicast
+===================================
+
+Disable promiscuous mode and verify that the packets are received mutlicast packet.::
+  
+  testpmd> set promisc all off
+  testpmd> set fwd io
+  testpmd> clear port stats all
+  testpmd> set allmulti all off
+Send a packet with destination MAC is mutlicast mac eg: 01:00:00:33:00:01.::
+
+  testpmd> show port stats 1
+
+    ######################## NIC statistics for port 1  ########################
+    RX-packets: 0          RX-errors: 0         RX-bytes: 0
+    TX-packets: 0          TX-errors: 0         TX-bytes: 0
+    ############################################################################
+
+Verify that no packet was fwd (port 1 TX-packets is 0).
+  testpmd> clear port stats all
+  testpmd> set allmulti all on
+Send a packet with destination MAC is mutlicast mac eg: 01:00:00:33:00:01.::
+
+    ######################## NIC statistics for port 1  ########################
+    RX-packets: 0          RX-errors: 0         RX-bytes: 0
+    TX-packets: 1          TX-errors: 0         TX-bytes: 80
+    ############################################################################
 
+Verify that the packet was received and fwd(TX-packets is 1).
  
-- 
1.9.3

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

* [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast test case
  2016-04-22  6:02 [dts] [PATCH V1][dts 1/2] add allmutlicast and broadcast test plan xu,huilong
@ 2016-04-22  6:02 ` xu,huilong
  2016-04-29 17:48   ` Liu, Yong
  2016-05-04 17:10 ` [dts] [PATCH V1][dts 1/2] add allmutlicast and broadcast test plan Liu, Yong
  1 sibling, 1 reply; 6+ messages in thread
From: xu,huilong @ 2016-04-22  6:02 UTC (permalink / raw)
  To: dts; +Cc: xu,huilong

Signed-off-by: xu,huilong <huilongx.xu@intel.com>
---
 tests/TestSuite_dynamic_config.py | 69 ++++++++++++++++++++++++++++++++-------
 1 file changed, 58 insertions(+), 11 deletions(-)

diff --git a/tests/TestSuite_dynamic_config.py b/tests/TestSuite_dynamic_config.py
index ba740b1..380fa6d 100644
--- a/tests/TestSuite_dynamic_config.py
+++ b/tests/TestSuite_dynamic_config.py
@@ -1,6 +1,6 @@
 # BSD LICENSE
 #
-# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
+# Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without
@@ -67,18 +67,12 @@ class TestDynamicConfig(TestCase):
         print self.dut_ports
 
         # Verify that enough ports are available
-        if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
-            self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
-        else:
-            self.verify(len(self.dut_ports) >= 1, "Insufficient ports")
+        self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
 
         # Prepare cores and ports
         cores = self.dut.get_core_list('1S/2C/2T')
         coreMask = dts.create_mask(cores)
-        if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
-            portMask = dts.create_mask(self.dut_ports[:2])
-        else:
-            portMask = dts.create_mask([self.dut_ports[0]])
+        portMask = dts.create_mask(self.dut_ports[:2])
 
         # launch app
         cmd = "./%s/build/app/test-pmd/testpmd -c %s -n 3 -- -i --rxpt=0 \
@@ -99,8 +93,7 @@ class TestDynamicConfig(TestCase):
         self.verify(cmp(ret.lower(), self.dest) == 0, "MAC address wrong")
         self.verify("Promiscuous mode: enabled" in out,
                     "wrong default promiscuous value")
-        if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single"]:
-            self.dut.send_expect("start", "testpmd> ", 120)
+        self.dut.send_expect("start", "testpmd> ", 120)
 
     def dynamic_config_send_packet(self, portid, destMac="00:11:22:33:44:55"):
         """
@@ -129,6 +122,7 @@ class TestDynamicConfig(TestCase):
         portid = self.dut_ports[0]
 
         # get the current rx statistic
+        out = self.dut.send_expect("clear port stats all" , "testpmd> ")
         out = self.dut.send_expect("show port stats %d" % portid, "testpmd> ")
         cur_rxpkt = dts.regexp(out, "RX-packets: ([0-9]+)")
 
@@ -211,7 +205,60 @@ class TestDynamicConfig(TestCase):
             # check the pakcet increasment
             self.verify(int(cur_rxpkt) == int(
                 pre_rxpkt) + 1, "2nd packet increasment error")
+    def test_dynamic_config_broadcast(self):
+        """
+        Dynamic config disable promiscuous, send a broadcast packet
+        dpdk will received packet and fwd by io model. send a general packet
+        and dst mac not port mac, dpdk will not received packet.
+        """
+        
+        self.dut.send_expect("set promisc all off", "testpmd> ")
+        self.dut.send_expect("set fwd io", "testpmd> ")
+        self.dut.send_expect("clear port stats all", "testpmd> ")
+
+        self.dynamic_config_send_packet(self.dut_ports[0],"ff:ff:ff:ff:ff:ff")
+        out = self.dut.send_expect(
+            "show port stats %d" % self.dut_ports[1], "testpmd> ")
+          
+        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
+        self.verify(int(cur_rxpkt) == 1, "1st packet increasment error")
+           
+        self.dut.send_expect("clear port stats all", "testpmd> ")
+
+        self.dynamic_config_send_packet(self.dut_ports[0])
+        out = self.dut.send_expect(
+            "show port stats %d" % self.dut_ports[1], "testpmd> ")
+          
+        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
+        self.verify(int(cur_rxpkt) == 0, "2st packet increasment error")
+
+    def test_dynamic_config_allmulticast(self):
+        """
+        Dynamic config disable promiscuous,when dpdk enable multicast, send a 
+        mulicast packet, dpdk received this packet and fwd by io model. when dpdk
+        disable multicast, dpdk not received this packet
+        """
+
+        self.dut.send_expect("set promisc all off", "testpmd> ")
+        self.dut.send_expect("set fwd io", "testpmd> ")
+        self.dut.send_expect("clear port stats all", "testpmd> ")
+        self.dut.send_expect("set allmulti all on", "testpmd> ")
+        self.dynamic_config_send_packet(self.dut_ports[0],"01:00:00:33:00:01")
+        out = self.dut.send_expect(
+            "show port stats %d" % self.dut_ports[1], "testpmd> ")
+            
+        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
+        self.verify(int(cur_rxpkt) == 1, "1st packet increasment error")
+           
+        self.dut.send_expect("clear port stats all", "testpmd> ")
+        self.dut.send_expect("set allmulti all off", "testpmd> ")
+        self.dynamic_config_send_packet(self.dut_ports[0],"01:00:00:33:00:01")
+        out = self.dut.send_expect(
+            "show port stats %d" % self.dut_ports[1], "testpmd> ")
 
+        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
+        self.verify(int(cur_rxpkt) == 0, "2st packet increasment error")
+           
     def test_dynamic_config_enable_promiscuous(self):
         """
         Dynamic config enable promiscuous test
-- 
1.9.3

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

* Re: [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast test case
  2016-04-22  6:02 ` [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast test case xu,huilong
@ 2016-04-29 17:48   ` Liu, Yong
  2016-05-03  1:49     ` Xu, HuilongX
  0 siblings, 1 reply; 6+ messages in thread
From: Liu, Yong @ 2016-04-29 17:48 UTC (permalink / raw)
  To: Xu, HuilongX, dts; +Cc: Xu, HuilongX

Thanks, one question below.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong
> Sent: Thursday, April 21, 2016 11:03 PM
> To: dts@dpdk.org
> Cc: Xu, HuilongX
> Subject: [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast test
> case
> 
> Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> ---
>  tests/TestSuite_dynamic_config.py | 69 ++++++++++++++++++++++++++++++++--
> -----
>  1 file changed, 58 insertions(+), 11 deletions(-)
> 
> diff --git a/tests/TestSuite_dynamic_config.py
> b/tests/TestSuite_dynamic_config.py
> index ba740b1..380fa6d 100644
> --- a/tests/TestSuite_dynamic_config.py
> +++ b/tests/TestSuite_dynamic_config.py
> @@ -1,6 +1,6 @@
>  # BSD LICENSE
>  #
> -# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
> +# Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
>  # All rights reserved.
>  #
>  # Redistribution and use in source and binary forms, with or without
> @@ -67,18 +67,12 @@ class TestDynamicConfig(TestCase):
>          print self.dut_ports
> 
>          # Verify that enough ports are available
> -        if self.nic in ["fortville_eagle", "fortville_spirit",
> "fortville_spirit_single"]:
> -            self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
> -        else:
> -            self.verify(len(self.dut_ports) >= 1, "Insufficient ports")
> +        self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
> 
>          # Prepare cores and ports
>          cores = self.dut.get_core_list('1S/2C/2T')
>          coreMask = dts.create_mask(cores)
> -        if self.nic in ["fortville_eagle", "fortville_spirit",
> "fortville_spirit_single"]:
> -            portMask = dts.create_mask(self.dut_ports[:2])
> -        else:
> -            portMask = dts.create_mask([self.dut_ports[0]])
> +        portMask = dts.create_mask(self.dut_ports[:2])

One question here, is this case must need two ports? Reduce port requirement is our long time strategy. 
It will benefit for some NIC which only one port available. 

> 
>          # launch app
>          cmd = "./%s/build/app/test-pmd/testpmd -c %s -n 3 -- -i --rxpt=0
> \
> @@ -99,8 +93,7 @@ class TestDynamicConfig(TestCase):
>          self.verify(cmp(ret.lower(), self.dest) == 0, "MAC address wrong")
>          self.verify("Promiscuous mode: enabled" in out,
>                      "wrong default promiscuous value")
> -        if self.nic in ["fortville_eagle", "fortville_spirit",
> "fortville_spirit_single"]:
> -            self.dut.send_expect("start", "testpmd> ", 120)
> +        self.dut.send_expect("start", "testpmd> ", 120)
> 
>      def dynamic_config_send_packet(self, portid,
> destMac="00:11:22:33:44:55"):
>          """
> @@ -129,6 +122,7 @@ class TestDynamicConfig(TestCase):
>          portid = self.dut_ports[0]
> 
>          # get the current rx statistic
> +        out = self.dut.send_expect("clear port stats all" , "testpmd> ")
>          out = self.dut.send_expect("show port stats %d" % portid,
> "testpmd> ")
>          cur_rxpkt = dts.regexp(out, "RX-packets: ([0-9]+)")
> 
> @@ -211,7 +205,60 @@ class TestDynamicConfig(TestCase):
>              # check the pakcet increasment
>              self.verify(int(cur_rxpkt) == int(
>                  pre_rxpkt) + 1, "2nd packet increasment error")
> +    def test_dynamic_config_broadcast(self):
> +        """
> +        Dynamic config disable promiscuous, send a broadcast packet
> +        dpdk will received packet and fwd by io model. send a general
> packet
> +        and dst mac not port mac, dpdk will not received packet.
> +        """
> +
> +        self.dut.send_expect("set promisc all off", "testpmd> ")
> +        self.dut.send_expect("set fwd io", "testpmd> ")
> +        self.dut.send_expect("clear port stats all", "testpmd> ")
> +
> +
> self.dynamic_config_send_packet(self.dut_ports[0],"ff:ff:ff:ff:ff:ff")
> +        out = self.dut.send_expect(
> +            "show port stats %d" % self.dut_ports[1], "testpmd> ")
> +
> +        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
> +        self.verify(int(cur_rxpkt) == 1, "1st packet increasment error")
> +
> +        self.dut.send_expect("clear port stats all", "testpmd> ")
> +
> +        self.dynamic_config_send_packet(self.dut_ports[0])
> +        out = self.dut.send_expect(
> +            "show port stats %d" % self.dut_ports[1], "testpmd> ")
> +
> +        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
> +        self.verify(int(cur_rxpkt) == 0, "2st packet increasment error")
> +
> +    def test_dynamic_config_allmulticast(self):
> +        """
> +        Dynamic config disable promiscuous,when dpdk enable multicast,
> send a
> +        mulicast packet, dpdk received this packet and fwd by io model.
> when dpdk
> +        disable multicast, dpdk not received this packet
> +        """
> +
> +        self.dut.send_expect("set promisc all off", "testpmd> ")
> +        self.dut.send_expect("set fwd io", "testpmd> ")
> +        self.dut.send_expect("clear port stats all", "testpmd> ")
> +        self.dut.send_expect("set allmulti all on", "testpmd> ")
> +
> self.dynamic_config_send_packet(self.dut_ports[0],"01:00:00:33:00:01")
> +        out = self.dut.send_expect(
> +            "show port stats %d" % self.dut_ports[1], "testpmd> ")
> +
> +        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
> +        self.verify(int(cur_rxpkt) == 1, "1st packet increasment error")
> +
> +        self.dut.send_expect("clear port stats all", "testpmd> ")
> +        self.dut.send_expect("set allmulti all off", "testpmd> ")
> +
> self.dynamic_config_send_packet(self.dut_ports[0],"01:00:00:33:00:01")
> +        out = self.dut.send_expect(
> +            "show port stats %d" % self.dut_ports[1], "testpmd> ")
> 
> +        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
> +        self.verify(int(cur_rxpkt) == 0, "2st packet increasment error")
> +
>      def test_dynamic_config_enable_promiscuous(self):
>          """
>          Dynamic config enable promiscuous test
> --
> 1.9.3

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

* Re: [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast test case
  2016-04-29 17:48   ` Liu, Yong
@ 2016-05-03  1:49     ` Xu, HuilongX
  2016-05-04 17:13       ` Liu, Yong
  0 siblings, 1 reply; 6+ messages in thread
From: Xu, HuilongX @ 2016-05-03  1:49 UTC (permalink / raw)
  To: Liu, Yong, dts

Please see my comments.

> -----Original Message-----
> From: Liu, Yong
> Sent: Saturday, April 30, 2016 1:48 AM
> To: Xu, HuilongX; dts@dpdk.org
> Cc: Xu, HuilongX
> Subject: RE: [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast
> test case
> 
> Thanks, one question below.
> 
> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong
> > Sent: Thursday, April 21, 2016 11:03 PM
> > To: dts@dpdk.org
> > Cc: Xu, HuilongX
> > Subject: [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast test
> > case
> >
> > Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> > ---
> >  tests/TestSuite_dynamic_config.py | 69
> ++++++++++++++++++++++++++++++++--
> > -----
> >  1 file changed, 58 insertions(+), 11 deletions(-)
> >
> > diff --git a/tests/TestSuite_dynamic_config.py
> > b/tests/TestSuite_dynamic_config.py
> > index ba740b1..380fa6d 100644
> > --- a/tests/TestSuite_dynamic_config.py
> > +++ b/tests/TestSuite_dynamic_config.py
> > @@ -1,6 +1,6 @@
> >  # BSD LICENSE
> >  #
> > -# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
> > +# Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
> >  # All rights reserved.
> >  #
> >  # Redistribution and use in source and binary forms, with or without
> > @@ -67,18 +67,12 @@ class TestDynamicConfig(TestCase):
> >          print self.dut_ports
> >
> >          # Verify that enough ports are available
> > -        if self.nic in ["fortville_eagle", "fortville_spirit",
> > "fortville_spirit_single"]:
> > -            self.verify(len(self.dut_ports) >= 2, "Insufficient
> ports")
> > -        else:
> > -            self.verify(len(self.dut_ports) >= 1, "Insufficient
> ports")
> > +        self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
> >
> >          # Prepare cores and ports
> >          cores = self.dut.get_core_list('1S/2C/2T')
> >          coreMask = dts.create_mask(cores)
> > -        if self.nic in ["fortville_eagle", "fortville_spirit",
> > "fortville_spirit_single"]:
> > -            portMask = dts.create_mask(self.dut_ports[:2])
> > -        else:
> > -            portMask = dts.create_mask([self.dut_ports[0]])
> > +        portMask = dts.create_mask(self.dut_ports[:2])
> 
> One question here, is this case must need two ports? Reduce port
> requirement is our long time strategy.
> It will benefit for some NIC which only one port available.
Huilong's comments:
   One port received a packet, and the packet info not any changed, then send this packet by itself.
   Some nic not support this scenario. Example Fortville nic.
> 
> >
> >          # launch app
> >          cmd = "./%s/build/app/test-pmd/testpmd -c %s -n 3 -- -i --
> rxpt=0
> > \
> > @@ -99,8 +93,7 @@ class TestDynamicConfig(TestCase):
> >          self.verify(cmp(ret.lower(), self.dest) == 0, "MAC address
> wrong")
> >          self.verify("Promiscuous mode: enabled" in out,
> >                      "wrong default promiscuous value")
> > -        if self.nic in ["fortville_eagle", "fortville_spirit",
> > "fortville_spirit_single"]:
> > -            self.dut.send_expect("start", "testpmd> ", 120)
> > +        self.dut.send_expect("start", "testpmd> ", 120)
> >
> >      def dynamic_config_send_packet(self, portid,
> > destMac="00:11:22:33:44:55"):
> >          """
> > @@ -129,6 +122,7 @@ class TestDynamicConfig(TestCase):
> >          portid = self.dut_ports[0]
> >
> >          # get the current rx statistic
> > +        out = self.dut.send_expect("clear port stats all" , "testpmd>
> ")
> >          out = self.dut.send_expect("show port stats %d" % portid,
> > "testpmd> ")
> >          cur_rxpkt = dts.regexp(out, "RX-packets: ([0-9]+)")
> >
> > @@ -211,7 +205,60 @@ class TestDynamicConfig(TestCase):
> >              # check the pakcet increasment
> >              self.verify(int(cur_rxpkt) == int(
> >                  pre_rxpkt) + 1, "2nd packet increasment error")
> > +    def test_dynamic_config_broadcast(self):
> > +        """
> > +        Dynamic config disable promiscuous, send a broadcast packet
> > +        dpdk will received packet and fwd by io model. send a general
> > packet
> > +        and dst mac not port mac, dpdk will not received packet.
> > +        """
> > +
> > +        self.dut.send_expect("set promisc all off", "testpmd> ")
> > +        self.dut.send_expect("set fwd io", "testpmd> ")
> > +        self.dut.send_expect("clear port stats all", "testpmd> ")
> > +
> > +
> > self.dynamic_config_send_packet(self.dut_ports[0],"ff:ff:ff:ff:ff:ff")
> > +        out = self.dut.send_expect(
> > +            "show port stats %d" % self.dut_ports[1], "testpmd> ")
> > +
> > +        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
> > +        self.verify(int(cur_rxpkt) == 1, "1st packet increasment
> error")
> > +
> > +        self.dut.send_expect("clear port stats all", "testpmd> ")
> > +
> > +        self.dynamic_config_send_packet(self.dut_ports[0])
> > +        out = self.dut.send_expect(
> > +            "show port stats %d" % self.dut_ports[1], "testpmd> ")
> > +
> > +        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
> > +        self.verify(int(cur_rxpkt) == 0, "2st packet increasment
> error")
> > +
> > +    def test_dynamic_config_allmulticast(self):
> > +        """
> > +        Dynamic config disable promiscuous,when dpdk enable multicast,
> > send a
> > +        mulicast packet, dpdk received this packet and fwd by io
> model.
> > when dpdk
> > +        disable multicast, dpdk not received this packet
> > +        """
> > +
> > +        self.dut.send_expect("set promisc all off", "testpmd> ")
> > +        self.dut.send_expect("set fwd io", "testpmd> ")
> > +        self.dut.send_expect("clear port stats all", "testpmd> ")
> > +        self.dut.send_expect("set allmulti all on", "testpmd> ")
> > +
> > self.dynamic_config_send_packet(self.dut_ports[0],"01:00:00:33:00:01")
> > +        out = self.dut.send_expect(
> > +            "show port stats %d" % self.dut_ports[1], "testpmd> ")
> > +
> > +        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
> > +        self.verify(int(cur_rxpkt) == 1, "1st packet increasment
> error")
> > +
> > +        self.dut.send_expect("clear port stats all", "testpmd> ")
> > +        self.dut.send_expect("set allmulti all off", "testpmd> ")
> > +
> > self.dynamic_config_send_packet(self.dut_ports[0],"01:00:00:33:00:01")
> > +        out = self.dut.send_expect(
> > +            "show port stats %d" % self.dut_ports[1], "testpmd> ")
> >
> > +        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
> > +        self.verify(int(cur_rxpkt) == 0, "2st packet increasment
> error")
> > +
> >      def test_dynamic_config_enable_promiscuous(self):
> >          """
> >          Dynamic config enable promiscuous test
> > --
> > 1.9.3

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

* Re: [dts] [PATCH V1][dts 1/2] add allmutlicast and broadcast test plan
  2016-04-22  6:02 [dts] [PATCH V1][dts 1/2] add allmutlicast and broadcast test plan xu,huilong
  2016-04-22  6:02 ` [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast test case xu,huilong
@ 2016-05-04 17:10 ` Liu, Yong
  1 sibling, 0 replies; 6+ messages in thread
From: Liu, Yong @ 2016-05-04 17:10 UTC (permalink / raw)
  To: Xu, HuilongX, dts; +Cc: Xu, HuilongX

Thanks, applied.

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong
> Sent: Thursday, April 21, 2016 11:03 PM
> To: dts@dpdk.org
> Cc: Xu, HuilongX
> Subject: [dts] [PATCH V1][dts 1/2] add allmutlicast and broadcast test
> plan
> 
> Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> ---
>  test_plans/dynamic_config_test_plan.rst | 57
> ++++++++++++++++++++++++++++++++-
>  1 file changed, 56 insertions(+), 1 deletion(-)
> 
> diff --git a/test_plans/dynamic_config_test_plan.rst
> b/test_plans/dynamic_config_test_plan.rst
> index f1dbd1b..93a0434 100644
> --- a/test_plans/dynamic_config_test_plan.rst
> +++ b/test_plans/dynamic_config_test_plan.rst
> @@ -1,4 +1,4 @@
> -.. Copyright (c) <2010, 2011>, Intel Corporation
> +.. Copyright (c) <2010, 2016>, Intel Corporation
>     All rights reserved.
> 
>     Redistribution and use in source and binary forms, with or without
> @@ -194,6 +194,61 @@ Send a packet with with destination MAC address equal
> with the port 8 address.::
> 
>  Verify that the packet was received (RX-packets incremented).
> 
> +Test Case: Disable Promiscuous Mode boardcast
> +===================================
> +
> +Disable promiscuous mode and verify that the packets are received
> boardcast packet.::
> +
> +  testpmd> set promisc all off
> +  testpmd> set fwd io
> +  testpmd> clear port stats all
> +Send a packet with destination MAC address different than the port 0
> address.::
> +
> +  testpmd> show port stats 1
> +
> +    ######################## NIC statistics for port 1
> ########################
> +    RX-packets: 0          RX-errors: 0         RX-bytes: 0
> +    TX-packets: 0          TX-errors: 0         TX-bytes: 0
> +
> ##########################################################################
> ##
> +
> +Verify that no packet was fwd (port 1 TX-packets is 0).
> +  testpmd> clear port stats all
> +Send a boardcast packet .::
> +
> +    ######################## NIC statistics for port 1
> ########################
> +    RX-packets: 0          RX-errors: 0         RX-bytes: 0
> +    TX-packets: 1          TX-errors: 0         TX-bytes: 80
> +
> ##########################################################################
> ##
> +
> +Verify that the packet was received and fwd(TX-packets is 1).
> 
> +Test Case: Disable Promiscuous Mode mutlicast
> +===================================
> +
> +Disable promiscuous mode and verify that the packets are received
> mutlicast packet.::
> +
> +  testpmd> set promisc all off
> +  testpmd> set fwd io
> +  testpmd> clear port stats all
> +  testpmd> set allmulti all off
> +Send a packet with destination MAC is mutlicast mac eg:
> 01:00:00:33:00:01.::
> +
> +  testpmd> show port stats 1
> +
> +    ######################## NIC statistics for port 1
> ########################
> +    RX-packets: 0          RX-errors: 0         RX-bytes: 0
> +    TX-packets: 0          TX-errors: 0         TX-bytes: 0
> +
> ##########################################################################
> ##
> +
> +Verify that no packet was fwd (port 1 TX-packets is 0).
> +  testpmd> clear port stats all
> +  testpmd> set allmulti all on
> +Send a packet with destination MAC is mutlicast mac eg:
> 01:00:00:33:00:01.::
> +
> +    ######################## NIC statistics for port 1
> ########################
> +    RX-packets: 0          RX-errors: 0         RX-bytes: 0
> +    TX-packets: 1          TX-errors: 0         TX-bytes: 80
> +
> ##########################################################################
> ##
> 
> +Verify that the packet was received and fwd(TX-packets is 1).
> 
> --
> 1.9.3

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

* Re: [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast test case
  2016-05-03  1:49     ` Xu, HuilongX
@ 2016-05-04 17:13       ` Liu, Yong
  0 siblings, 0 replies; 6+ messages in thread
From: Liu, Yong @ 2016-05-04 17:13 UTC (permalink / raw)
  To: Xu, HuilongX, dts

Thanks, please modify failure reason as requested.

> -----Original Message-----
> From: Xu, HuilongX
> Sent: Monday, May 02, 2016 6:49 PM
> To: Liu, Yong; dts@dpdk.org
> Subject: RE: [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast test
> case
> 
> Please see my comments.
> 
> > -----Original Message-----
> > From: Liu, Yong
> > Sent: Saturday, April 30, 2016 1:48 AM
> > To: Xu, HuilongX; dts@dpdk.org
> > Cc: Xu, HuilongX
> > Subject: RE: [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast
> > test case
> >
> > Thanks, one question below.
> >
> > > -----Original Message-----
> > > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of xu,huilong
> > > Sent: Thursday, April 21, 2016 11:03 PM
> > > To: dts@dpdk.org
> > > Cc: Xu, HuilongX
> > > Subject: [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast test
> > > case
> > >
> > > Signed-off-by: xu,huilong <huilongx.xu@intel.com>
> > > ---
> > >  tests/TestSuite_dynamic_config.py | 69
> > ++++++++++++++++++++++++++++++++--
> > > -----
> > >  1 file changed, 58 insertions(+), 11 deletions(-)
> > >
> > > diff --git a/tests/TestSuite_dynamic_config.py
> > > b/tests/TestSuite_dynamic_config.py
> > > index ba740b1..380fa6d 100644
> > > --- a/tests/TestSuite_dynamic_config.py
> > > +++ b/tests/TestSuite_dynamic_config.py
> > > @@ -1,6 +1,6 @@
> > >  # BSD LICENSE
> > >  #
> > > -# Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
> > > +# Copyright(c) 2010-2016 Intel Corporation. All rights reserved.
> > >  # All rights reserved.
> > >  #
> > >  # Redistribution and use in source and binary forms, with or without
> > > @@ -67,18 +67,12 @@ class TestDynamicConfig(TestCase):
> > >          print self.dut_ports
> > >
> > >          # Verify that enough ports are available
> > > -        if self.nic in ["fortville_eagle", "fortville_spirit",
> > > "fortville_spirit_single"]:
> > > -            self.verify(len(self.dut_ports) >= 2, "Insufficient
> > ports")
> > > -        else:
> > > -            self.verify(len(self.dut_ports) >= 1, "Insufficient
> > ports")
> > > +        self.verify(len(self.dut_ports) >= 2, "Insufficient ports")
> > >
> > >          # Prepare cores and ports
> > >          cores = self.dut.get_core_list('1S/2C/2T')
> > >          coreMask = dts.create_mask(cores)
> > > -        if self.nic in ["fortville_eagle", "fortville_spirit",
> > > "fortville_spirit_single"]:
> > > -            portMask = dts.create_mask(self.dut_ports[:2])
> > > -        else:
> > > -            portMask = dts.create_mask([self.dut_ports[0]])
> > > +        portMask = dts.create_mask(self.dut_ports[:2])
> >
> > One question here, is this case must need two ports? Reduce port
> > requirement is our long time strategy.
> > It will benefit for some NIC which only one port available.
> Huilong's comments:
>    One port received a packet, and the packet info not any changed, then
> send this packet by itself.
>    Some nic not support this scenario. Example Fortville nic.
> >
> > >
> > >          # launch app
> > >          cmd = "./%s/build/app/test-pmd/testpmd -c %s -n 3 -- -i --
> > rxpt=0
> > > \
> > > @@ -99,8 +93,7 @@ class TestDynamicConfig(TestCase):
> > >          self.verify(cmp(ret.lower(), self.dest) == 0, "MAC address
> > wrong")
> > >          self.verify("Promiscuous mode: enabled" in out,
> > >                      "wrong default promiscuous value")
> > > -        if self.nic in ["fortville_eagle", "fortville_spirit",
> > > "fortville_spirit_single"]:
> > > -            self.dut.send_expect("start", "testpmd> ", 120)
> > > +        self.dut.send_expect("start", "testpmd> ", 120)
> > >
> > >      def dynamic_config_send_packet(self, portid,
> > > destMac="00:11:22:33:44:55"):
> > >          """
> > > @@ -129,6 +122,7 @@ class TestDynamicConfig(TestCase):
> > >          portid = self.dut_ports[0]
> > >
> > >          # get the current rx statistic
> > > +        out = self.dut.send_expect("clear port stats all" , "testpmd>
> > ")
> > >          out = self.dut.send_expect("show port stats %d" % portid,
> > > "testpmd> ")
> > >          cur_rxpkt = dts.regexp(out, "RX-packets: ([0-9]+)")
> > >
> > > @@ -211,7 +205,60 @@ class TestDynamicConfig(TestCase):
> > >              # check the pakcet increasment
> > >              self.verify(int(cur_rxpkt) == int(
> > >                  pre_rxpkt) + 1, "2nd packet increasment error")
> > > +    def test_dynamic_config_broadcast(self):
> > > +        """
> > > +        Dynamic config disable promiscuous, send a broadcast packet
> > > +        dpdk will received packet and fwd by io model. send a general
> > > packet
> > > +        and dst mac not port mac, dpdk will not received packet.
> > > +        """
> > > +
> > > +        self.dut.send_expect("set promisc all off", "testpmd> ")
> > > +        self.dut.send_expect("set fwd io", "testpmd> ")
> > > +        self.dut.send_expect("clear port stats all", "testpmd> ")
> > > +
> > > +
> > > self.dynamic_config_send_packet(self.dut_ports[0],"ff:ff:ff:ff:ff:ff")
> > > +        out = self.dut.send_expect(
> > > +            "show port stats %d" % self.dut_ports[1], "testpmd> ")
> > > +
> > > +        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
> > > +        self.verify(int(cur_rxpkt) == 1, "1st packet increasment
> > error")
> > > +
> > > +        self.dut.send_expect("clear port stats all", "testpmd> ")
> > > +
> > > +        self.dynamic_config_send_packet(self.dut_ports[0])
> > > +        out = self.dut.send_expect(
> > > +            "show port stats %d" % self.dut_ports[1], "testpmd> ")
> > > +
> > > +        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
> > > +        self.verify(int(cur_rxpkt) == 0, "2st packet increasment
> > error")
> > > +
> > > +    def test_dynamic_config_allmulticast(self):
> > > +        """
> > > +        Dynamic config disable promiscuous,when dpdk enable multicast,
> > > send a
> > > +        mulicast packet, dpdk received this packet and fwd by io
> > model.
> > > when dpdk
> > > +        disable multicast, dpdk not received this packet
> > > +        """
> > > +
> > > +        self.dut.send_expect("set promisc all off", "testpmd> ")
> > > +        self.dut.send_expect("set fwd io", "testpmd> ")
> > > +        self.dut.send_expect("clear port stats all", "testpmd> ")
> > > +        self.dut.send_expect("set allmulti all on", "testpmd> ")
> > > +
> > > self.dynamic_config_send_packet(self.dut_ports[0],"01:00:00:33:00:01")
> > > +        out = self.dut.send_expect(
> > > +            "show port stats %d" % self.dut_ports[1], "testpmd> ")
> > > +
> > > +        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
> > > +        self.verify(int(cur_rxpkt) == 1, "1st packet increasment
> > error")

The failure reason is not very clear, please changed something like "Can't receive multicast packet as expected." 
> > > +
> > > +        self.dut.send_expect("clear port stats all", "testpmd> ")
> > > +        self.dut.send_expect("set allmulti all off", "testpmd> ")
> > > +
> > > self.dynamic_config_send_packet(self.dut_ports[0],"01:00:00:33:00:01")
> > > +        out = self.dut.send_expect(
> > > +            "show port stats %d" % self.dut_ports[1], "testpmd> ")
> > >
> > > +        cur_rxpkt = dts.regexp(out, "TX-packets: ([0-9]+)")
> > > +        self.verify(int(cur_rxpkt) == 0, "2st packet increasment
> > error")

The same as previous one.

> > > +
> > >      def test_dynamic_config_enable_promiscuous(self):
> > >          """
> > >          Dynamic config enable promiscuous test
> > > --
> > > 1.9.3

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

end of thread, other threads:[~2016-05-04 17:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-22  6:02 [dts] [PATCH V1][dts 1/2] add allmutlicast and broadcast test plan xu,huilong
2016-04-22  6:02 ` [dts] [PATCH V2][dts 2/2] add allmutlicast and broadcast test case xu,huilong
2016-04-29 17:48   ` Liu, Yong
2016-05-03  1:49     ` Xu, HuilongX
2016-05-04 17:13       ` Liu, Yong
2016-05-04 17:10 ` [dts] [PATCH V1][dts 1/2] add allmutlicast and broadcast test plan 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).