* [dts] [PATCH] TestSuite_pmdrssreta.py:Added hash_index calucation & rss key-size for cavium_a063.
@ 2019-04-23 9:56 thaq
2019-04-23 20:48 ` Tu, Lijuan
0 siblings, 1 reply; 2+ messages in thread
From: thaq @ 2019-04-23 9:56 UTC (permalink / raw)
To: dts; +Cc: fmasood, avijay, Thanseerulhaq
From: Thanseerulhaq <thaq@marvell.com>
Added hash_index calucation for cavium_a063 adaptor which use simple_xor algo.
Added rss key-size for cavium_a063 adaptor as 48.
Signed-off-by: Thanseerulhaq <thaq@marvell.com>
---
| 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
--git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
index 4a2bfd3..03c54a2 100644
--- a/tests/TestSuite_pmdrssreta.py
+++ b/tests/TestSuite_pmdrssreta.py
@@ -37,6 +37,7 @@ import time
import random
import re
import utils
+import textwrap
testQueues = [2, 9, 16]
reta_entries = []
reta_lines = []
@@ -148,7 +149,16 @@ class TestPmdrssreta(TestCase):
i = 0
for tmp_reta_line in reta_lines:
status = "false"
- if(self.nic in ["hi1822"]):
+ if(self.nic in ["cavium_a063"]):
+ # compute the hash result using simple XOR.
+ hash_index_tmp = 0
+ index_tmp = tmp_reta_line["RSS hash"].strip("0x")
+ index_tmp = textwrap.wrap(index_tmp,2)
+ index_tmp = [hex(int(index,16)) for index in index_tmp]
+ for index in index_tmp:
+ hash_index_tmp = eval(str(hash_index_tmp)+'^'+index)
+ hash_index = int(hash_index_tmp) % 64
+ elif(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.
@@ -223,7 +233,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 ["hi1822"]):
+ if(self.nic in ["cavium_a063"]):
+ for i in range(64):
+ 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 ["hi1822"]):
for i in range(256):
reta_entries.insert(i, random.randint(0, queue - 1))
self.dut.send_expect(
@@ -244,7 +259,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, "hi1822": 40}
+ 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, "cavium_a063": 48}
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)
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH] TestSuite_pmdrssreta.py:Added hash_index calucation & rss key-size for cavium_a063.
2019-04-23 9:56 [dts] [PATCH] TestSuite_pmdrssreta.py:Added hash_index calucation & rss key-size for cavium_a063 thaq
@ 2019-04-23 20:48 ` Tu, Lijuan
0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2019-04-23 20:48 UTC (permalink / raw)
To: thaq, dts; +Cc: fmasood, avijay
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of thaq@marvell.com
> Sent: Tuesday, April 23, 2019 2:57 AM
> To: dts@dpdk.org
> Cc: fmasood@marvell.com; avijay@marvell.com; Thanseerulhaq
> <thaq@marvell.com>
> Subject: [dts] [PATCH] TestSuite_pmdrssreta.py:Added hash_index calucation
> & rss key-size for cavium_a063.
>
> From: Thanseerulhaq <thaq@marvell.com>
>
> Added hash_index calucation for cavium_a063 adaptor which use
> simple_xor algo.
> Added rss key-size for cavium_a063 adaptor as 48.
>
> Signed-off-by: Thanseerulhaq <thaq@marvell.com>
> ---
> tests/TestSuite_pmdrssreta.py | 21 ++++++++++++++++++---
> 1 file changed, 18 insertions(+), 3 deletions(-)
>
> diff --git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
> index 4a2bfd3..03c54a2 100644
> --- a/tests/TestSuite_pmdrssreta.py
> +++ b/tests/TestSuite_pmdrssreta.py
> @@ -37,6 +37,7 @@ import time
> import random
> import re
> import utils
> +import textwrap
> testQueues = [2, 9, 16]
> reta_entries = []
> reta_lines = []
> @@ -148,7 +149,16 @@ class TestPmdrssreta(TestCase):
> i = 0
> for tmp_reta_line in reta_lines:
> status = "false"
> - if(self.nic in ["hi1822"]):
> + if(self.nic in ["cavium_a063"]):
> + # compute the hash result using simple XOR.
> + hash_index_tmp = 0
> + index_tmp = tmp_reta_line["RSS hash"].strip("0x")
> + index_tmp = textwrap.wrap(index_tmp,2)
> + index_tmp = [hex(int(index,16)) for index in index_tmp]
> + for index in index_tmp:
> + hash_index_tmp = eval(str(hash_index_tmp)+'^'+index)
> + hash_index = int(hash_index_tmp) % 64
> + elif(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.
> @@ -223,7 +233,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 ["hi1822"]):
> + if(self.nic in ["cavium_a063"]):
> + for i in range(64):
> + 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 ["hi1822"]):
> for i in range(256):
> reta_entries.insert(i, random.randint(0, queue - 1))
> self.dut.send_expect( @@ -244,7 +259,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,
> "hi1822": 40}
> + 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, "cavium_a063": 48}
> 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)
> --
> 1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-23 20:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-23 9:56 [dts] [PATCH] TestSuite_pmdrssreta.py:Added hash_index calucation & rss key-size for cavium_a063 thaq
2019-04-23 20:48 ` 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).