From patchwork Wed Jun 22 17:10:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 113227 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 CF654A04FD; Wed, 22 Jun 2022 10:46:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C9323427EE; Wed, 22 Jun 2022 10:46:12 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 13AA140689 for ; Wed, 22 Jun 2022 10:46:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655887571; x=1687423571; h=from:to:cc:subject:date:message-id; bh=yDKuo8lhKPweMPCXfQLI+PV+AMg+vXt5IQGUX/qdTuY=; b=eqyVBu9mx2CAbOVQYAWU+C4NsM7aNWiefCa3BjDC27DirvgUcLc73HCd 2i1hC5NFmmATMA+HfR8O6g1vhXowy7+qel4RVmUoZaKRN6UZZV7HDgLq7 OoySLGOx0sL87XrLhl/B0PMVTzokBnU1oRZFhw4gAi21BsQJgPonRNkS0 XSiio7Mf+XwMY/xqVnRanRCDJpNA20ip46c3UahyFpOAnvGNf11asAurX Q5hEI+nPqVb6NNV/uhDWZnqwearcdmmx8AhrQNintIi4Zq98WN/ThoRT/ ViYRhhsRuEH9EQuiit6LKwGw1K2atOIkn+ivmTIK0mnwHC+WI+FrzrSRL Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10385"; a="281088923" X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="281088923" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 01:46:10 -0700 X-IronPort-AV: E=Sophos;i="5.92,212,1650956400"; d="scan'208";a="592080910" Received: from unknown (HELO localhost.localdomain) ([10.239.252.94]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2022 01:46:08 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V1] tests/ice_dcf_acl_filter: remove case test_mutually_exclusive Date: Wed, 22 Jun 2022 17:10:43 +0000 Message-Id: <20220622171043.24945-1-songx.jiale@intel.com> X-Mailer: git-send-email 2.17.1 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 test_mutually_exclusive not in the test plan, duplicated by test_dcf_with_acl_filter_01-04 in dcf_lifecycle, remove it. Signed-off-by: Jiale Song --- tests/TestSuite_ice_dcf_acl_filter.py | 82 --------------------------- 1 file changed, 82 deletions(-) diff --git a/tests/TestSuite_ice_dcf_acl_filter.py b/tests/TestSuite_ice_dcf_acl_filter.py index 5e8b6e24..f22ada88 100644 --- a/tests/TestSuite_ice_dcf_acl_filter.py +++ b/tests/TestSuite_ice_dcf_acl_filter.py @@ -1760,93 +1760,11 @@ class ICEDCFACLFilterTest(TestCase): self.dut.kill_all() self.testpmd_status = "close" - def test_mutually_exclusive(self): - """ - DCF mode and any ACL filters (not added by DCF) shall be mutually exclusive - """ - self.dut.kill_all() - self.session_secondary = self.dut.new_session() - - # add ACL rule by kernel, reject request for DCF functionality - self.add_acl_rule_not_by_dcf(self.pf0_intf, stats=True) - out_testpmd = self.launch_testpmd() - self.check_dcf_status(out_testpmd, stats=False) - self.quit_testpmd() - self.delete_acl_rule_not_added_by_dcf() - out_testpmd = self.launch_testpmd() - self.check_dcf_status(out_testpmd, stats=True) - self.quit_testpmd() - - # add ACL rule by kernel, accept request for DCF functionality of another PF - self.add_acl_rule_not_by_dcf(self.pf1_intf, stats=True) - out_testpmd = self.launch_testpmd() - self.check_dcf_status(out_testpmd, stats=True) - self.quit_testpmd() - self.delete_acl_rule_not_added_by_dcf() - - # ACL DCF mode is active, add ACL filters by way of host based configuration is rejected - out_testpmd = self.launch_testpmd() - self.check_dcf_status(out_testpmd, stats=True) - self.add_acl_rule_not_by_dcf(self.pf0_intf, stats=False) - self.quit_testpmd() - self.add_acl_rule_not_by_dcf(self.pf0_intf, stats=True) - self.delete_acl_rule_not_added_by_dcf() - - # ACL DCF mode is active, add ACL filters by way of host based configuration on another PF successfully - out_testpmd = self.launch_testpmd() - self.check_dcf_status(out_testpmd, stats=True) - self.add_acl_rule_not_by_dcf(self.pf1_intf, stats=True) - self.quit_testpmd() - self.delete_acl_rule_not_added_by_dcf() - - def add_acl_rule_not_by_dcf(self, pf, stats=True): - """ - use secondary session - add acl rule by kernel command - """ - if stats: - self.session_secondary.send_expect( - "ethtool -N %s flow-type tcp4 src-ip 192.168.10.0 m 0.255.255.255 dst-port 8000 m 0x00ff action -1" - % pf, - "# ", - ) - else: - error_info = "rmgr: Cannot insert RX class rule: No such file or directory" - self.session_secondary.send_expect( - "ethtool -N %s flow-type tcp4 src-ip 192.168.10.0 m 0.255.255.255 dst-port 8000 m 0x00ff action -1" - % pf, - error_info, - ) - - def delete_acl_rule_not_added_by_dcf(self): - """ - delete all the acl rule added not by DCF - """ - out_pf0 = self.dut.send_expect("ethtool -n %s" % (self.pf0_intf), "# ") - out_pf1 = self.dut.send_expect("ethtool -n %s" % (self.pf1_intf), "# ") - - p = re.compile(r"Filter: (\d+)") - m0 = p.search(out_pf0) - m1 = p.search(out_pf1) - if m0: - self.dut.send_expect( - "ethtool -N %s delete %d" % (self.pf0_intf, int(m0.group(1))), "# " - ) - self.dut.send_expect("ethtool -n %s" % (self.pf0_intf), "Total 0 rules") - if m1: - self.dut.send_expect( - "ethtool -N %s delete %d" % (self.pf1_intf, int(m1.group(1))), "# " - ) - self.dut.send_expect("ethtool -n %s" % (self.pf1_intf), "Total 0 rules") - def tear_down(self): """ Run after each test case. """ self.quit_testpmd() - if getattr(self, "session_secondary", None): - self.dut.close_session(self.session_secondary) - self.delete_acl_rule_not_added_by_dcf() def tear_down_all(self): """