47 #include <sys/types.h> 48 #include <sys/socket.h> 55 #include <qb/qbdefs.h> 56 #include <qb/qbipcc.h> 69 #define MAP_ANONYMOUS MAP_ANON 76 #define MAX_RETRIES 100 81 #define CPG_MEMORY_MAP_UMASK 077 84 qb_ipcc_connection_t *
c;
101 static void cpg_inst_free (
void *inst);
120 coroipcc_msg_send_reply_receive (
121 qb_ipcc_connection_t *
c,
122 const struct iovec *iov,
123 unsigned int iov_len,
127 return qb_to_cs_error(qb_ipcc_sendv_recv(c, iov, iov_len, res_msg, res_len,
133 list_del (&cpg_iteration_instance->
list);
137 static void cpg_inst_free (
void *inst)
140 qb_ipcc_disconnect(cpg_inst->
c);
152 iter_next = iter->
next;
156 cpg_iteration_instance_finalize (cpg_iteration_instance);
158 hdb_handle_destroy (&cpg_handle_t_db, handle);
191 struct cpg_inst *cpg_inst;
195 goto error_no_destroy;
198 error =
hdb_error_to_cs (hdb_handle_create (&cpg_handle_t_db,
sizeof (
struct cpg_inst), handle));
199 if (error !=
CS_OK) {
200 goto error_no_destroy;
203 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, *handle, (
void *)&cpg_inst));
204 if (error !=
CS_OK) {
209 if (cpg_inst->
c == NULL) {
211 goto error_put_destroy;
214 if (model_data != NULL) {
234 hdb_handle_put (&cpg_handle_t_db, *handle);
239 hdb_handle_put (&cpg_handle_t_db, *handle);
241 hdb_handle_destroy (&cpg_handle_t_db, *handle);
249 struct cpg_inst *cpg_inst;
255 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
256 if (error !=
CS_OK) {
264 hdb_handle_put (&cpg_handle_t_db, handle);
273 req_lib_cpg_finalize.header.size =
sizeof (
struct req_lib_cpg_finalize);
276 iov.iov_base = (
void *)&req_lib_cpg_finalize;
277 iov.iov_len =
sizeof (
struct req_lib_cpg_finalize);
279 error = coroipcc_msg_send_reply_receive (cpg_inst->
c,
282 &res_lib_cpg_finalize,
283 sizeof (
struct res_lib_cpg_finalize));
285 cpg_inst_finalize (cpg_inst, handle);
286 hdb_handle_put (&cpg_handle_t_db, handle);
296 struct cpg_inst *cpg_inst;
298 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
299 if (error !=
CS_OK) {
305 hdb_handle_put (&cpg_handle_t_db, handle);
315 struct cpg_inst *cpg_inst;
317 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
318 if (error !=
CS_OK) {
324 hdb_handle_put (&cpg_handle_t_db, handle);
334 struct cpg_inst *cpg_inst;
336 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
337 if (error !=
CS_OK) {
343 hdb_handle_put (&cpg_handle_t_db, handle);
353 struct cpg_inst *cpg_inst;
355 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
356 if (error !=
CS_OK) {
362 hdb_handle_put (&cpg_handle_t_db, handle);
374 struct cpg_inst *cpg_inst;
379 struct cpg_inst cpg_inst_copy;
380 struct qb_ipc_response_header *dispatch_data;
393 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
394 if (error !=
CS_OK) {
406 dispatch_data = (
struct qb_ipc_response_header *)dispatch_buf;
408 errno_res = qb_ipcc_event_recv (
432 if (error !=
CS_OK) {
441 memcpy (&cpg_inst_copy, cpg_inst,
sizeof (
struct cpg_inst));
447 switch (dispatch_data->id) {
455 marshall_from_mar_cpg_name_t (
457 &res_cpg_deliver_callback->group_name);
461 res_cpg_deliver_callback->nodeid,
462 res_cpg_deliver_callback->pid,
463 &res_cpg_deliver_callback->message,
464 res_cpg_deliver_callback->msglen);
470 marshall_from_mar_cpg_name_t (
472 &res_cpg_partial_deliver_callback->group_name);
478 cpg_inst->
assembly_buf = malloc(res_cpg_partial_deliver_callback->msglen);
488 res_cpg_partial_deliver_callback->message, res_cpg_partial_deliver_callback->fraglen);
494 res_cpg_partial_deliver_callback->nodeid,
495 res_cpg_partial_deliver_callback->pid,
497 res_cpg_partial_deliver_callback->msglen);
511 for (i = 0; i < res_cpg_confchg_callback->member_list_entries; i++) {
512 marshall_from_mar_cpg_address_t (&member_list[i],
515 left_list_start = res_cpg_confchg_callback->
member_list +
516 res_cpg_confchg_callback->member_list_entries;
517 for (i = 0; i < res_cpg_confchg_callback->left_list_entries; i++) {
518 marshall_from_mar_cpg_address_t (&left_list[i],
519 &left_list_start[i]);
521 joined_list_start = res_cpg_confchg_callback->
member_list +
522 res_cpg_confchg_callback->member_list_entries +
523 res_cpg_confchg_callback->left_list_entries;
524 for (i = 0; i < res_cpg_confchg_callback->joined_list_entries; i++) {
525 marshall_from_mar_cpg_address_t (&joined_list[i],
526 &joined_list_start[i]);
528 marshall_from_mar_cpg_name_t (
530 &res_cpg_confchg_callback->group_name);
535 res_cpg_confchg_callback->member_list_entries,
537 res_cpg_confchg_callback->left_list_entries,
539 res_cpg_confchg_callback->joined_list_entries);
549 marshall_from_mar_cpg_ring_id_t (&ring_id, &res_cpg_totem_confchg_callback->ring_id);
550 for (i = 0; i < res_cpg_totem_confchg_callback->member_list_entries; i++) {
551 totem_member_list[i] = res_cpg_totem_confchg_callback->
member_list[i];
556 res_cpg_totem_confchg_callback->member_list_entries,
585 hdb_handle_put (&cpg_handle_t_db, handle);
594 struct cpg_inst *cpg_inst;
603 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
604 if (error !=
CS_OK) {
609 req_lib_cpg_join.header.size =
sizeof (
struct req_lib_cpg_join);
611 req_lib_cpg_join.pid = getpid();
612 req_lib_cpg_join.flags = 0;
620 marshall_to_mar_cpg_name_t (&req_lib_cpg_join.group_name,
623 iov[0].iov_base = (
void *)&req_lib_cpg_join;
624 iov[0].iov_len =
sizeof (
struct req_lib_cpg_join);
627 error = coroipcc_msg_send_reply_receive (cpg_inst->
c, iov, 1,
630 if (error !=
CS_OK) {
635 error = response.header.error;
638 hdb_handle_put (&cpg_handle_t_db, handle);
648 struct cpg_inst *cpg_inst;
657 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
658 if (error !=
CS_OK) {
662 req_lib_cpg_leave.header.size =
sizeof (
struct req_lib_cpg_leave);
664 req_lib_cpg_leave.pid = getpid();
665 marshall_to_mar_cpg_name_t (&req_lib_cpg_leave.group_name,
668 iov[0].iov_base = (
void *)&req_lib_cpg_leave;
669 iov[0].iov_len =
sizeof (
struct req_lib_cpg_leave);
672 error = coroipcc_msg_send_reply_receive (cpg_inst->
c, iov, 1,
673 &res_lib_cpg_leave, sizeof (
struct res_lib_cpg_leave));
675 if (error !=
CS_OK) {
678 }
while (res_lib_cpg_leave.header.error ==
CS_ERR_BUSY);
680 error = res_lib_cpg_leave.header.error;
683 hdb_handle_put (&cpg_handle_t_db, handle);
692 int *member_list_entries)
695 struct cpg_inst *cpg_inst;
704 if (member_list == NULL) {
707 if (member_list_entries == NULL) {
711 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
712 if (error !=
CS_OK) {
716 req_lib_cpg_membership_get.header.size =
sizeof (
struct req_lib_cpg_membership_get);
719 marshall_to_mar_cpg_name_t (&req_lib_cpg_membership_get.group_name,
722 iov.iov_base = (
void *)&req_lib_cpg_membership_get;
723 iov.iov_len =
sizeof (
struct req_lib_cpg_membership_get);
725 error = coroipcc_msg_send_reply_receive (cpg_inst->
c, &iov, 1,
726 &res_lib_cpg_membership_get, sizeof (res_lib_cpg_membership_get));
728 if (error !=
CS_OK) {
732 error = res_lib_cpg_membership_get.header.error;
737 *member_list_entries = res_lib_cpg_membership_get.member_count;
739 for (i = 0; i < res_lib_cpg_membership_get.member_count; i++) {
740 marshall_from_mar_cpg_address_t (&member_list[i],
746 hdb_handle_put (&cpg_handle_t_db, handle);
753 unsigned int *local_nodeid)
756 struct cpg_inst *cpg_inst;
761 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
762 if (error !=
CS_OK) {
766 req_lib_cpg_local_get.header.size =
sizeof (
struct qb_ipc_request_header);
769 iov.iov_base = (
void *)&req_lib_cpg_local_get;
770 iov.iov_len =
sizeof (
struct req_lib_cpg_local_get);
772 error = coroipcc_msg_send_reply_receive (cpg_inst->
c, &iov, 1,
773 &res_lib_cpg_local_get, sizeof (res_lib_cpg_local_get));
775 if (error !=
CS_OK) {
779 error = res_lib_cpg_local_get.header.error;
781 *local_nodeid = res_lib_cpg_local_get.local_nodeid;
784 hdb_handle_put (&cpg_handle_t_db, handle);
794 struct cpg_inst *cpg_inst;
796 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
797 if (error !=
CS_OK) {
803 hdb_handle_put (&cpg_handle_t_db, handle);
809 memory_map (
char *path,
const char *file,
void **buf,
size_t bytes)
818 long int sysconf_page_size;
821 snprintf (path, PATH_MAX,
"/dev/shm/%s", file);
825 (void)umask(old_umask);
830 (void)umask(old_umask);
836 res = ftruncate (fd, bytes);
838 goto error_close_unlink;
840 sysconf_page_size = sysconf(_SC_PAGESIZE);
841 if (sysconf_page_size <= 0) {
842 goto error_close_unlink;
844 page_size = sysconf_page_size;
845 buffer = malloc (page_size);
846 if (buffer == NULL) {
847 goto error_close_unlink;
849 memset (buffer, 0, page_size);
850 for (i = 0; i < (bytes / page_size); i++) {
852 written = write (fd, buffer, page_size);
853 if (written == -1 && errno == EINTR) {
856 if (written != page_size) {
858 goto error_close_unlink;
863 addr = mmap (NULL, bytes, PROT_READ | PROT_WRITE,
866 if (addr == MAP_FAILED) {
867 goto error_close_unlink;
870 madvise(addr, bytes, MADV_NOSYNC);
897 struct qb_ipc_response_header res_coroipcs_zc_alloc;
902 struct cpg_inst *cpg_inst;
904 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
905 if (error !=
CS_OK) {
909 map_size = size +
sizeof (
struct req_lib_cpg_mcast) + sizeof (struct coroipcs_zc_header);
910 assert(memory_map (path,
"corosync_zerocopy-XXXXXX", &buf, map_size) != -1);
914 munmap (buf, map_size);
920 req_coroipcc_zc_alloc.map_size = map_size;
921 strcpy (req_coroipcc_zc_alloc.path_to_file, path);
923 iovec.iov_base = (
void *)&req_coroipcc_zc_alloc;
926 error = coroipcc_msg_send_reply_receive (
930 &res_coroipcs_zc_alloc,
931 sizeof (
struct qb_ipc_response_header));
933 if (error !=
CS_OK) {
937 hdr = (
struct coroipcs_zc_header *)buf;
939 *buffer = ((
char *)buf) +
sizeof (
struct coroipcs_zc_header) + sizeof (struct req_lib_cpg_mcast);
942 hdb_handle_put (&cpg_handle_t_db, handle);
952 struct cpg_inst *cpg_inst;
954 struct qb_ipc_response_header res_coroipcs_zc_free;
958 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
959 if (error !=
CS_OK) {
965 req_coroipcc_zc_free.map_size = header->
map_size;
968 iovec.iov_base = (
void *)&req_coroipcc_zc_free;
971 error = coroipcc_msg_send_reply_receive (
975 &res_coroipcs_zc_free,
976 sizeof (
struct qb_ipc_response_header));
978 if (error !=
CS_OK) {
982 res = munmap ((
void *)header, header->
map_size);
990 hdb_handle_put (&cpg_handle_t_db, handle);
1002 struct cpg_inst *cpg_inst;
1009 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
1010 if (error !=
CS_OK) {
1019 req_lib_cpg_mcast = (
struct req_lib_cpg_mcast *)(((
char *)msg) -
sizeof (
struct req_lib_cpg_mcast));
1020 req_lib_cpg_mcast->header.size =
sizeof (
struct req_lib_cpg_mcast) +
1024 req_lib_cpg_mcast->guarantee =
guarantee;
1025 req_lib_cpg_mcast->msglen = msg_len;
1033 iovec.iov_base = (
void *)&req_coroipcc_zc_execute;
1036 error = coroipcc_msg_send_reply_receive (
1041 sizeof(res_lib_cpg_mcast));
1043 if (error !=
CS_OK) {
1047 error = res_lib_cpg_mcast.header.error;
1050 hdb_handle_put (&cpg_handle_t_db, handle);
1056 struct cpg_inst *cpg_inst,
1059 const struct iovec *iovec,
1060 unsigned int iov_len)
1064 struct iovec iov[2];
1068 size_t iov_sent = 0;
1072 req_lib_cpg_mcast.guarantee =
guarantee;
1073 req_lib_cpg_mcast.msglen = msg_len;
1075 iov[0].iov_base = (
void *)&req_lib_cpg_mcast;
1080 qb_ipcc_fc_enable_max_set(cpg_inst->
c, 2);
1082 while (error ==
CS_OK && sent < msg_len) {
1085 if ( (iovec[i].iov_len - iov_sent) > cpg_inst->
max_msg_size) {
1089 iov[1].iov_len = iovec[i].iov_len - iov_sent;
1095 else if ((sent + iov[1].iov_len) == msg_len) {
1102 req_lib_cpg_mcast.fraglen = iov[1].iov_len;
1104 iov[1].iov_base = (
char *)iovec[i].iov_base + iov_sent;
1107 error = coroipcc_msg_send_reply_receive (cpg_inst->
c, iov, 2,
1108 &res_lib_cpg_partial_send,
1109 sizeof (res_lib_cpg_partial_send));
1112 fprintf(stderr,
"sleep. counter=%d\n", retry_count);
1120 iov_sent += iov[1].iov_len;
1121 sent += iov[1].iov_len;
1124 if (iov_sent >= iovec[i].iov_len) {
1128 error = res_lib_cpg_partial_send.header.error;
1131 qb_ipcc_fc_enable_max_set(cpg_inst->
c, 1);
1140 const struct iovec *iovec,
1141 unsigned int iov_len)
1145 struct cpg_inst *cpg_inst;
1146 struct iovec iov[64];
1150 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
1151 if (error !=
CS_OK) {
1155 for (i = 0; i < iov_len; i++ ) {
1156 msg_len += iovec[i].iov_len;
1160 error = send_fragments(cpg_inst, guarantee, msg_len, iovec, iov_len);
1164 req_lib_cpg_mcast.header.size =
sizeof (
struct req_lib_cpg_mcast) +
1168 req_lib_cpg_mcast.guarantee =
guarantee;
1169 req_lib_cpg_mcast.msglen = msg_len;
1171 iov[0].iov_base = (
void *)&req_lib_cpg_mcast;
1172 iov[0].iov_len =
sizeof (
struct req_lib_cpg_mcast);
1173 memcpy (&iov[1], iovec, iov_len *
sizeof (
struct iovec));
1175 qb_ipcc_fc_enable_max_set(cpg_inst->
c, 2);
1177 qb_ipcc_fc_enable_max_set(cpg_inst->
c, 1);
1180 hdb_handle_put (&cpg_handle_t_db, handle);
1193 struct cpg_inst *cpg_inst;
1201 if (cpg_iteration_handle == NULL) {
1216 error =
hdb_error_to_cs (hdb_handle_get (&cpg_handle_t_db, handle, (
void *)&cpg_inst));
1217 if (error !=
CS_OK) {
1221 error =
hdb_error_to_cs (hdb_handle_create (&cpg_iteration_handle_t_db,
1223 if (error !=
CS_OK) {
1224 goto error_put_cpg_db;
1227 error =
hdb_error_to_cs (hdb_handle_get (&cpg_iteration_handle_t_db, *cpg_iteration_handle,
1228 (
void *)&cpg_iteration_instance));
1229 if (error !=
CS_OK) {
1233 cpg_iteration_instance->
conn = cpg_inst->
c;
1235 list_init (&cpg_iteration_instance->
list);
1237 req_lib_cpg_iterationinitialize.header.size =
sizeof (
struct req_lib_cpg_iterationinitialize);
1239 req_lib_cpg_iterationinitialize.iteration_type = iteration_type;
1241 marshall_to_mar_cpg_name_t (&req_lib_cpg_iterationinitialize.group_name, group);
1244 iov.iov_base = (
void *)&req_lib_cpg_iterationinitialize;
1245 iov.iov_len =
sizeof (
struct req_lib_cpg_iterationinitialize);
1247 error = coroipcc_msg_send_reply_receive (cpg_inst->
c,
1250 &res_lib_cpg_iterationinitialize,
1251 sizeof (
struct res_lib_cpg_iterationinitialize));
1253 if (error !=
CS_OK) {
1254 goto error_put_destroy;
1258 res_lib_cpg_iterationinitialize.iteration_handle;
1263 hdb_handle_put (&cpg_iteration_handle_t_db, *cpg_iteration_handle);
1264 hdb_handle_put (&cpg_handle_t_db, handle);
1266 return (res_lib_cpg_iterationinitialize.header.error);
1269 hdb_handle_put (&cpg_iteration_handle_t_db, *cpg_iteration_handle);
1271 hdb_handle_destroy (&cpg_iteration_handle_t_db, *cpg_iteration_handle);
1273 hdb_handle_put (&cpg_handle_t_db, handle);
1287 if (description == NULL) {
1291 error =
hdb_error_to_cs (hdb_handle_get (&cpg_iteration_handle_t_db, handle,
1292 (
void *)&cpg_iteration_instance));
1293 if (error !=
CS_OK) {
1297 req_lib_cpg_iterationnext.header.size =
sizeof (
struct req_lib_cpg_iterationnext);
1302 &req_lib_cpg_iterationnext,
1303 req_lib_cpg_iterationnext.header.size));
1304 if (error !=
CS_OK) {
1309 &res_lib_cpg_iterationnext,
1310 sizeof(
struct res_lib_cpg_iterationnext), -1));
1311 if (error !=
CS_OK) {
1315 marshall_from_mar_cpg_iteration_description_t(
1317 &res_lib_cpg_iterationnext.description);
1319 error = res_lib_cpg_iterationnext.header.error;
1322 hdb_handle_put (&cpg_iteration_handle_t_db, handle);
1337 error =
hdb_error_to_cs (hdb_handle_get (&cpg_iteration_handle_t_db, handle,
1338 (
void *)&cpg_iteration_instance));
1339 if (error !=
CS_OK) {
1343 req_lib_cpg_iterationfinalize.header.size =
sizeof (
struct req_lib_cpg_iterationfinalize);
1347 iov.iov_base = (
void *)&req_lib_cpg_iterationfinalize;
1348 iov.iov_len =
sizeof (
struct req_lib_cpg_iterationfinalize);
1350 error = coroipcc_msg_send_reply_receive (cpg_iteration_instance->
conn,
1353 &res_lib_cpg_iterationfinalize,
1354 sizeof (
struct req_lib_cpg_iterationfinalize));
1356 if (error !=
CS_OK) {
1360 cpg_iteration_instance_finalize (cpg_iteration_instance);
1363 return (res_lib_cpg_iterationfinalize.header.error);
1366 hdb_handle_put (&cpg_iteration_handle_t_db, handle);
The cpg_callbacks_t struct.
cs_error_t cpg_iteration_next(cpg_iteration_handle_t handle, struct cpg_iteration_description_t *description)
cpg_iteration_next
cs_error_t cpg_flow_control_state_get(cpg_handle_t handle, cpg_flow_control_state_t *flow_control_state)
cpg_flow_control_state_get
mar_cpg_address_t member_list[]
mar_req_coroipcc_zc_free_t struct
#define CPG_MAX_NAME_LENGTH
cpg_deliver_fn_t cpg_deliver_fn
cs_error_t hdb_error_to_cs(int res)
cpg_flow_control_state_t
The cpg_flow_control_state_t enum.
#define CPG_MODEL_V1_DELIVER_INITIAL_TOTEM_CONF
cs_error_t cpg_context_set(cpg_handle_t handle, void *context)
Set contexts for a CPG handle.
cpg_confchg_fn_t cpg_confchg_fn
The req_lib_cpg_join struct.
mar_req_coroipcc_zc_alloc_t struct
cs_error_t cpg_local_get(cpg_handle_t handle, unsigned int *local_nodeid)
cpg_local_get
cs_error_t cpg_membership_get(cpg_handle_t handle, struct cpg_name *group_name, struct cpg_address *member_list, int *member_list_entries)
Get membership information from cpg.
The res_lib_cpg_partial_deliver_callback struct.
cs_error_t cpg_iteration_finalize(cpg_iteration_handle_t handle)
cpg_iteration_finalize
The req_lib_cpg_mcast struct.
cpg_iteration_handle_t cpg_iteration_handle
The res_lib_cpg_membership_get struct.
struct message_header header
The res_lib_cpg_iterationnext struct.
unsigned char addr[TOTEMIP_ADDRLEN]
The cpg_iteration_description_t struct.
The res_lib_cpg_iterationinitialize struct.
The req_lib_cpg_local_get struct.
cpg_guarantee_t
The cpg_guarantee_t enum.
cpg_confchg_fn_t cpg_confchg_fn
hdb_handle_t executive_iteration_handle
The res_lib_cpg_partial_send struct.
cs_error_t cpg_fd_get(cpg_handle_t handle, int *fd)
Get a file descriptor on which to poll.
cpg_model_v1_data_t model_v1_data
#define IPC_DISPATCH_SIZE
cs_error_t cpg_zcb_alloc(cpg_handle_t handle, size_t size, void **buffer)
cpg_zcb_alloc
The req_lib_cpg_iterationinitialize struct.
cpg_totem_confchg_fn_t cpg_totem_confchg_fn
cs_error_t cpg_zcb_mcast_joined(cpg_handle_t handle, cpg_guarantee_t guarantee, void *msg, size_t msg_len)
cpg_zcb_mcast_joined
The res_lib_cpg_join struct.
uint64_t cpg_handle_t
cpg_handle_t
struct list_head iteration_list_head
cs_error_t cpg_mcast_joined(cpg_handle_t handle, cpg_guarantee_t guarantee, const struct iovec *iovec, unsigned int iov_len)
Multicast to groups joined with cpg_join.
mar_req_coroipcc_zc_execute_t struct
The res_lib_cpg_mcast struct.
mar_uint32_t member_list[]
cs_error_t
The cs_error_t enum.
cs_error_t cpg_dispatch(cpg_handle_t handle, cs_dispatch_flags_t dispatch_types)
Dispatch messages and configuration changes.
The req_lib_cpg_leave struct.
mar_cpg_address_t member_list[PROCESSOR_COUNT_MAX]
The req_lib_cpg_iterationfinalize struct.
cs_dispatch_flags_t
The cs_dispatch_flags_t enum.
cs_error_t cpg_join(cpg_handle_t handle, const struct cpg_name *group)
Join one or more groups.
The res_lib_cpg_finalize struct.
cpg_model_data_t model_data
cpg_iteration_type_t
The cpg_iteration_type_t enum.
The res_lib_cpg_local_get struct.
The req_lib_cpg_finalize struct.
flow control is disabled - new messages may be sent
qb_ipcc_connection_t * conn
cs_error_t cpg_finalize(cpg_handle_t handle)
Close the cpg handle.
The res_lib_cpg_iterationfinalize struct.
The req_lib_cpg_partial_mcast struct.
cs_error_t cpg_leave(cpg_handle_t handle, const struct cpg_name *group)
Leave one or more groups.
The req_lib_cpg_iterationnext struct.
The res_lib_cpg_confchg_callback struct.
#define list_entry(ptr, type, member)
cs_error_t cpg_model_initialize(cpg_handle_t *handle, cpg_model_t model, cpg_model_data_t *model_data, void *context)
Create a new cpg connection, initialize with model.
cs_error_t cpg_context_get(cpg_handle_t handle, void **context)
Get contexts for a CPG handle.
uint64_t cpg_iteration_handle_t
cpg_iteration_handle_t
The req_lib_cpg_membership_get struct.
cs_error_t cpg_initialize(cpg_handle_t *handle, cpg_callbacks_t *callbacks)
Create a new cpg connection.
The cpg_model_v1_data_t struct.
The res_lib_cpg_leave struct.
cpg_model_t
The cpg_model_t enum.
The cpg_model_data_t struct.
cs_error_t cpg_iteration_initialize(cpg_handle_t handle, cpg_iteration_type_t iteration_type, const struct cpg_name *group, cpg_iteration_handle_t *cpg_iteration_handle)
cpg_iteration_initialize
#define CS_IPC_TIMEOUT_MS
cs_error_t qb_to_cs_error(int result)
qb_to_cs_error
#define CPG_MEMORY_MAP_UMASK
uint32_t assembly_buf_ptr
The res_lib_cpg_totem_confchg_callback struct.
cpg_deliver_fn_t cpg_deliver_fn
cs_error_t cpg_zcb_free(cpg_handle_t handle, void *buffer)
cpg_zcb_free
cs_error_t cpg_max_atomic_msgsize_get(cpg_handle_t handle, uint32_t *size)
Get maximum size of a message that will not be fragmented.
Message from another node.
DECLARE_HDB_DATABASE(cpg_handle_t_db, cpg_inst_free)