eal: introduce random generator with upper bound
[dpdk.git] / lib / librte_eal / common / include / rte_eal.h
index 7db0225..cf701e1 100644 (file)
@@ -226,6 +226,11 @@ struct rte_mp_reply {
  * As we create  socket channel for primary/secondary communication, use
  * 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.
  */
 typedef int (*rte_mp_t)(const struct rte_mp_msg *msg, const void *peer);
@@ -237,6 +242,11 @@ typedef int (*rte_mp_t)(const struct rte_mp_msg *msg, const void *peer);
  * this function typedef to register action for coming responses to asynchronous
  * 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.
  */
 typedef int (*rte_mp_async_reply_t)(const struct rte_mp_msg *request,
@@ -252,6 +262,9 @@ typedef int (*rte_mp_async_reply_t)(const struct rte_mp_msg *request,
  * to response the messages from the corresponding component in its primary
  * process or secondary processes.
  *
+ * @note IPC may be unsupported in certain circumstances, so caller should check
+ *    for ENOTSUP error.
+ *
  * @param name
  *   The name argument plays as the nonredundant key to find the action.
  *
@@ -275,6 +288,9 @@ rte_mp_action_register(const char *name, rte_mp_t action);
  * not want to response the messages from the corresponding component in its
  * primary process or secondary processes.
  *
+ * @note IPC may be unsupported in certain circumstances, so caller should check
+ *    for ENOTSUP error.
+ *
  * @param name
  *   The name argument plays as the nonredundant key to find the action.
  *
@@ -315,6 +331,9 @@ rte_mp_sendmsg(struct rte_mp_msg *msg);
  * @note This API must not be used inside memory-related or IPC callbacks, and
  *   no memory allocations should take place inside such callback.
  *
+ * @note IPC may be unsupported in certain circumstances, so caller should check
+ *    for ENOTSUP error.
+ *
  * @param req
  *   The req argument contains the customized request message.
  *
@@ -342,6 +361,9 @@ rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
  * This function sends a request message to the peer process, and will not
  * block. Instead, reply will be received in a separate callback.
  *
+ * @note IPC may be unsupported in certain circumstances, so caller should check
+ *    for ENOTSUP error.
+ *
  * @param req
  *   The req argument contains the customized request message.
  *
@@ -368,6 +390,11 @@ rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
  * This function will send a reply message in response to a request message
  * 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.
  *