From: <usurekha@marvell.com>
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.
Date: Wed, 17 Apr 2019 10:22:26 +0530 [thread overview]
Message-ID: <1555476746-28209-1-git-send-email-usurekha@marvell.com> (raw)
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
next reply other threads:[~2019-04-17 4:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-17 4:52 usurekha [this message]
2019-04-18 23:36 ` Tu, Lijuan
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=1555476746-28209-1-git-send-email-usurekha@marvell.com \
--to=usurekha@marvell.com \
--cc=dts@dpdk.org \
--cc=fmasood@marvell.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).