patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Cc: Sarosh Arif <sarosh.arif@emumba.com>,
	Harry van Haaren <harry.van.haaren@intel.com>,
	dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'service: fix core mapping reset' has been queued to LTS release 18.11.10
Date: Thu, 20 Aug 2020 16:33:15 +0100
Message-ID: <20200820153341.171927-10-ktraynor@redhat.com> (raw)
In-Reply-To: <20200820153341.171927-1-ktraynor@redhat.com>

Hi,

FYI, your patch has been queued to LTS release 18.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/25/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/369c28238f9bd69e530f527217cb502e3fd11916

Thanks.

Kevin.

---
From 369c28238f9bd69e530f527217cb502e3fd11916 Mon Sep 17 00:00:00 2001
From: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Date: Wed, 8 Jul 2020 15:37:33 +0200
Subject: [PATCH] service: fix core mapping reset

[ upstream commit 048db4b6dcccaee9277ce5b4fbb2fe684b212e22 ]

The rte_service_lcore_reset_all function stops execution of services
on all lcores and switches them back from ROLE_SERVICE to ROLE_RTE.
However the thread loop for slave lcores (eal_thread_loop) distincts these
roles to set lcore state after processing delegated function.
It sets WAIT state for ROLE_SERVICE, but FINISHED for ROLE_RTE.
So changing the role to RTE before stopping work in slave lcores
causes lcores to end in FINISHED state. That is why the rte_eal_lcore_wait
must be run after rte_service_lcore_reset_all to bring back lcores to
launchable (WAIT) state.
This has been fixed in test app and clarified in API documentation.

Setting the state to WAIT in rte_service_runner_func is premature
as the rte_service_runner_func function is still a part of the lcore
function delegated to slave lcore. The state is overwritten anyway in
slave lcore thread loop. This premature setting state to WAIT might
however cause rte_eal_lcore_wait, that was called by the application,
to return before slave lcore thread set the FINISHED state. That's
why it is removed from librte_eal rte_service_runner_func function.

Bugzilla ID: 464
Fixes: 21698354c832 ("service: introduce service cores concept")
Fixes: f038a81e1c56 ("service: add unit tests")

Reported-by: Sarosh Arif <sarosh.arif@emumba.com>
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
---
 lib/librte_eal/common/include/rte_service.h | 4 ++++
 lib/librte_eal/common/rte_service.c         | 2 --
 test/test/test_service_cores.c              | 1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h
index 21002209bc..200e028778 100644
--- a/lib/librte_eal/common/include/rte_service.h
+++ b/lib/librte_eal/common/include/rte_service.h
@@ -308,4 +308,8 @@ int32_t rte_service_lcore_count(void);
  * The runstate of services is not modified.
  *
+ * The cores that are stopped with this call, are in FINISHED state and
+ * the application must take care of bringing them back to a launchable state:
+ * e.g. call *rte_eal_lcore_wait* on the lcore_id.
+ *
  * @retval 0 Success
  */
diff --git a/lib/librte_eal/common/rte_service.c b/lib/librte_eal/common/rte_service.c
index 607f9a0407..af1733eb09 100644
--- a/lib/librte_eal/common/rte_service.c
+++ b/lib/librte_eal/common/rte_service.c
@@ -447,6 +447,4 @@ service_runner_func(void *arg)
 	}
 
-	lcore_config[lcore].state = WAIT;
-
 	return 0;
 }
diff --git a/test/test/test_service_cores.c b/test/test/test_service_cores.c
index aa2174a332..c5150b6378 100644
--- a/test/test/test_service_cores.c
+++ b/test/test/test_service_cores.c
@@ -115,4 +115,5 @@ unregister_all(void)
 
 	rte_service_lcore_reset_all();
+	rte_eal_mp_wait_lcore();
 
 	return TEST_SUCCESS;
