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 76979A034E; Fri, 15 May 2020 07:51:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DF0C71D9E6; Fri, 15 May 2020 07:51:05 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id C4CF81D9D8 for ; Fri, 15 May 2020 07:51:03 +0200 (CEST) IronPort-SDR: oNbBIhKh1fVkw/Adr9S+5M9nlmx8ZXd92uzufpeOMcXDL+JUaJ01YDSmvNbv4stgKjLRt9HCNL lkOFoOIyNWMw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 May 2020 22:51:02 -0700 IronPort-SDR: tNOtEbFdcZ2WdLhFPnlDGjqmxBOXLYk9+YAggUxQxMKJI3BQEtGCZks4QM73K5tfZOVli9CawN mgrITPgPLe/w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,394,1583222400"; d="scan'208";a="263084846" Received: from dpdk-moyufen06.sh.intel.com ([10.67.116.208]) by orsmga003.jf.intel.com with ESMTP; 14 May 2020 22:51:01 -0700 From: yufengmx To: dts@dpdk.org, zhaoyan.chen@intel.com Cc: yufengmx Date: Fri, 15 May 2020 13:52:31 +0800 Message-Id: <20200515055231.11341-2-yufengx.mo@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200515055231.11341-1-yufengx.mo@intel.com> References: <20200515055231.11341-1-yufengx.mo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH V1 1/1] tests/pmd_bonded_8023ad: update script by test plan change 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" update script by test plan change. Signed-off-by: yufengmx --- tests/TestSuite_pmd_bonded_8023ad.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_pmd_bonded_8023ad.py b/tests/TestSuite_pmd_bonded_8023ad.py index 6267406..3707042 100644 --- a/tests/TestSuite_pmd_bonded_8023ad.py +++ b/tests/TestSuite_pmd_bonded_8023ad.py @@ -94,7 +94,30 @@ class TestBonding8023AD(TestCase): err_fmt = "link bonding mode 4 (802.3ad) set {0} failed" self.verify(expected_msg in out, err_fmt.format(status)) + def set_special_command(self, bond_port): + cmds = [ + "set bonding lacp dedicated_queues {} enable".format(bond_port), + "set allmulti 0 on", + "set allmulti 1 on", + "set allmulti {} on".format(bond_port), + "set portlist {}".format(bond_port), ] + [self.bond_inst.d_console([cmd, 'testpmd>', 15]) for cmd in cmds] + def set_8023ad_bonded(self, slaves, bond_mode, ignore=True): + ''' set 802.3ad bonded mode for the specified bonding mode ''' + specified_socket = self.dut.get_numa_id(slaves[0]) + # create bonded device, add slaves in it + bond_port = self.bond_inst.create_bonded_device(bond_mode, specified_socket) + if not ignore: + # when no slave attached, mac should be 00:00:00:00:00:00 + self.bonding_8023ad_check_macs_without_slaves(bond_port) + # add slave + self.bond_inst.add_slave(bond_port, False, '', *slaves) + # set special command + self.set_special_command(bond_port) + return bond_port + + def set_8023ad_bonded2(self, slaves, bond_mode, ignore=True): ''' set 802.3ad bonded mode for the specified bonding mode ''' specified_socket = self.dut.get_numa_id(slaves[0]) # create bonded device, add slaves in it @@ -332,7 +355,7 @@ class TestBonding8023AD(TestCase): for mode in self.DEDICATED_QUEUES: try: self.bond_inst.start_testpmd() - bond_port = self.set_8023ad_bonded(slaves, bond_mode) + bond_port = self.set_8023ad_bonded2(slaves, bond_mode) self.set_8023ad_dedicated_queues(bond_port, mode) except Exception as e: check_results.append(e); print(traceback.format_exc()) -- 2.21.0