From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rcdn-iport-6.cisco.com (rcdn-iport-6.cisco.com [173.37.86.77]) by dpdk.org (Postfix) with ESMTP id 0FFEE1B570 for ; Thu, 10 Jan 2019 07:25:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1260; q=dns/txt; s=iport; t=1547101536; x=1548311136; h=from:to:cc:subject:date:message-id; bh=4h6LGb9uR+DAPQleeRqShLh49sMuYbu7aWv3Vpq38B4=; b=J/y1huEBlWouEY5fruIykRwt86METOb0LV3iVQfMnWltbUhITVANMPZK 0JyZy4hHj03DURMGFmOgr3EnZtAbNCI2E/pbZ307ek6ZEkkqPckof81ix Q6do6RkCdPtooSkTdRISyT6yQlCDC0NVBdTnT6PHWYUWpb7oroONy3Ft+ k=; X-IronPort-AV: E=Sophos;i="5.56,460,1539648000"; d="scan'208";a="504030098" Received: from rcdn-core-8.cisco.com ([173.37.93.144]) by rcdn-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jan 2019 06:25:35 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-8.cisco.com (8.15.2/8.15.2) with ESMTP id x0A6PYuY002696; Thu, 10 Jan 2019 06:25:35 GMT Received: by cisco.com (Postfix, from userid 508933) id D612B20F2001; Wed, 9 Jan 2019 22:25:34 -0800 (PST) From: Hyong Youb Kim To: Marvin Liu Cc: dts@dpdk.org, Hyong Youb Kim Date: Wed, 9 Jan 2019 22:25:24 -0800 Message-Id: <20190110062524.31589-1-hyonkim@cisco.com> X-Mailer: git-send-email 2.16.2 X-Outbound-SMTP-Client: 10.193.184.48, savbu-usnic-a.cisco.com X-Outbound-Node: rcdn-core-8.cisco.com Subject: [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: Thu, 10 Jan 2019 06:25:36 -0000 Currently, test_bound_promisc_opt often crashes when it tries to remove all slave ports from the bonding driver. The main thread removes slave ports while forwarding threads are still executing rx_burst on them. These threads share data structures within the bonding driver and cause races, which lead to crashes. So explicitly stop the forwarding threads first, and then remove slave ports. Signed-off-by: Hyong Youb Kim --- tests/TestSuite_pmd_bonded.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/TestSuite_pmd_bonded.py b/tests/TestSuite_pmd_bonded.py index a770b9b..928c53a 100644 --- a/tests/TestSuite_pmd_bonded.py +++ b/tests/TestSuite_pmd_bonded.py @@ -1031,6 +1031,9 @@ UDP(sport=srcport, dport=destport)/Raw(load="\x50"*%s)], iface="%s", count=%d)' pkt_now[bond_port][0] == pkt_count, "RX or TX packet number not correct when promiscuous disabled") + # Stop fwd threads first before removing slaves from bond to avoid + # 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