test suite reviews and discussions
 help / color / mirror / Atom feed
From: <usurekha@marvell.com>
To: <dts@dpdk.org>
Cc: <pvukkisala@marvell.com>, <zzhou@marvell.com>,
	usurekha <usurekha@marvell.com>
Subject: [dts] [PATCH] tests/TestSuite_pmdrssreta.py:Updated the New hash index calcualtion for cavium_nic
Date: Mon, 11 Jan 2021 15:06:59 +0530
Message-ID: <1610357819-18089-1-git-send-email-usurekha@marvell.com> (raw)

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


             reply	other threads:[~2021-01-11  9:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-11  9:36 usurekha [this message]
2021-01-13  7:57 ` 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=1610357819-18089-1-git-send-email-usurekha@marvell.com \
    --to=usurekha@marvell.com \
    --cc=dts@dpdk.org \
    --cc=pvukkisala@marvell.com \
    --cc=zzhou@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

test suite reviews and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://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/ https://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