test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] generic_filter: Added rte_flows api to create ethertype filter rule for cavium_a063.
@ 2019-04-17  4:52 usurekha
  2019-04-18 23:36 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: usurekha @ 2019-04-17  4:52 UTC (permalink / raw)
  To: dts; +Cc: fmasood, usurekha

From: usurekha <usurekha@marvell.com>

Added rte_flows api to create ethertype filter rule,
as cavium_a063 won't support default Intel specific filters.

Signed-off-by: usurekha <usurekha@marvell.com>
---
 tests/TestSuite_generic_filter.py | 28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

diff --git a/tests/TestSuite_generic_filter.py b/tests/TestSuite_generic_filter.py
index d2793ab..e7f480b 100644
--- a/tests/TestSuite_generic_filter.py
+++ b/tests/TestSuite_generic_filter.py
@@ -372,15 +372,21 @@ class TestGeneric_filter(TestCase):
 
         self.verify(self.nic in ["niantic", "kawela_4", "bartonhills", 
                            "powerville", "fortville_eagle", "fortville_spirit",
-                           "fortville_spirit_single", "fortpark_TLV", "fortville_25g"], "%s nic not support syn filter" % self.nic)
+                           "fortville_spirit_single", "fortpark_TLV", "fortville_25g","cavium_a063"], "%s nic not support syn filter" % self.nic)
         self.pmdout.start_testpmd(
             "%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1" % portMask)
         self.port_config()
         self.ethertype_filter = "on"
         ethertype = "0x0806"
-        self.dut.send_expect(
-            "ethertype_filter %s add mac_ignr 00:00:00:00:00:00 ethertype %s fwd queue 2" %
-            (valports[0], ethertype), "testpmd> ")
+
+        if self.nic == "cavium_a063":
+            self.dut.send_expect(
+                "flow create %s ingress pattern eth type is %s / end actions queue index 2 / end"%
+                (valports[0], ethertype), "testpmd> ")
+        else:
+            self.dut.send_expect(
+                "ethertype_filter %s add mac_ignr 00:00:00:00:00:00 ethertype %s fwd queue 2" %
+                (valports[0], ethertype), "testpmd> ")
         self.dut.send_expect("start", "testpmd> ", 120)
 
         self.filter_send_packet("arp")
@@ -396,10 +402,12 @@ class TestGeneric_filter(TestCase):
             out = self.dut.send_expect("stop", "testpmd> ")
             self.dut.send_expect("clear port stats all", "testpmd> ")
             self.verify_result(out, tx_pkts="1", expect_queue="2")
-
-        self.dut.send_expect(
-            "ethertype_filter %s del mac_ignr 00:00:00:00:00:00 ethertype %s fwd queue 2" %
-            (valports[0], ethertype), "testpmd> ")
+        if self.nic == "cavium_a063":
+            self.dut.send_expect("flow flush %s" % (valports[0]), "testpmd> ")
+        else:
+            self.dut.send_expect(
+                "ethertype_filter %s del mac_ignr 00:00:00:00:00:00 ethertype %s fwd queue 2" %
+                (valports[0], ethertype), "testpmd> ")
         self.dut.send_expect("start", "testpmd> ", 120)
         self.filter_send_packet("arp")
         time.sleep(2)
@@ -493,7 +501,7 @@ class TestGeneric_filter(TestCase):
 
     def test_twotuple_filter(self):
 
-        if self.nic in ["powerville", "bartonhills"]:
+        if self.nic in ["powerville", "bartonhills", "cavium_a063"]:
             self.pmdout.start_testpmd(
                 "%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-cores=4 --nb-ports=1" % portMask)
             self.port_config()
@@ -526,7 +534,7 @@ class TestGeneric_filter(TestCase):
             self.verify(False, "%s nic not support two tuple filter" % self.nic)
 
     def test_flex_filter(self):
