patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] examples/service_cores: fix lcore count check
@ 2021-08-30  8:04 Ruifeng Wang
  2021-08-31 16:09 ` Van Haaren, Harry
  0 siblings, 1 reply; 4+ messages in thread
From: Ruifeng Wang @ 2021-08-30  8:04 UTC (permalink / raw)
  To: Harry van Haaren, Vipin Varghese
  Cc: dev, thomas, david.marchand, nd, honnappa.nagarahalli,
	Ruifeng Wang, stable

The example has various profiles to run services on specified
number of lcores. Due to incorrect boundary condition, service
can be dispatched to a core that does not exist. This puts main
core into endless wait.

Max available number of service cores is all detected lcores
excluding main core.

Fixes: 7f6ee6aee717 ("examples/service_cores: check cores before run")
Cc: stable@dpdk.org
Cc: vipin.varghese@intel.com

Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
 examples/service_cores/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/service_cores/main.c b/examples/service_cores/main.c
index 83915b9a53..9f52082254 100644
--- a/examples/service_cores/main.c
+++ b/examples/service_cores/main.c
@@ -118,7 +118,7 @@ apply_profile(int profile_id)
 	struct profile *p = &profiles[profile_id];
 	const uint8_t core_off = 1;
 
-	if (p->num_cores > rte_lcore_count() + 1) {
+	if (p->num_cores > rte_lcore_count() - 1) {
 		printf("insufficent cores to run (%s)",
 			p->name);
 		return;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH] examples/service_cores: fix lcore count check
  2021-08-30  8:04 [dpdk-stable] [PATCH] examples/service_cores: fix lcore count check Ruifeng Wang
@ 2021-08-31 16:09 ` Van Haaren, Harry
  2021-09-16 15:30   ` [dpdk-stable] [dpdk-dev] " David Marchand
  2021-09-16 15:36   ` [dpdk-stable] " Thomas Monjalon
  0 siblings, 2 replies; 4+ messages in thread
From: Van Haaren, Harry @ 2021-08-31 16:09 UTC (permalink / raw)
  To: Ruifeng Wang, Varghese, Vipin
  Cc: dev, thomas, david.marchand, nd, honnappa.nagarahalli, stable

> -----Original Message-----
> From: Ruifeng Wang <ruifeng.wang@arm.com>
> Sent: Monday, August 30, 2021 9:04 AM
> To: Van Haaren, Harry <harry.van.haaren@intel.com>; Varghese, Vipin
> <vipin.varghese@intel.com>
> Cc: dev@dpdk.org; thomas@monjalon.net; david.marchand@redhat.com;
> nd@arm.com; honnappa.nagarahalli@arm.com; Ruifeng Wang
> <ruifeng.wang@arm.com>; stable@dpdk.org
> Subject: [PATCH] examples/service_cores: fix lcore count check
> 
> The example has various profiles to run services on specified
> number of lcores. Due to incorrect boundary condition, service
> can be dispatched to a core that does not exist. This puts main
> core into endless wait.
> 
> Max available number of service cores is all detected lcores
> excluding main core.
> 
> Fixes: 7f6ee6aee717 ("examples/service_cores: check cores before run")
> Cc: stable@dpdk.org
> Cc: vipin.varghese@intel.com
> 
> Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>

Change makes sense to me, this was introduced in Oct 2020
so a backport to 20.11 LTS makes sense I think.

Acked-by: Harry van Haaren <harry.van.haaren@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH] examples/service_cores: fix lcore count check
  2021-08-31 16:09 ` Van Haaren, Harry
@ 2021-09-16 15:30   ` David Marchand
  2021-09-16 15:36   ` [dpdk-stable] " Thomas Monjalon
  1 sibling, 0 replies; 4+ messages in thread
From: David Marchand @ 2021-09-16 15:30 UTC (permalink / raw)
  To: Ruifeng Wang
  Cc: Van Haaren, Harry, Varghese, Vipin, dev, thomas, nd,
	honnappa.nagarahalli, stable

On Tue, Aug 31, 2021 at 6:12 PM Van Haaren, Harry
<harry.van.haaren@intel.com> wrote:
> > The example has various profiles to run services on specified
> > number of lcores. Due to incorrect boundary condition, service
> > can be dispatched to a core that does not exist. This puts main
> > core into endless wait.
> >
> > Max available number of service cores is all detected lcores
> > excluding main core.
> >
> > Fixes: 7f6ee6aee717 ("examples/service_cores: check cores before run")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Acked-by: Harry van Haaren <harry.van.haaren@intel.com>

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH] examples/service_cores: fix lcore count check
  2021-08-31 16:09 ` Van Haaren, Harry
  2021-09-16 15:30   ` [dpdk-stable] [dpdk-dev] " David Marchand
@ 2021-09-16 15:36   ` Thomas Monjalon
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2021-09-16 15:36 UTC (permalink / raw)
  To: Van Haaren, Harry
  Cc: Ruifeng Wang, Varghese, Vipin, dev, david.marchand, nd,
	honnappa.nagarahalli, stable

31/08/2021 18:09, Van Haaren, Harry:
> From: Ruifeng Wang <ruifeng.wang@arm.com>
> > Fixes: 7f6ee6aee717 ("examples/service_cores: check cores before run")
> > Cc: stable@dpdk.org
> > Cc: vipin.varghese@intel.com
> > 
> > Signed-off-by: Ruifeng Wang <ruifeng.wang@arm.com>
> 
> Change makes sense to me, this was introduced in Oct 2020
> so a backport to 20.11 LTS makes sense I think.

Backport is not only for official announced branches.
The backport mark may be used to maintain some private branches as well.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-16 15:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-30  8:04 [dpdk-stable] [PATCH] examples/service_cores: fix lcore count check Ruifeng Wang
2021-08-31 16:09 ` Van Haaren, Harry
2021-09-16 15:30   ` [dpdk-stable] [dpdk-dev] " David Marchand
2021-09-16 15:36   ` [dpdk-stable] " Thomas Monjalon

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).