-- 
2.26.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-08-20 16:26:16.264728042 +0100
+++ 0010-service-fix-core-mapping-reset.patch	2020-08-20 16:26:15.778323907 +0100
@@ -1 +1 @@
-From 048db4b6dcccaee9277ce5b4fbb2fe684b212e22 Mon Sep 17 00:00:00 2001
+From 369c28238f9bd69e530f527217cb502e3fd11916 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 048db4b6dcccaee9277ce5b4fbb2fe684b212e22 ]
+
@@ -28 +29,0 @@
-Cc: stable@dpdk.org
@@ -34,3 +35,3 @@
- app/test/test_service_cores.c        | 1 +
- lib/librte_eal/common/rte_service.c  | 2 --
- lib/librte_eal/include/rte_service.h | 4 ++++
+ lib/librte_eal/common/include/rte_service.h | 4 ++++
+ lib/librte_eal/common/rte_service.c         | 2 --
+ test/test/test_service_cores.c              | 1 +
@@ -39,10 +40,13 @@
-diff --git a/app/test/test_service_cores.c b/app/test/test_service_cores.c
-index 4f003ed1af..ef1d8fcb9b 100644
---- a/app/test/test_service_cores.c
-+++ b/app/test/test_service_cores.c
-@@ -115,4 +115,5 @@ unregister_all(void)
- 
- 	rte_service_lcore_reset_all();
-+	rte_eal_mp_wait_lcore();
- 
- 	return TEST_SUCCESS;
+diff --git a/lib/librte_eal/common/include/rte_service.h b/lib/librte_eal/common/include/rte_service.h
+index 21002209bc..200e028778 100644
+--- a/lib/librte_eal/common/include/rte_service.h
++++ b/lib/librte_eal/common/include/rte_service.h
+@@ -308,4 +308,8 @@ int32_t rte_service_lcore_count(void);
+  * The runstate of services is not modified.
+  *
++ * The cores that are stopped with this call, are in FINISHED state and
++ * the application must take care of bringing them back to a launchable state:
++ * e.g. call *rte_eal_lcore_wait* on the lcore_id.
++ *
+  * @retval 0 Success
+  */
@@ -50 +54 @@
-index e2795f857e..6a0e0ff65d 100644
+index 607f9a0407..af1733eb09 100644
@@ -53 +57 @@
-@@ -476,6 +476,4 @@ service_runner_func(void *arg)
+@@ -447,6 +447,4 @@ service_runner_func(void *arg)
@@ -60,13 +64,10 @@
-diff --git a/lib/librte_eal/include/rte_service.h b/lib/librte_eal/include/rte_service.h
-index 3a1c735c58..e2d0a6dd32 100644
---- a/lib/librte_eal/include/rte_service.h
-+++ b/lib/librte_eal/include/rte_service.h
-@@ -305,4 +305,8 @@ int32_t rte_service_lcore_count(void);
-  * The runstate of services is not modified.
-  *
-+ * The cores that are stopped with this call, are in FINISHED state and
-+ * the application must take care of bringing them back to a launchable state:
-+ * e.g. call *rte_eal_lcore_wait* on the lcore_id.
-+ *
-  * @retval 0 Success
-  */
+diff --git a/test/test/test_service_cores.c b/test/test/test_service_cores.c
+index aa2174a332..c5150b6378 100644
+--- a/test/test/test_service_cores.c
++++ b/test/test/test_service_cores.c
+@@ -115,4 +115,5 @@ unregister_all(void)
+ 
+ 	rte_service_lcore_reset_all();
++	rte_eal_mp_wait_lcore();
+ 
+ 	return TEST_SUCCESS;


  parent reply	other threads:[~2020-08-20 15:34 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20 15:33 [dpdk-stable] patch 'test: fix rpath for drivers with meson' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'rawdev: allow getting info for unknown device' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'rawdev: fill NUMA socket ID in info' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'rawdev: export dump function in map file' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'cfgfile: fix stack buffer underflow' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'drivers/crypto: add missing OOP feature flag' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'test/crypto: fix asymmetric session mempool creation' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'common/cpt: fix encryption offset' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'crypto/dpaax_sec: fix inline query for descriptors' " Kevin Traynor
2020-08-20 15:33 ` Kevin Traynor [this message]
2020-08-20 15:33 ` [dpdk-stable] patch 'net/ixgbe: report 10Mbps link speed for x553' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net/iavf: fix uninitialized variable' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net/ixgbe/base: remove dead code' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net/i40e: fix getting EEPROM information' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'app/testpmd: use clock time in throughput calculation' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'app/testpmd: fix burst percentage " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'ethdev: fix log type for some error messages' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'service: fix C++ linkage' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net: fix unneeded replacement of TCP checksum 0' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net: fix checksum on big endian CPUs' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'eal: fix parentheses in alignment macros' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'vhost: fix virtio ready flag check' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'bus/fslmc: fix getting FD error' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net/dpaa: fix FD offset data type' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net/bonding: fix socket ID check' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net/netvsc: fix underflow when Rx external mbuf' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net/ixgbe/base: fix host interface shadow RAM read' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net/ixgbe/base: fix x550em 10G NIC link status' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net/ixgbe/base: fix infinite recursion on PCIe link down' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'ethdev: fix data room size verification in Rx queue setup' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net/nfp: fix RSS hash configuration reporting' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'drivers/net: fix exposing internal headers' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net/bonding: fix LACP negotiation' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'net/bnxt: remove unused enum declaration' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'examples/fips_validation: fix parsing of TDES vectors' " Kevin Traynor
2020-08-20 15:33 ` [dpdk-stable] patch 'examples/fips_validation: fix count overwrite for TDES' " Kevin Traynor

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=20200820153341.171927-10-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=harry.van.haaren@intel.com \
    --cc=l.wojciechow@partner.samsung.com \
    --cc=sarosh.arif@emumba.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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/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 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

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


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