1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (c) 2020 Dmitry Kozlyuk 3 */ 4 5 /** 6 * @file Multiprocess support stubs 7 * 8 * Stubs must log an error until implemented. If success is required 9 * for non-multiprocess operation, stub must log a warning and a comment 10 * must document what requires success emulation. 11 */ 12 13 #include <rte_eal.h> 14 #include <rte_errno.h> 15 16 #include "eal_private.h" 17 #include "eal_windows.h" 18 #include "malloc_mp.h" 19 #include "hotplug_mp.h" 20 21 void 22 rte_mp_channel_cleanup(void) 23 { 24 EAL_LOG_NOT_IMPLEMENTED(); 25 } 26 27 int 28 rte_mp_action_register(const char *name, rte_mp_t action) 29 { 30 RTE_SET_USED(name); 31 RTE_SET_USED(action); 32 EAL_LOG_NOT_IMPLEMENTED(); 33 return -1; 34 } 35 36 void 37 rte_mp_action_unregister(const char *name) 38 { 39 RTE_SET_USED(name); 40 EAL_LOG_NOT_IMPLEMENTED(); 41 } 42 43 int 44 rte_mp_sendmsg(struct rte_mp_msg *msg) 45 { 46 RTE_SET_USED(msg); 47 EAL_LOG_NOT_IMPLEMENTED(); 48 return -1; 49 } 50 51 int 52 rte_mp_request_sync(struct rte_mp_msg *req, struct rte_mp_reply *reply, 53 const struct timespec *ts) 54 { 55 RTE_SET_USED(req); 56 RTE_SET_USED(reply); 57 RTE_SET_USED(ts); 58 EAL_LOG_NOT_IMPLEMENTED(); 59 return -1; 60 } 61 62 int 63 rte_mp_request_async(struct rte_mp_msg *req, const struct timespec *ts, 64 rte_mp_async_reply_t clb) 65 { 66 RTE_SET_USED(req); 67 RTE_SET_USED(ts); 68 RTE_SET_USED(clb); 69 EAL_LOG_NOT_IMPLEMENTED(); 70 return -1; 71 } 72 73 int 74 rte_mp_reply(struct rte_mp_msg *msg, const char *peer) 75 { 76 RTE_SET_USED(msg); 77 RTE_SET_USED(peer); 78 EAL_LOG_NOT_IMPLEMENTED(); 79 return -1; 80 } 81 82 int 83 register_mp_requests(void) 84 { 85 /* Non-stub function succeeds if multi-process is not supported. */ 86 EAL_LOG_STUB(); 87 return 0; 88 } 89 90 void 91 unregister_mp_requests(void) 92 { 93 /* Non-stub function succeeds if multi-process is not supported. */ 94 EAL_LOG_STUB(); 95 } 96 97 int 98 request_to_primary(struct malloc_mp_req *req) 99 { 100 RTE_SET_USED(req); 101 EAL_LOG_NOT_IMPLEMENTED(); 102 return -1; 103 } 104 105 int 106 request_sync(void) 107 { 108 /* Common memory allocator depends on this function success. */ 109 EAL_LOG_STUB(); 110 return 0; 111 } 112 113 int 114 eal_dev_hotplug_request_to_primary(struct eal_dev_mp_req *req) 115 { 116 RTE_SET_USED(req); 117 return 0; 118 } 119 120 int 121 eal_dev_hotplug_request_to_secondary(struct eal_dev_mp_req *req) 122 { 123 RTE_SET_USED(req); 124 return 0; 125 } 126