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 87325A05D3 for ; Thu, 23 May 2019 05:36:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6C1102B9E; Thu, 23 May 2019 05:36:06 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 8A2E425D9 for ; Thu, 23 May 2019 05:36:04 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2019 20:36:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,501,1549958400"; d="scan'208";a="174611409" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga002.fm.intel.com with ESMTP; 22 May 2019 20:36:03 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 22 May 2019 20:36:03 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 22 May 2019 20:36:02 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.70]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.126]) with mapi id 14.03.0415.000; Thu, 23 May 2019 11:36:00 +0800 From: "Li, WenjieX A" 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: AQHVEQWUt1IUA0V5mk6uWidd8BEenKZ4Dv8Q Date: Thu, 23 May 2019 03:36:00 +0000 Message-ID: <8688172CD5C0B74590FAE19D9579F94B536F3500@SHSMSX103.ccr.corp.intel.com> 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: zh-CN, 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" Reviewed-by: Wenjie =20 > -----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 be= fore > send packet >=20 > When bonding mode is 5, after set the promisc off on bond port, the prima= ry > slave port should also change to promisc off, so should get the primary p= ort > before send packet to verify it. >=20 > Signed-off-by: lihong > --- > tests/TestSuite_pmd_bonded.py | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/tests/TestSuite_pmd_bonded.py b/tests/TestSuite_pmd_bonded.p= y > 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(unboun= d_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= off 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(spor= t=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 p= romiscuous > 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 p= romiscuous > disabled") >=20 > @@ -1026,7 +1029,7 @@ UDP(sport=3Dsrcport, > dport=3Ddestport)/Raw(load=3D"\x50"*%s)], iface=3D"%s", count=3D%d)' > pkt_size !=3D LACP_MESSAGE_SIZE, > "RX or TX packet number not correct when promisc= uous disabled") > else: > - self.verify(pkt_now[self.dut_ports[0]][0] =3D=3D pkt_now[bon= d_port][0] and > + self.verify(pkt_now[curr_primary][0] =3D=3D > + pkt_now[bond_port][0] and > pkt_now[self.dut_ports[3]][0] =3D=3D pkt_now[bon= d_port][0] and > pkt_now[bond_port][0] =3D=3D pkt_count, > "RX or TX packet number not correct when promisc= uous disabled") > -- > 2.7.4