[dpdk-stable] patch 'ipc: add warnings about correct API usage' has been queued to LTS release 18.11.2

Kevin Traynor ktraynor at redhat.com
Tue May 14 16:43:51 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/20/19. 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/8807801ca323864f45fc8d1cabb0b836c2b0b1cc

Thanks.

Kevin Traynor

---
>From 8807801ca323864f45fc8d1cabb0b836c2b0b1cc Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov at intel.com>
Date: Fri, 3 May 2019 12:50:50 +0100
Subject: [PATCH] ipc: add warnings about correct API usage

[ upstream commit bfbc3a50416419d79c9cbe7868d1e9901919c346 ]

When handling synchronous or asynchronous requests, the reply
must be sent explicitly even if the result of the operation is
an error, to avoid the other side timing out. Make note of this
in documentation explicitly.

Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
---
 doc/guides/prog_guide/multi_proc_support.rst |  7 +++++++
 lib/librte_eal/common/include/rte_eal.h      | 15 +++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/doc/guides/prog_guide/multi_proc_support.rst b/doc/guides/prog_guide/multi_proc_support.rst
index 63d08b609..a84083b96 100644
--- a/doc/guides/prog_guide/multi_proc_support.rst
+++ b/doc/guides/prog_guide/multi_proc_support.rst
@@ -310,4 +310,11 @@ constructed and sent via ``rte_mp_reply()`` function, along with ``peer``
 pointer. The resulting response will then be delivered to the correct requestor.
 
+.. warning::
+    Simply returning a value when processing a request callback will not send a
+    response to the request - it must always be explicitly sent even in case
+    of errors. Implementation of error signalling rests with the application,
+    there is no built-in way to indicate success or error for a request. Failing
+    to do so will cause the requestor to time out while waiting on a response.
+
 Misc considerations
 ~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h
index 1d3553cea..9951228e0 100644
--- a/lib/librte_eal/common/include/rte_eal.h
+++ b/lib/librte_eal/common/include/rte_eal.h
@@ -230,4 +230,9 @@ struct rte_mp_reply {
  * this function typedef to register action for coming messages.
  *
+ * @note When handling IPC request callbacks, the reply must be sent even in
+ *   cases of error handling. Simply returning success or failure will *not*
+ *   send a response to the requestor.
+ *   Implementation of error signalling mechanism is up to the application.
+ *
  * @note No memory allocations should take place inside the callback.
  */
@@ -241,4 +246,9 @@ typedef int (*rte_mp_t)(const struct rte_mp_msg *msg, const void *peer);
  * requests.
  *
+ * @note When handling IPC request callbacks, the reply must be sent even in
+ *   cases of error handling. Simply returning success or failure will *not*
+ *   send a response to the requestor.
+ *   Implementation of error signalling mechanism is up to the application.
+ *
  * @note No memory allocations should take place inside the callback.
  */
@@ -372,4 +382,9 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
  * received previously.
  *
+ * @note When handling IPC request callbacks, the reply must be sent even in
+ *   cases of error handling. Simply returning success or failure will *not*
+ *   send a response to the requestor.
+ *   Implementation of error signalling mechanism is up to the application.
+ *
  * @param msg
  *   The msg argument contains the customized message.
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-14 15:39:07.647717944 +0100
+++ 0007-ipc-add-warnings-about-correct-API-usage.patch	2019-05-14 15:39:07.304558991 +0100
@@ -1 +1 @@
-From bfbc3a50416419d79c9cbe7868d1e9901919c346 Mon Sep 17 00:00:00 2001
+From 8807801ca323864f45fc8d1cabb0b836c2b0b1cc Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit bfbc3a50416419d79c9cbe7868d1e9901919c346 ]
+
@@ -11,2 +12,0 @@
-Cc: stable at dpdk.org
-
@@ -36 +36 @@
-index 7db022532..73754aaf2 100644
+index 1d3553cea..9951228e0 100644
@@ -39 +39 @@
-@@ -227,4 +227,9 @@ struct rte_mp_reply {
+@@ -230,4 +230,9 @@ struct rte_mp_reply {
@@ -49 +49 @@
-@@ -238,4 +243,9 @@ typedef int (*rte_mp_t)(const struct rte_mp_msg *msg, const void *peer);
+@@ -241,4 +246,9 @@ typedef int (*rte_mp_t)(const struct rte_mp_msg *msg, const void *peer);
@@ -59 +59 @@
-@@ -369,4 +379,9 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
+@@ -372,4 +382,9 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,


More information about the stable mailing list