From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 50040A04B5; Mon, 11 Jan 2021 10:48:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 40F6E140CC4; Mon, 11 Jan 2021 10:48:41 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id C352A140CB8 for ; Mon, 11 Jan 2021 10:48:39 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 10B9VCli011391 for ; Mon, 11 Jan 2021 01:48:38 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0220; bh=kaT09CGGNhTP+8RgtUcBSV0FkDOHGPHnY8adwZU7aZU=; b=VO9M+RajXBui4KqlWdK8UcUrmBxYxvmf02fGoaleAR8kdJep53g0QTvp6diE3XDidtBL 6OCAv8nWfA0PtLK3/JozbUz8x7ELVAHCnC3PaQKc0s0JW9XQyAoyLjALd+mYkYFconkp Q2CEEP5j93V5/sCdcfWZxjNvU6qz0pOJQHRH05qAcJGB031QsA6/ELjKrWXObKZxmy/A lLvilmlhgxqlST381rmgCvO4G4kmUlxUc8cXDp2wiCm2DakGgrkaSRdWQikBl8h3s70N rrNp20oQMZ/djpEgG5PRPh7/a32ds98UiInM9hEMI8L3yEPd0uIgl7nX4Vze+hSbOKVr kA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com with ESMTP id 35yaqskt52-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 11 Jan 2021 01:48:38 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 11 Jan 2021 01:48:37 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Mon, 11 Jan 2021 01:48:37 -0800 Received: from cavium.marvell.com (unknown [10.28.8.64]) by maili.marvell.com (Postfix) with ESMTP id 0E7933F7040; Mon, 11 Jan 2021 01:48:35 -0800 (PST) From: To: CC: , , usurekha Date: Mon, 11 Jan 2021 15:06:59 +0530 Message-ID: <1610357819-18089-1-git-send-email-usurekha@marvell.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343, 18.0.737 definitions=2021-01-09_13:2021-01-07, 2021-01-09 signatures=0 Subject: [dts] [PATCH] tests/TestSuite_pmdrssreta.py:Updated the New hash index calcualtion for cavium_nic X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" From: usurekha Signed-off-by: usurekha --- 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