X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Frte_eal.h;h=cf701e177d3dc4bd7360f884e26384d5d22ab7d4;hb=5f4ed3f058493552658e914815f58e784755a1b3;hp=7db022532b79e2f124fce6288a33539608f218f0;hpb=3855b4150037142435b5c1f4195e44c142785f1f;p=dpdk.git diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h index 7db022532b..cf701e177d 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h @@ -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. *