[dts] [PATCH] tests/pmd_bonded: stop forwarding before removing slaves
Tu, Lijuan
lijuan.tu at intel.com
Tue Jan 15 06:10:14 CET 2019
Applied, thanks
> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Hyong Youb Kim
> Sent: Thursday, January 10, 2019 2:25 PM
> To: Liu, Yong <yong.liu at intel.com>
> Cc: dts at dpdk.org; Hyong Youb Kim <hyonkim at cisco.com>
> Subject: [dts] [PATCH] tests/pmd_bonded: stop forwarding before removing
> slaves
>
> 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 <hyonkim at cisco.com>
> ---
> 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
More information about the dts
mailing list