From patchwork Tue Jul 19 14:12:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 114041 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0E09AA00C5; Tue, 19 Jul 2022 08:12:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CCB4C40698; Tue, 19 Jul 2022 08:12:29 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id B68B6400D4 for ; Tue, 19 Jul 2022 08:12:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658211148; x=1689747148; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=e4/fg90z1EmaxcQrdNctAwLcVT9SUg3ruPNs1TuIC24=; b=iWlBUQ6Fj+3wFZ4bEMEseSvKdPEi3qA81xdBwSo372sJnF5VObrELlkb 9ZZB/96fnCpnXRY2qLXdY35hB/wCWH7KNd4KU4qLaFv3ZuktmzXK8jHqb gsuYHYFV+pXJvUy2clZEXVSfoPBOgA5svYr1tiqGh3T0x1iBr71d0oiuU gz1Us/LOtQZd4SMzocWOh8a0PTf8hvW+h2h8R6NbyJ/ig+N+7awLV7n+R 6Vj027o7rRbEofq37q69XTLnRGHOgQNTLtrIguupyNSA0Yy0likU+A4zf 6AbICDA+ke0cgBC56yWVijRNSWgfIHOOZmJr5FXJXB9r5RiYaV7pH35ok Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10412"; a="285158830" X-IronPort-AV: E=Sophos;i="5.92,283,1650956400"; d="scan'208";a="285158830" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 23:12:18 -0700 X-IronPort-AV: E=Sophos;i="5.92,283,1650956400"; d="scan'208";a="665299201" Received: from unknown (HELO localhost.localdomain) ([10.239.252.20]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 23:12:17 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V2] tests/vf_pf_reset: modify case to support ice nic and disable ipv6 Date: Tue, 19 Jul 2022 14:12:47 +0000 Message-Id: <20220719141247.2164468-1-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 1. ice nic support test_vlan_tx_restore, modify script to support it. 2. disable IPv6, eliminate the impact of IPv6 packages. Signed-off-by: Jiale Song --- conf/test_case_checklist.json | 3 +-- framework/crb.py | 11 ++++++++--- test_plans/vf_pf_reset_test_plan.rst | 4 ++++ tests/TestSuite_vf_pf_reset.py | 13 +++++++++++-- 4 files changed, 24 insertions(+), 7 deletions(-) diff --git a/conf/test_case_checklist.json b/conf/test_case_checklist.json index 5d166cb2..f4e53236 100644 --- a/conf/test_case_checklist.json +++ b/conf/test_case_checklist.json @@ -3768,8 +3768,7 @@ "ALL" ], "NIC": [ - "ICE_25G-E810C_SFP", - "ICE_100G-E810C_QSFP" + "" ], "Target": [ "ALL" diff --git a/framework/crb.py b/framework/crb.py index 5ce4e2c9..83ded420 100644 --- a/framework/crb.py +++ b/framework/crb.py @@ -496,7 +496,7 @@ class Crb(object): return match[0] - def disable_ipv6(self, intf): + def disable_ipv6(self, intf="all"): """ Disable ipv6 of of specified interface """ @@ -504,8 +504,11 @@ class Crb(object): self.send_expect( "sysctl net.ipv6.conf.%s.disable_ipv6=1" % intf, "# ", alt_session=True ) + self.send_expect( + "sysctl net.ipv6.conf.default.disable_ipv6 = 1", "# ", alt_session=True + ) - def enable_ipv6(self, intf): + def enable_ipv6(self, intf="all"): """ Enable ipv6 of of specified interface """ @@ -513,7 +516,9 @@ class Crb(object): self.send_expect( "sysctl net.ipv6.conf.%s.disable_ipv6=0" % intf, "# ", alt_session=True ) - + self.send_expect( + "sysctl net.ipv6.conf.default.disable_ipv6 = 1", "# ", alt_session=True + ) out = self.send_expect("ifconfig %s" % intf, "# ", alt_session=True) if "inet6" not in out: self.send_expect("ifconfig %s down" % intf, "# ", alt_session=True) diff --git a/test_plans/vf_pf_reset_test_plan.rst b/test_plans/vf_pf_reset_test_plan.rst index 31ca7238..35fdc149 100644 --- a/test_plans/vf_pf_reset_test_plan.rst +++ b/test_plans/vf_pf_reset_test_plan.rst @@ -396,6 +396,10 @@ Test Case 6: vlan rx restore -- create one vf on each pf Test Case 7: vlan tx restore ============================ +.. note:: + + ice nic need set dut tx vf port spoofchk off: ip link set dev {pf_interface} vf {tx_vf} spoofchk off + 1. Execute the step1-step3 of test case 1 2. Run testpmd:: diff --git a/tests/TestSuite_vf_pf_reset.py b/tests/TestSuite_vf_pf_reset.py index 424ce56c..7e1e924d 100644 --- a/tests/TestSuite_vf_pf_reset.py +++ b/tests/TestSuite_vf_pf_reset.py @@ -77,6 +77,8 @@ class TestVfPfReset(TestCase): # Init pmd second session_second = self.dut.new_session() self.pmd_output_2 = PmdOutput(self.dut, session_second) + # disable ipv6 + self.dut.disable_ipv6(intf="all") def set_up(self): """ @@ -201,7 +203,8 @@ class TestVfPfReset(TestCase): tx_port="", vm=False, ): - inst = self.tester.tcpdump_sniff_packets(tester_intf) + filter = [{"layer": "ether", "config": {"dst": "not ff:ff:ff:ff:ff:ff"}}] + inst = self.tester.tcpdump_sniff_packets(tester_intf, filters=filter) if vlan: out = self.send_packet( vf_mac, num=count, vlan_id=vlan, tx_port=tx_port, vm=vm @@ -946,6 +949,11 @@ class TestVfPfReset(TestCase): """ vlan tx restore """ + # ice nic need set tx vf spoofchk off + if self.kdriver == "ice": + self.dut.send_expect( + "ip link set dev {} vf 1 spoofchk off".format(self.host_intf_0), "# " + ) # Set mac self.ip_link_set( host_intf=self.host_intf_0, @@ -1321,4 +1329,5 @@ class TestVfPfReset(TestCase): When the case of this test suite finished, the environment should clear up. """ - pass + # enable ipv6 + self.dut.enable_ipv6(intf="all")