From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id AF362A05D3 for ; Thu, 23 May 2019 05:06:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A3E3DA49; Thu, 23 May 2019 05:06:41 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 1C9EF9E4 for ; Thu, 23 May 2019 05:06:38 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2019 20:06:38 -0700 X-ExtLoop1: 1 Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga006.jf.intel.com with ESMTP; 22 May 2019 20:06:37 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 22 May 2019 20:06:37 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 22 May 2019 20:06:37 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.249]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.213]) with mapi id 14.03.0415.000; Thu, 23 May 2019 11:06:35 +0800 From: "Zhu, WenhuiX" To: "Ma, LihongX" , "dts@dpdk.org" CC: "Ma, LihongX" Thread-Topic: [dts] [PATCH V1] tests/pmd_bonded: get the primary slave port before send packet Thread-Index: AQHVEQWUDUYmh8F+REKAZgpCwQFexaZ4BuFQ Date: Thu, 23 May 2019 03:06:34 +0000 Message-ID: References: <1558547911-3295-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1558547911-3295-1-git-send-email-lihongx.ma@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/pmd_bonded: get the primary slave port before send packet 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" Tested-by: Zhu, WenhuiX -----Original Message----- From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong Sent: Thursday, May 23, 2019 1:59 AM To: dts@dpdk.org Cc: Ma, LihongX Subject: [dts] [PATCH V1] tests/pmd_bonded: get the primary slave port befo= re send packet When bonding mode is 5, after set the promisc off on bond port, the primary= slave port should also change to promisc off, so should get the primary po= rt before send packet to verify it. Signed-off-by: lihong --- tests/TestSuite_pmd_bonded.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/TestSuite_pmd_bonded.py b/tests/TestSuite_pmd_bonded.py = index 78d5d21..9ae6d32 100644 --- a/tests/TestSuite_pmd_bonded.py +++ b/tests/TestSuite_pmd_bonded.py @@ -965,6 +965,7 @@ UDP(sport=3Dsrcport, dport=3Ddestport)/Raw(load=3D"\x50= "*%s)], iface=3D"%s", count=3D%d)' slaves =3D {} slaves['active'] =3D [self.dut_ports[0]] slaves['inactive'] =3D [] + curr_primary =3D self.dut_ports[0] =20 pkt_now, summary =3D self.send_customized_packet_to_slave(unbound_= port, bond_port, *pkt_info, **slaves) if mode_set =3D=3D MODE_LACP: @@ -997,6 +998,8 @@ UDP(sport=3Dsrcport, dport=3Ddestport)/Raw(load=3D"\x50= "*%s)], iface=3D"%s", count=3D%d)' self.verify(port_disabled_num =3D=3D 2, "Not only the primary slave turn promiscous mode o= ff in mode %d, " % mode_set + " when bonded device promiscous disabled.") + curr_primary =3D int(self.get_bond_primary(bond_port)) + slaves['active'] =3D [curr_primary] =20 if mode_set !=3D MODE_LACP: send_param['verify'] =3D True @@ -1011,7 +1014,7 @@ UDP(sport= =3Dsrcport, dport=3Ddestport)/Raw(load=3D"\x50"*%s)], iface=3D"%s", count= =3D%d)' pkt_size =3D=3D LACP_MESSAGE_SIZE, "Data received by slave or bonding device when pro= miscuous disabled") else: - self.verify(pkt_now[self.dut_ports[0]][0] =3D=3D 0 and + self.verify(pkt_now[curr_primary][0] =3D=3D 0 and pkt_now[bond_port][0] =3D=3D 0, "Data received by slave or bonding device when pro= miscuous disabled") =20 @@ -1026,7 +1029,7 @@ UDP(sport=3Dsrcport, dport=3Ddestport)/Raw(load=3D"\x= 50"*%s)], iface=3D"%s", count=3D%d)' pkt_size !=3D LACP_MESSAGE_SIZE, "RX or TX packet number not correct when promiscuo= us disabled") else: - self.verify(pkt_now[self.dut_ports[0]][0] =3D=3D pkt_now[bond_= port][0] and + self.verify(pkt_now[curr_primary][0] =3D=3D=20 + pkt_now[bond_port][0] and pkt_now[self.dut_ports[3]][0] =3D=3D pkt_now[bond_= port][0] and pkt_now[bond_port][0] =3D=3D pkt_count, "RX or TX packet number not correct when promiscuo= us disabled") -- 2.7.4