patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Kevin Traynor <ktraynor@redhat.com>
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'ipc: add warnings about correct API usage' has been queued to LTS release 18.11.2
Date: Tue, 14 May 2019 15:43:51 +0100	[thread overview]
Message-ID: <20190514144406.7526-7-ktraynor@redhat.com> (raw)
In-Reply-To: <20190514144406.7526-1-ktraynor@redhat.com>

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@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@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@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,

  parent reply	other threads:[~2019-05-14 14:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-14 14:43 [dpdk-stable] patch 'net/mlx5: fix Multi-Packet RQ mempool name' " Kevin Traynor
2019-05-14 14:43 ` [dpdk-stable] patch 'net/mlx5: fix release of Rx queue object' " Kevin Traynor
2019-05-14 14:43 ` [dpdk-stable] patch 'doc: fix typo in mlx5 guide' " Kevin Traynor
2019-05-14 14:43 ` [dpdk-stable] patch 'ipc: unlock on failure' " Kevin Traynor
2019-05-14 14:43 ` [dpdk-stable] patch 'doc: fix typo in IPC guide' " Kevin Traynor
2019-05-14 14:43 ` [dpdk-stable] patch 'ipc: add warnings about not using IPC with memory API' " Kevin Traynor
2019-05-14 14:43 ` Kevin Traynor [this message]
2019-05-14 14:43 ` [dpdk-stable] patch 'power: fix cache line alignment' " Kevin Traynor
2019-05-14 14:43 ` [dpdk-stable] patch 'test/barrier: fix typo in log' " Kevin Traynor
2019-05-14 14:43 ` [dpdk-stable] patch 'test/barrier: fix allocation check' " Kevin Traynor
2019-05-14 14:43 ` [dpdk-stable] patch 'test/barrier: fix for Power CPUs' " Kevin Traynor
2019-05-14 14:43 ` [dpdk-stable] patch 'hash: fix position returned in free slots' " Kevin Traynor
2019-05-14 14:43 ` [dpdk-stable] patch 'hash: fix total entries count' " Kevin Traynor
2019-05-14 14:43 ` [dpdk-stable] patch 'examples/ipsec-secgw: fix build error log' " Kevin Traynor
2019-05-14 14:43 ` [dpdk-stable] patch 'devtools: fix symbol name in check " Kevin Traynor
2019-05-14 14:44 ` [dpdk-stable] patch 'devtools: accept experimental symbol promotion' " Kevin Traynor
2019-05-14 14:44 ` [dpdk-stable] patch 'devtools: fix check of symbol added as stable API' " Kevin Traynor
2019-05-14 14:44 ` [dpdk-stable] patch 'doc: fix formatting in testpmd guide' " Kevin Traynor
2019-05-14 14:44 ` [dpdk-stable] patch 'eventdev: fix Rx adapter event flush' " Kevin Traynor
2019-05-14 14:44 ` [dpdk-stable] patch 'event/dsw: ignore scheduling type for single-link queues' " Kevin Traynor
2019-05-14 14:44 ` [dpdk-stable] patch 'app/testpmd: fix offload flags after port config' " Kevin Traynor
2019-05-14 14:44 ` [dpdk-stable] patch 'doc: fix JSON interface for power sample' " 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=20190514144406.7526-7-ktraynor@redhat.com \
    --to=ktraynor@redhat.com \
    --cc=anatoly.burakov@intel.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
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).