From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4B9D2A04F1; Fri, 13 Dec 2019 12:26:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 006742C52; Fri, 13 Dec 2019 12:26:51 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 6BF812B93 for ; Fri, 13 Dec 2019 12:26:49 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xBDBKg47029060 for ; Fri, 13 Dec 2019 03:26:48 -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=pfpt0818; bh=9GPrCc71tOILdxkQCWVAO7CmxHG5TPyvDufGVNEq+QE=; b=AdL8zItpX+EAAJuEVWONigwx+yaKVZclohXQPcxy1Y/N0DXiYMFh/sq0UKnUogPlue1M hDeWnxImUdqQKWz9L6zBTMSEx4zK85TUZCG1MUvBNqNvOYCCGZjBStUOiZLHuPLQt2/Y tmbAoWd/xKl8noJTxNbR2McRlRj0uxlZN0rHC7amGUhUhoHsNyEPLtu+kERSZdG6yHQO 44vaQWtprhEwClOqakOx+TdF/1F0p3VQBUuLp78mHZbvZ5TfgH6P1z9OEQxQqIqVUWoh Ur3sxFFWvrqEvyMTBuwLBwZn9+hpFnrhHmA/EaAA38ks8DadOSjLnBFHg9O0B7YPUJ8E jw== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2wuegje5h7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 13 Dec 2019 03:26:48 -0800 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 13 Dec 2019 03:26:46 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 13 Dec 2019 03:26:46 -0800 Received: from localhost.marvell.com (unknown [10.28.10.195]) by maili.marvell.com (Postfix) with ESMTP id 1F9BF3F703F; Fri, 13 Dec 2019 03:26:45 -0800 (PST) From: To: CC: , Praneeth Reddy Date: Fri, 13 Dec 2019 16:56:43 +0530 Message-ID: <1576236403-24341-1-git-send-email-nareddy@marvell.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-13_03:2019-12-13,2019-12-13 signatures=0 Subject: [dts] [PATCH] TestSuite_pmdrssreta.py: Modified test case to support vector mode and made few changes for cavium_a063 and cavium_a064 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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: Praneeth Reddy - Sending 4 packets to support vector mode - For cavium_a063 and cavium_a064 rx-offloads parameter is required to support RSS hash - For cavium_a063 and cavium_a064 Hash value must be 32 bit Signed-off-by: Praneeth Reddy --- tests/TestSuite_pmdrssreta.py | 45 ++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/tests/TestSuite_pmdrssreta.py b/tests/TestSuite_pmdrssreta.py index a2f2d3e..0fddb17 100644 --- a/tests/TestSuite_pmdrssreta.py +++ b/tests/TestSuite_pmdrssreta.py @@ -63,42 +63,42 @@ class TestPmdrssreta(TestCase): # send packet with different source and dest ip if tran_type == "IPV4": for i in range(16): - packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")], iface="%s")' % ( + packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")], iface="%s", count=4)' % ( mac, i + 1, i + 2, itf) self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) elif tran_type == "IPV4&TCP": for i in range(16): - packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")/TCP(sport=1024,dport=1024)], iface="%s")' % ( + packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")/TCP(sport=1024,dport=1024)], iface="%s", count=4)' % ( mac, i + 1, i + 2, itf) self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) elif tran_type == "IPV4&UDP": for i in range(16): - packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")/UDP(sport=1024,dport=1024)], iface="%s")' % ( + packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IP(src="192.168.0.%d", dst="192.168.0.%d")/UDP(sport=1024,dport=1024)], iface="%s", count=4)' % ( mac, i + 1, i + 2, itf) self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) elif tran_type == "IPV6": for i in range(16): - packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")], iface="%s")' % ( + packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")], iface="%s", count=4)' % ( mac, i + 1, i + 2, itf) self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) elif tran_type == "IPV6&TCP": for i in range(16): - packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/TCP(sport=1024,dport=1024)], iface="%s")' % ( + packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/TCP(sport=1024,dport=1024)], iface="%s", count=4)' % ( mac, i + 1, i + 2, itf) self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) elif tran_type == "IPV6&UDP": for i in range(16): - packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1024)], iface="%s")' % ( + packet = r'sendp([Ether(dst="%s", src="02:00:00:00:00:00")/IPv6(src="3ffe:2501:200:1fff::%d", dst="3ffe:2501:200:3::%d")/UDP(sport=1024,dport=1024)], iface="%s", count=4)' % ( mac, i + 1, i + 2, itf) self.tester.scapy_append(packet) self.tester.scapy_execute() @@ -119,17 +119,13 @@ class TestPmdrssreta(TestCase): if(item.startswith("RSS hash")): name, value = item.split("=", 1) print name + "-" + value + reta_line[name.strip()] = value.strip() + + elif(item.startswith("RSS queue")): + name, value = item.split("=", 1) + reta_line["queue"] = int(value.strip(),16) - reta_line[name.strip()] = value.strip() reta_lines.append(reta_line) - reta_line = {} - elif len(line) != 0 and line.strip().startswith("port "): - rexp = r"port (\d)/queue (\d{1,2}): received (\d) packets" - m = re.match(rexp, line.strip()) - if m: - reta_line["port"] = m.group(1) - reta_line["queue"] = m.group(2) - elif len(line) != 0 and line.startswith("stop"): break else: pass @@ -153,6 +149,7 @@ class TestPmdrssreta(TestCase): # 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: @@ -215,12 +212,20 @@ class TestPmdrssreta(TestCase): # test with different rss queues for queue in testQueues: - if(queue == 16): - self.pmdout.start_testpmd( - "all", "--rxq=%d --txq=%d" % (queue, queue), socket=self.ports_socket) + if(self.nic in ["cavium_a063", "cavium_a064"]): + if(queue == 16): + self.pmdout.start_testpmd( + "all", "--rxq=%d --txq=%d --rx-offloads=0x00080000" % (queue, queue), socket=self.ports_socket) + else: + self.pmdout.start_testpmd( + "all", "--mbcache=128 --rxq=%d --txq=%d --rx-offloads=0x00080000" % (queue, queue), socket=self.ports_socket) else: - self.pmdout.start_testpmd( - "all", "--mbcache=128 --rxq=%d --txq=%d" % (queue, queue), socket=self.ports_socket) + if(queue == 16): + self.pmdout.start_testpmd( + "all", "--rxq=%d --txq=%d" % (queue, queue), socket=self.ports_socket) + else: + self.pmdout.start_testpmd( + "all", "--mbcache=128 --rxq=%d --txq=%d" % (queue, queue), socket=self.ports_socket) for iptype, rsstype in iptypes.items(): self.dut.send_expect("set verbose 8", "testpmd> ") -- 1.8.3.1