*/
#include <stdint.h>
-#include <sched.h>
#include <time.h>
#include <rte_config.h>
* attached,
* - false, otherwise.
*/
-__rte_experimental
bool rte_mp_disable(void);
#define RTE_MP_MAX_FD_NUM 8 /* The max amount of fds */
const struct rte_mp_reply *reply);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Register an action function for primary/secondary communication.
*
* Call this function to register an action, if the calling component wants
* - 0 on success.
* - (<0) on failure.
*/
-__rte_experimental
int
rte_mp_action_register(const char *name, rte_mp_t action);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Unregister an action function for primary/secondary communication.
*
* Call this function to unregister an action if the calling component does
* The name argument plays as the nonredundant key to find the action.
*
*/
-__rte_experimental
void
rte_mp_action_unregister(const char *name);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Send a message to the peer process.
*
* This function will send a message which will be responded by the action
* - On success, return 0.
* - On failure, return -1, and the reason will be stored in rte_errno.
*/
-__rte_experimental
int
rte_mp_sendmsg(struct rte_mp_msg *msg);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Send a request to the peer process and expect a reply.
*
* This function sends a request message to the peer process, and will
* - On success, return 0.
* - On failure, return -1, and the reason will be stored in rte_errno.
*/
-__rte_experimental
int
rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
const struct timespec *ts);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Send a request to the peer process and expect a reply in a separate callback.
*
* This function sends a request message to the peer process, and will not
* - On success, return 0.
* - On failure, return -1, and the reason will be stored in rte_errno.
*/
-__rte_experimental
int
rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
rte_mp_async_reply_t clb);
/**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice
- *
* Send a reply to the peer process.
*
* This function will send a reply message in response to a request message
* - On success, return 0.
* - On failure, return -1, and the reason will be stored in rte_errno.
*/
-__rte_experimental
int
rte_mp_reply(struct rte_mp_msg *msg, const char *peer);
return RTE_PER_LCORE(_thread_id);
}
+/**
+ * Get the OS-specific EAL base address.
+ *
+ * @return
+ * The base address.
+ */
+__rte_internal
+uint64_t rte_eal_get_baseaddr(void);
+
/**
* Get the iova mode
*