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 4AB71A046B for ; Wed, 29 May 2019 04:35:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3E4B03576; Wed, 29 May 2019 04:35:52 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 38F302AB for ; Wed, 29 May 2019 04:35:51 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 May 2019 19:35:50 -0700 X-ExtLoop1: 1 Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by fmsmga004.fm.intel.com with ESMTP; 28 May 2019 19:35:50 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 28 May 2019 19:35:49 -0700 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 28 May 2019 19:35:49 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.129]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.126]) with mapi id 14.03.0415.000; Wed, 29 May 2019 10:35:47 +0800 From: "Tu, Lijuan" 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: AQHVEQWUveBxlD8qKkCZGdh5L7JpqKaBbGKQ Date: Wed, 29 May 2019 02:35:47 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA86690@SHSMSX101.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: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjQwNDY2YWItMjkzNS00ZjYxLWI2Y2ItMGY4MmZlMTM0NzFkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiT01iSkc2NDd4c1VuTEtEd1Y1SlFUb3J4R25DajJuVXRGYTFpcmZnK0FxOUdqbTh0R1BZY0ZtY3Y3RGZCWDhzZyJ9 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" Applied, thanks > -----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 > before send packet >=20 > 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 port 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.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= 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(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 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