From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 5FFBF1B0FC for ; Tue, 15 Jan 2019 06:10:19 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jan 2019 21:10:18 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,480,1539673200"; d="scan'208";a="126104555" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga002.jf.intel.com with ESMTP; 14 Jan 2019 21:10:18 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 14 Jan 2019 21:10:18 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 14 Jan 2019 21:10:17 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.196]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.159]) with mapi id 14.03.0415.000; Tue, 15 Jan 2019 13:10:15 +0800 From: "Tu, Lijuan" To: Hyong Youb Kim CC: "dts@dpdk.org" Thread-Topic: [dts] [PATCH] tests/pmd_bonded: stop forwarding before removing slaves Thread-Index: AQHUqK1W0wPZVr3y7k2dKNb4qcZHFKWvz8mg Date: Tue, 15 Jan 2019 05:10:14 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA0291B@SHSMSX101.ccr.corp.intel.com> References: <20190110062524.31589-1-hyonkim@cisco.com> In-Reply-To: <20190110062524.31589-1-hyonkim@cisco.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.400.15 dlp-reaction: no-action x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTUxMGEyZDgtMTJmZC00ZGRiLWJhYWEtMDliYWQ1MDc0NTNjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiYVpzZUxuSkgxc2t6blpTaHBRbGtKUTlXUkgxVGR3SEZmaVZzanA1bjRDM0NOWlJJeFwvdXVWcHB4aWQ2MzRvMlUifQ== 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] tests/pmd_bonded: stop forwarding before removing slaves 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: , X-List-Received-Date: Tue, 15 Jan 2019 05:10:20 -0000 Applied, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Hyong Youb Kim > Sent: Thursday, January 10, 2019 2:25 PM > To: Liu, Yong > Cc: dts@dpdk.org; Hyong Youb Kim > Subject: [dts] [PATCH] tests/pmd_bonded: stop forwarding before removing > slaves >=20 > Currently, test_bound_promisc_opt often crashes when it tries to remove a= ll > slave ports from the bonding driver. The main thread removes slave ports = while > forwarding threads are still executing rx_burst on them. These threads sh= are > data structures within the bonding driver and cause races, which lead to = crashes. > So explicitly stop the forwarding threads first, and then remove slave po= rts. >=20 > Signed-off-by: Hyong Youb Kim > --- > tests/TestSuite_pmd_bonded.py | 3 +++ > 1 file changed, 3 insertions(+) >=20 > diff --git a/tests/TestSuite_pmd_bonded.py b/tests/TestSuite_pmd_bonded.p= y > index a770b9b..928c53a 100644 > --- a/tests/TestSuite_pmd_bonded.py > +++ b/tests/TestSuite_pmd_bonded.py > @@ -1031,6 +1031,9 @@ UDP(sport=3Dsrcport, > dport=3Ddestport)/Raw(load=3D"\x50"*%s)], iface=3D"%s", count=3D%d)' > pkt_now[bond_port][0] =3D=3D pkt_count, > "RX or TX packet number not correct when promisc= uous disabled") >=20 > + # Stop fwd threads first before removing slaves from bond to avo= id > + # races and crashes > + self.dut.send_expect("stop", "testpmd> ") > self.remove_all_slaves(bond_port) > self.dut.send_expect("quit", "# ") > self.launch_app() > -- > 2.16.2