-        self.verify(self.nic in ["powerville", "bartonhills"], '%s not support flex filter' % self.nic)
+        self.verify(self.nic in ["powerville", "bartonhills", "cavium_a063"], '%s not support flex filter' % self.nic)
 
         masks = ['000C', '000C']
         self.pmdout.start_testpmd(
-- 
2.7.4


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

* Re: [dts] [PATCH] generic_filter: Added rte_flows api to create ethertype filter rule for cavium_a063.
  2019-04-17  4:52 [dts] [PATCH] generic_filter: Added rte_flows api to create ethertype filter rule for cavium_a063 usurekha
@ 2019-04-18 23:36 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2019-04-18 23:36 UTC (permalink / raw)
  To: usurekha, dts; +Cc: fmasood

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of
> usurekha@marvell.com
> Sent: Tuesday, April 16, 2019 9:52 PM
> To: dts@dpdk.org
> Cc: fmasood@marvell.com; usurekha <usurekha@marvell.com>
> Subject: [dts] [PATCH] generic_filter: Added rte_flows api to create ethertype
> filter rule for cavium_a063.
> 
> From: usurekha <usurekha@marvell.com>
> 
> Added rte_flows api to create ethertype filter rule, as cavium_a063 won't
> support default Intel specific filters.
> 
> Signed-off-by: usurekha <usurekha@marvell.com>
> ---
>  tests/TestSuite_generic_filter.py | 28 ++++++++++++++++++----------
>  1 file changed, 18 insertions(+), 10 deletions(-)
> 
> diff --git a/tests/TestSuite_generic_filter.py
> b/tests/TestSuite_generic_filter.py
> index d2793ab..e7f480b 100644
> --- a/tests/TestSuite_generic_filter.py
> +++ b/tests/TestSuite_generic_filter.py
> @@ -372,15 +372,21 @@ class TestGeneric_filter(TestCase):
> 
>          self.verify(self.nic in ["niantic", "kawela_4", "bartonhills",
>                             "powerville", "fortville_eagle", "fortville_spirit",
> -                           "fortville_spirit_single", "fortpark_TLV", "fortville_25g"], "%s
> nic not support syn filter" % self.nic)
> +                           "fortville_spirit_single", "fortpark_TLV",
> + "fortville_25g","cavium_a063"], "%s nic not support syn filter" %
> + self.nic)
>          self.pmdout.start_testpmd(
>              "%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-
> cores=4 --nb-ports=1" % portMask)
>          self.port_config()
>          self.ethertype_filter = "on"
>          ethertype = "0x0806"
> -        self.dut.send_expect(
> -            "ethertype_filter %s add mac_ignr 00:00:00:00:00:00 ethertype %s
> fwd queue 2" %
> -            (valports[0], ethertype), "testpmd> ")
> +
> +        if self.nic == "cavium_a063":
> +            self.dut.send_expect(
> +                "flow create %s ingress pattern eth type is %s / end actions queue
> index 2 / end"%
> +                (valports[0], ethertype), "testpmd> ")
> +        else:
> +            self.dut.send_expect(
> +                "ethertype_filter %s add mac_ignr 00:00:00:00:00:00 ethertype %s
> fwd queue 2" %
> +                (valports[0], ethertype), "testpmd> ")
>          self.dut.send_expect("start", "testpmd> ", 120)
> 
>          self.filter_send_packet("arp")
> @@ -396,10 +402,12 @@ class TestGeneric_filter(TestCase):
>              out = self.dut.send_expect("stop", "testpmd> ")
>              self.dut.send_expect("clear port stats all", "testpmd> ")
>              self.verify_result(out, tx_pkts="1", expect_queue="2")
> -
> -        self.dut.send_expect(
> -            "ethertype_filter %s del mac_ignr 00:00:00:00:00:00 ethertype %s fwd
> queue 2" %
> -            (valports[0], ethertype), "testpmd> ")
> +        if self.nic == "cavium_a063":
> +            self.dut.send_expect("flow flush %s" % (valports[0]), "testpmd> ")
> +        else:
> +            self.dut.send_expect(
> +                "ethertype_filter %s del mac_ignr 00:00:00:00:00:00 ethertype %s
> fwd queue 2" %
> +                (valports[0], ethertype), "testpmd> ")
>          self.dut.send_expect("start", "testpmd> ", 120)
>          self.filter_send_packet("arp")
>          time.sleep(2)
> @@ -493,7 +501,7 @@ class TestGeneric_filter(TestCase):
> 
>      def test_twotuple_filter(self):
> 
> -        if self.nic in ["powerville", "bartonhills"]:
> +        if self.nic in ["powerville", "bartonhills", "cavium_a063"]:
>              self.pmdout.start_testpmd(
>                  "%s" % self.cores, "--disable-rss --rxq=4 --txq=4 --portmask=%s --nb-
> cores=4 --nb-ports=1" % portMask)
>              self.port_config()
> @@ -526,7 +534,7 @@ class TestGeneric_filter(TestCase):
>              self.verify(False, "%s nic not support two tuple filter" % self.nic)
> 
>      def test_flex_filter(self):
> -        self.verify(self.nic in ["powerville", "bartonhills"], '%s not support flex
> filter' % self.nic)
> +        self.verify(self.nic in ["powerville", "bartonhills",
> + "cavium_a063"], '%s not support flex filter' % self.nic)
> 
>          masks = ['000C', '000C']
>          self.pmdout.start_testpmd(
> --
> 2.7.4


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

end of thread, other threads:[~2019-04-18 23:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-17  4:52 [dts] [PATCH] generic_filter: Added rte_flows api to create ethertype filter rule for cavium_a063 usurekha
2019-04-18 23:36 ` Tu, Lijuan

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