test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] tests/TestSuite_pmdrssreta.py:Updated the New hash index calcualtion for cavium_nic
@ 2021-01-11  9:36 usurekha
  2021-01-13  7:57 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: usurekha @ 2021-01-11  9:36 UTC (permalink / raw)
  To: dts; +Cc: pvukkisala, zzhou, usurekha

From: usurekha <usurekha@marvell.com>

Signed-off-by: usurekha <usurekha@marvell.com>
---
 tests/TestSuite_pmdrssreta.py | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py
index 25c8074..4dd3a5a 100644
--- a/tests/TestSuite_pmdrssreta.py
+++ b/tests/TestSuite_pmdrssreta.py
@@ -150,15 +150,8 @@ class TestPmdrssreta(TestCase):
         for tmp_reta_line in reta_lines:
             status = "false"
             if(self.nic in ["cavium_a063", "cavium_a064"]):
-                # compute the hash result using simple XOR.
-                hash_index_tmp = 0
-                index_tmp = tmp_reta_line["RSS hash"].strip("0x")
-                index_tmp = index_tmp.zfill(8)
-                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
+                # compute the hash index calculation
+                hash_index = int(tmp_reta_line["RSS hash"], 16) % 64
             elif(self.nic in ["hi1822"]):
                 hash_index = int(tmp_reta_line["RSS hash"], 16) % 256
             elif (self.nic in ["niantic", "redrockcanyou", "atwood", "boulderrapid", "foxville", "twinpond"]):
-- 
2.7.4


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

* Re: [dts] [PATCH] tests/TestSuite_pmdrssreta.py:Updated the New hash index calcualtion for cavium_nic
  2021-01-11  9:36 [dts] [PATCH] tests/TestSuite_pmdrssreta.py:Updated the New hash index calcualtion for cavium_nic usurekha
@ 2021-01-13  7:57 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2021-01-13  7:57 UTC (permalink / raw)
  To: usurekha, dts; +Cc: pvukkisala, zzhou

> Subject: [dts] [PATCH] tests/TestSuite_pmdrssreta.py:Updated the New hash
> index calcualtion for cavium_nic
> 
> From: usurekha <usurekha@marvell.com>
> 
> Signed-off-by: usurekha <usurekha@marvell.com>

Applied, but changed the subject to "tests/pmdrssreta: updated the New hash index calcualtion for cavium_nic"

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

end of thread, other threads:[~2021-01-13  7:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11  9:36 [dts] [PATCH] tests/TestSuite_pmdrssreta.py:Updated the New hash index calcualtion for cavium_nic usurekha
2021-01-13  7:57 ` Tu, Lijuan

test suite reviews and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ http://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git