DPDK patches and discussions
 help / color / mirror / Atom feed
From: Feifei Wang <Feifei.Wang2@arm.com>
To: "Van Haaren, Harry" <harry.van.haaren@intel.com>,
	"Rao, Nikhil" <nikhil.rao@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, nd <nd@arm.com>,
	"pbhagavatula@marvell.com" <pbhagavatula@marvell.com>,
	"stable@dpdk.org" <stable@dpdk.org>,
	"jerinj@marvell.com" <jerinj@marvell.com>, nd <nd@arm.com>
Subject: [dpdk-dev] 回复: [PATCH] examples/eventdev: move eth stop to the end
Date: Tue, 22 Dec 2020 05:31:47 +0000
Message-ID: <DBBPR08MB4411F93E3BCCA7CEFD8DB2B7C8DF0@DBBPR08MB4411.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <BYAPR11MB31432905B6AC817B2BBF3E0ED7C00@BYAPR11MB3143.namprd11.prod.outlook.com>

Hi, Van Haaren

> -----邮件原件-----
> 发件人: Van Haaren, Harry <harry.van.haaren@intel.com>
> 发送时间: 2020年12月21日 17:57
> 收件人: Feifei Wang <Feifei.Wang2@arm.com>; Rao, Nikhil
> <nikhil.rao@intel.com>
> 抄送: dev@dpdk.org; nd <nd@arm.com>; pbhagavatula@marvell.com;
> stable@dpdk.org; jerinj@marvell.com
> 主题: RE: [PATCH] examples/eventdev: move eth stop to the end
> 
> > -----Original Message-----
> > From: Feifei Wang <feifei.wang2@arm.com>
> > Sent: Monday, December 21, 2020 5:35 AM
> > To: Van Haaren, Harry <harry.van.haaren@intel.com>; Rao, Nikhil
> > <nikhil.rao@intel.com>; Pavan Nikhilesh
> > <pbhagavatula@caviumnetworks.com>
> > Cc: dev@dpdk.org; nd@arm.com; Feifei Wang <feifei.wang2@arm.com>;
> > pbhagavatula@marvell.com; stable@dpdk.org
> > Subject: [PATCH] examples/eventdev: move eth stop to the end
> 
> Suggested title improvement?
> examples/eventdev_pipeline: refactor ethdev port stop
That's OK. I will apply this in the next version.
> 
> > Move eth stop code from "signal_handler" function to the end of "main"
> > function. There are two reasons for this:
> >
> > First, this improves code maintenance and makes code look simple and
> clear.
> > Based on this change, after receiving the interrupt signal, "fdata->done"
> > is set as 1. Then the main thread will wait all worker lcores to jump
> > out of the loop. Finally, the main thread will stop and then close eth dev
> port.
> >
> > Second, for older version, the main thread first stops eth dev port
> > and then waits the end of worker lcore. This may cause errors because
> > it may stop the eth dev port which worker lcores are using. This
> > moving change can fix this by waiting all worker threads to exit and then
> stop the eth dev port.
> 
> I'm OK with the above changes, and agree that moving eth dev port close to
> after lcores return is a worthy change.
> 
> > In the meanwhile, remove wmb in signal_handler.
> >
> > This is because when the main lcore receive the stop signal, it stores
> > 1 into fdata->done. And then the worker lcores load "fdata->done" and
> > jump out of the loop to stop running. Nothing should be stored after
> > updating
> > fdata->done, so the wmb is unnecessary.
> >
> > Fixes: 085edac2ca38 ("examples/eventdev_pipeline: support Tx adapter")
> > Cc: pbhagavatula@marvell.com
> > Cc: stable@dpdk.org
> >
> > Suggested-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
> > Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
> 
> +Cc Jerin for Eventdev tree;
> -Cc Pavan's old email address
Thanks very much for this change.
> 
> Ack-ed by: Harry van Haaren <harry.van.haaren@intel.com>

Best Regards
Feifei

  reply	other threads:[~2020-12-22  5:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-21  5:34 [dpdk-dev] " Feifei Wang
2020-12-21  9:32 ` [dpdk-dev] [PATCH v2] " Feifei Wang
2020-12-21  9:56 ` [dpdk-dev] [PATCH] " Van Haaren, Harry
2020-12-22  5:31   ` Feifei Wang [this message]
2021-01-05  5:14 ` [dpdk-dev] [PATCH v3] examples/eventdev: refactor ethdev port stop Feifei Wang
2021-01-05 10:09   ` [dpdk-dev] [EXT] " Pavan Nikhilesh Bhagavatula
2021-01-14  6:24     ` [dpdk-dev] 回复: " Feifei Wang
2021-01-14  8:50       ` Feifei Wang
2021-01-14 10:30 ` [dpdk-dev] [PATCH v4 0/3] fix bugs for examples/evnentdev Feifei Wang
2021-01-14 10:30   ` [dpdk-dev] [PATCH v4 1/3] doc: fix core enabled bug for eventdev pipeline example Feifei Wang
2021-01-14 10:31   ` [dpdk-dev] [PATCH v4 2/3] examples/eventdev: add info output for main core Feifei Wang
2021-01-14 10:31   ` [dpdk-dev] [PATCH v4 3/3] examples/eventdev: move eth stop to the end Feifei Wang
2021-01-25 17:51     ` [dpdk-dev] [EXT] " Pavan Nikhilesh Bhagavatula
2021-01-26 13:37       ` Jerin Jacob

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=DBBPR08MB4411F93E3BCCA7CEFD8DB2B7C8DF0@DBBPR08MB4411.eurprd08.prod.outlook.com \
    --to=feifei.wang2@arm.com \
    --cc=dev@dpdk.org \
    --cc=harry.van.haaren@intel.com \
    --cc=jerinj@marvell.com \
    --cc=nd@arm.com \
    --cc=nikhil.rao@intel.com \
    --cc=pbhagavatula@marvell.com \
    --cc=stable@dpdk.org \
    /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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git