From: Rami Rosen <rami.rosen@huawei.com>
To: "dts@dpdk.org" <dts@dpdk.org>
Subject: [dts] [PATCH] tests/pmdrss: add support for RSS RETA test on Huawei hinic
Date: Wed, 10 Apr 2019 08:34:29 +0000 [thread overview]
Message-ID: <5151E1D101B7B04382075E3B0EF69373EA6383@lhreml503-mbs> (raw)
This patch adds support for RSS RETA test on Huawei hinic
Signed-off-by: Rami Rosen <ramirose@huawei.com>
---
| 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
--git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
index 89086c1..4a2bfd3 100644
--- a/tests/TestSuite_pmdrssreta.py
+++ b/tests/TestSuite_pmdrssreta.py
@@ -148,7 +148,9 @@ class TestPmdrssreta(TestCase):
i = 0
for tmp_reta_line in reta_lines:
status = "false"
- if(self.nic in ["niantic", "redrockcanyou", "atwood", "boulderrapid"]):
+ if(self.nic in ["hi1822"]):
+ hash_index = int(tmp_reta_line["RSS hash"], 16) % 256
+ elif (self.nic in ["niantic", "redrockcanyou", "atwood", "boulderrapid"]):
# compute the hash result of five tuple into the 7 LSBs value.
hash_index = int(tmp_reta_line["RSS hash"], 16) % 128
else:
@@ -221,7 +223,12 @@ class TestPmdrssreta(TestCase):
self.verify("error" not in out, "Configuration of RSS hash failed: Invalid argument")
# configure the reta with specific mappings.
- if(self.nic in ["niantic", "redrockcanyou", "atwood", "boulderrapid"]):
+ if(self.nic in ["hi1822"]):
+ for i in range(256):
+ reta_entries.insert(i, random.randint(0, queue - 1))
+ self.dut.send_expect(
+ "port config 0 rss reta (%d,%d)" % (i, reta_entries[i]), "testpmd> ")
+ elif (self.nic in ["niantic", "redrockcanyou", "atwood", "boulderrapid"]):
for i in range(128):
reta_entries.insert(i, random.randint(0, queue - 1))
self.dut.send_expect(
@@ -237,7 +244,7 @@ class TestPmdrssreta(TestCase):
self.dut.send_expect("quit", "# ", 30)
def test_rss_key_size(self):
- nic_rss_key_size = {"fortville_eagle": 52, "fortville_spirit": 52, "fortville_spirit_single": 52, "fortville_25g": 52, "niantic": 40, "e1000": 40, "redrockcanyou": 40, "atwood": 40, "boulderrapid": 40, "fortpark_TLV": 52}
+ nic_rss_key_size = {"fortville_eagle": 52, "fortville_spirit": 52, "fortville_spirit_single": 52, "fortville_25g": 52, "niantic": 40, "e1000": 40, "redrockcanyou": 40, "atwood": 40, "boulderrapid": 40, "fortpark_TLV": 52, "hi1822": 40}
self.verify(self.nic in nic_rss_key_size.keys(), "Not supporte rss key on %s" % self.nic)
dutPorts = self.dut.get_ports(self.nic)
--
2.17.1
next reply other threads:[~2019-04-10 8:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 8:34 Rami Rosen [this message]
2019-04-15 19:56 ` 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=5151E1D101B7B04382075E3B0EF69373EA6383@lhreml503-mbs \
--to=rami.rosen@huawei.com \
--cc=dts@dpdk.org \
/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).