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 D41C7A09E4; Thu, 28 Jan 2021 09:01:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CA9104068A; Thu, 28 Jan 2021 09:01:34 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 8BCCE4067A for ; Thu, 28 Jan 2021 09:01:33 +0100 (CET) IronPort-SDR: +rnlmX92ErRU4oRr+jBWnCXyYyckMHNcJpT33KLl8Gn0BjnS4hoGljWH0EDlj8GKQMdkbG/4EZ YwoBA5UxQypQ== X-IronPort-AV: E=McAfee;i="6000,8403,9877"; a="180273269" X-IronPort-AV: E=Sophos;i="5.79,381,1602572400"; d="scan'208";a="180273269" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2021 00:01:32 -0800 IronPort-SDR: V8aMNn3CrhU/FSXgxpTU98i7ApHjPhm33Z+6kyzMtfNKx/ikLcIrnsQBRy5d56M2heHax5rkTu JGkXdknpiGZw== X-IronPort-AV: E=Sophos;i="5.79,381,1602572400"; d="scan'208";a="354091225" Received: from unknown (HELO dpdk-huangzm-d.sh.intel.com) ([10.240.183.72]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2021 00:01:30 -0800 From: Hailin Xu To: dts@dpdk.org Cc: Hailin Xu Date: Thu, 28 Jan 2021 15:51:13 +0800 Message-Id: <1611820273-69268-1-git-send-email-hailinx.xu@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH v1] tests/kernelpf_iavf:align with dpdk rss code 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" iavf/i40evf: Default RSS should be overwritten but not append after. --- tests/TestSuite_kernelpf_iavf.py | 35 +++++++++++--------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/tests/TestSuite_kernelpf_iavf.py b/tests/TestSuite_kernelpf_iavf.py index 2fed9b7f..1dcbc685 100644 --- a/tests/TestSuite_kernelpf_iavf.py +++ b/tests/TestSuite_kernelpf_iavf.py @@ -631,31 +631,20 @@ class TestKernelpfIavf(TestCase): self.verify(rx_err == 1 or tx_pkts == -1, "Packet drop assert error") def test_vf_rss(self): + rss_type = ["ip", "tcp", "udp"] self.vm_testpmd.start_testpmd("all", "--txq=4 --rxq=4") self.vm_testpmd.execute_cmd("set fwd mac") self.vm_testpmd.execute_cmd("set verbose 1") for i, j in zip(list(range(64)), [0, 1, 2, 3]*16): self.vm_testpmd.execute_cmd("port config 0 rss reta (%d,%d)" % (i, j)) - self.vm_testpmd.execute_cmd("port config all rss ip") - self.vm_testpmd.execute_cmd("port config all rss tcp") - self.vm_testpmd.execute_cmd("port config all rss udp") - self.vm_testpmd.execute_cmd("start") - self.send_packet(self.tester_intf, 'IPV4') - time.sleep(2) - out = self.vm_dut.get_session_output() - self.verify_packet_number(out) - - self.vm_testpmd.execute_cmd("clear port stats all") - self.send_packet(self.tester_intf, 'IPV4&TCP') - time.sleep(2) - out = self.vm_dut.get_session_output() - self.verify_packet_number(out) - - self.vm_testpmd.execute_cmd("clear port stats all") - self.send_packet(self.tester_intf, 'IPV4&UDP') - time.sleep(2) - out = self.vm_dut.get_session_output() - self.verify_packet_number(out) + for type in rss_type: + self.vm_testpmd.execute_cmd("port config all rss %s" % type) + self.vm_testpmd.execute_cmd("start") + self.send_packet(self.tester_intf, 'IPV4&%s' % type) + time.sleep(1) + out = self.vm_dut.get_session_output() + self.verify_packet_number(out) + self.vm_testpmd.execute_cmd("clear port stats all") def verify_packet_number(self, out): queue0_number = len(re.findall('port 0/queue 0', out)) @@ -672,21 +661,21 @@ class TestKernelpfIavf(TestCase): """ mac = self.vf_mac # send packet with different source and dest ip - if tran_type == "IPV4": + if tran_type == "IPV4&ip": for i in range(30): 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")' % (mac, i + 1, i + 2, itf) self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) - elif tran_type == "IPV4&TCP": + elif tran_type == "IPV4&tcp": for i in range(30): 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")' % (mac, i + 1, i + 2, itf) self.tester.scapy_append(packet) self.tester.scapy_execute() time.sleep(.5) - elif tran_type == "IPV4&UDP": + elif tran_type == "IPV4&udp": for i in range(30): 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")' % (mac, i + 1, i + 2, itf) -- 2.17.1