test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: Hyong Youb Kim <hyonkim@cisco.com>
Cc: "dts@dpdk.org" <dts@dpdk.org>
Subject: Re: [dts] [PATCH] tests/pmd_bonded: stop forwarding before removing	slaves
Date: Tue, 15 Jan 2019 05:10:14 +0000	[thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BA0291B@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20190110062524.31589-1-hyonkim@cisco.com>

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 <yong.liu@intel.com>
> Cc: dts@dpdk.org; Hyong Youb Kim <hyonkim@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@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

      reply	other threads:[~2019-01-15  5:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-10  6:25 Hyong Youb Kim
2019-01-15  5:10 ` Tu, Lijuan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8CE3E05A3F976642AAB0F4675D0AD20E0BA0291B@SHSMSX101.ccr.corp.intel.com \
    --to=lijuan.tu@intel.com \
    --cc=dts@dpdk.org \
    --cc=hyonkim@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).