xref: /dpdk/lib/eal/windows/eal_mp.c (revision a0cc7be20dd13e118387786c3a86aab56325ed63)
199a2dd95SBruce Richardson /* SPDX-License-Identifier: BSD-3-Clause
299a2dd95SBruce Richardson  * Copyright (c) 2020 Dmitry Kozlyuk
399a2dd95SBruce Richardson  */
499a2dd95SBruce Richardson 
599a2dd95SBruce Richardson /**
699a2dd95SBruce Richardson  * @file Multiprocess support stubs
799a2dd95SBruce Richardson  *
899a2dd95SBruce Richardson  * Stubs must log an error until implemented. If success is required
999a2dd95SBruce Richardson  * for non-multiprocess operation, stub must log a warning and a comment
1099a2dd95SBruce Richardson  * must document what requires success emulation.
1199a2dd95SBruce Richardson  */
1299a2dd95SBruce Richardson 
1399a2dd95SBruce Richardson #include <rte_eal.h>
1499a2dd95SBruce Richardson #include <rte_errno.h>
1599a2dd95SBruce Richardson 
1699a2dd95SBruce Richardson #include "eal_private.h"
1799a2dd95SBruce Richardson #include "eal_windows.h"
1899a2dd95SBruce Richardson #include "malloc_mp.h"
1999a2dd95SBruce Richardson #include "hotplug_mp.h"
2099a2dd95SBruce Richardson 
2199a2dd95SBruce Richardson void
rte_mp_channel_cleanup(void)2299a2dd95SBruce Richardson rte_mp_channel_cleanup(void)
2399a2dd95SBruce Richardson {
2499a2dd95SBruce Richardson 	EAL_LOG_NOT_IMPLEMENTED();
2599a2dd95SBruce Richardson }
2699a2dd95SBruce Richardson 
2799a2dd95SBruce Richardson int
rte_mp_action_register(const char * name,rte_mp_t action)2899a2dd95SBruce Richardson rte_mp_action_register(const char *name, rte_mp_t action)
2999a2dd95SBruce Richardson {
3099a2dd95SBruce Richardson 	RTE_SET_USED(name);
3199a2dd95SBruce Richardson 	RTE_SET_USED(action);
3299a2dd95SBruce Richardson 	EAL_LOG_NOT_IMPLEMENTED();
3399a2dd95SBruce Richardson 	return -1;
3499a2dd95SBruce Richardson }
3599a2dd95SBruce Richardson 
3699a2dd95SBruce Richardson void
rte_mp_action_unregister(const char * name)3799a2dd95SBruce Richardson rte_mp_action_unregister(const char *name)
3899a2dd95SBruce Richardson {
3999a2dd95SBruce Richardson 	RTE_SET_USED(name);
4099a2dd95SBruce Richardson 	EAL_LOG_NOT_IMPLEMENTED();
4199a2dd95SBruce Richardson }
4299a2dd95SBruce Richardson 
4399a2dd95SBruce Richardson int
rte_mp_sendmsg(struct rte_mp_msg * msg)4499a2dd95SBruce Richardson rte_mp_sendmsg(struct rte_mp_msg *msg)
4599a2dd95SBruce Richardson {
4699a2dd95SBruce Richardson 	RTE_SET_USED(msg);
4799a2dd95SBruce Richardson 	EAL_LOG_NOT_IMPLEMENTED();
4899a2dd95SBruce Richardson 	return -1;
4999a2dd95SBruce Richardson }
5099a2dd95SBruce Richardson 
5199a2dd95SBruce Richardson int
rte_mp_request_sync(struct rte_mp_msg * req,struct rte_mp_reply * reply,const struct timespec * ts)5299a2dd95SBruce Richardson rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply,
5399a2dd95SBruce Richardson 	const struct timespec *ts)
5499a2dd95SBruce Richardson {
5599a2dd95SBruce Richardson 	RTE_SET_USED(req);
5699a2dd95SBruce Richardson 	RTE_SET_USED(reply);
5799a2dd95SBruce Richardson 	RTE_SET_USED(ts);
5899a2dd95SBruce Richardson 	EAL_LOG_NOT_IMPLEMENTED();
5999a2dd95SBruce Richardson 	return -1;
6099a2dd95SBruce Richardson }
6199a2dd95SBruce Richardson 
6299a2dd95SBruce Richardson int
rte_mp_request_async(struct rte_mp_msg * req,const struct timespec * ts,rte_mp_async_reply_t clb)6399a2dd95SBruce Richardson rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts,
6499a2dd95SBruce Richardson 		rte_mp_async_reply_t clb)
6599a2dd95SBruce Richardson {
6699a2dd95SBruce Richardson 	RTE_SET_USED(req);
6799a2dd95SBruce Richardson 	RTE_SET_USED(ts);
6899a2dd95SBruce Richardson 	RTE_SET_USED(clb);
6999a2dd95SBruce Richardson 	EAL_LOG_NOT_IMPLEMENTED();
7099a2dd95SBruce Richardson 	return -1;
7199a2dd95SBruce Richardson }
7299a2dd95SBruce Richardson 
7399a2dd95SBruce Richardson int
rte_mp_reply(struct rte_mp_msg * msg,const char * peer)7499a2dd95SBruce Richardson rte_mp_reply(struct rte_mp_msg *msg, const char *peer)
7599a2dd95SBruce Richardson {
7699a2dd95SBruce Richardson 	RTE_SET_USED(msg);
7799a2dd95SBruce Richardson 	RTE_SET_USED(peer);
7899a2dd95SBruce Richardson 	EAL_LOG_NOT_IMPLEMENTED();
7999a2dd95SBruce Richardson 	return -1;
8099a2dd95SBruce Richardson }
8199a2dd95SBruce Richardson 
8299a2dd95SBruce Richardson int
register_mp_requests(void)8399a2dd95SBruce Richardson register_mp_requests(void)
8499a2dd95SBruce Richardson {
8599a2dd95SBruce Richardson 	/* Non-stub function succeeds if multi-process is not supported. */
8699a2dd95SBruce Richardson 	EAL_LOG_STUB();
8799a2dd95SBruce Richardson 	return 0;
8899a2dd95SBruce Richardson }
8999a2dd95SBruce Richardson 
90*a0cc7be2SStephen Hemminger void
unregister_mp_requests(void)91*a0cc7be2SStephen Hemminger unregister_mp_requests(void)
92*a0cc7be2SStephen Hemminger {
93*a0cc7be2SStephen Hemminger 	/* Non-stub function succeeds if multi-process is not supported. */
94*a0cc7be2SStephen Hemminger 	EAL_LOG_STUB();
95*a0cc7be2SStephen Hemminger }
96*a0cc7be2SStephen Hemminger 
9799a2dd95SBruce Richardson int
request_to_primary(struct malloc_mp_req * req)9899a2dd95SBruce Richardson request_to_primary(struct malloc_mp_req *req)
9999a2dd95SBruce Richardson {
10099a2dd95SBruce Richardson 	RTE_SET_USED(req);
10199a2dd95SBruce Richardson 	EAL_LOG_NOT_IMPLEMENTED();
10299a2dd95SBruce Richardson 	return -1;
10399a2dd95SBruce Richardson }
10499a2dd95SBruce Richardson 
10599a2dd95SBruce Richardson int
request_sync(void)10699a2dd95SBruce Richardson request_sync(void)
10799a2dd95SBruce Richardson {
10899a2dd95SBruce Richardson 	/* Common memory allocator depends on this function success. */
10999a2dd95SBruce Richardson 	EAL_LOG_STUB();
11099a2dd95SBruce Richardson 	return 0;
11199a2dd95SBruce Richardson }
11299a2dd95SBruce Richardson 
11399a2dd95SBruce Richardson int
eal_dev_hotplug_request_to_primary(struct eal_dev_mp_req * req)11499a2dd95SBruce Richardson eal_dev_hotplug_request_to_primary(struct eal_dev_mp_req *req)
11599a2dd95SBruce Richardson {
11699a2dd95SBruce Richardson 	RTE_SET_USED(req);
11799a2dd95SBruce Richardson 	return 0;
11899a2dd95SBruce Richardson }
11999a2dd95SBruce Richardson 
12099a2dd95SBruce Richardson int
eal_dev_hotplug_request_to_secondary(struct eal_dev_mp_req * req)12199a2dd95SBruce Richardson eal_dev_hotplug_request_to_secondary(struct eal_dev_mp_req *req)
12299a2dd95SBruce Richardson {
12399a2dd95SBruce Richardson 	RTE_SET_USED(req);
12499a2dd95SBruce Richardson 	return 0;
12599a2dd95SBruce Richardson }
126