[devel] [PATCH 0/1] Review Request for mds: support multicast fragmented messages [#3033] V3
Summary: mds: support multicast fragmented messages [#3033] Review request for Ticket(s): 3033 Peer Reviewer(s): Hans, Minh, Vu Pull request to: *** LIST THE PERSON WITH PUSH ACCESS HERE *** Affected branch(es): develop Development branch: ticket-3033 Base revision: 7916ac316e86478c621c8359cf2aca4886288a38 Personal repository: git://git.code.sf.net/u/thuantr/review Impacted area Impact y/n Docsn Build systemn RPM/packaging n Configuration files n Startup scripts n SAF servicesy OpenSAF servicesn Core libraries n Samples n Tests n Other n NOTE: Patch(es) contain lines longer than 80 characers Comments (indicate scope for each "y" above): - N/A revision 568f09774f936506f5e05e03813fa572af0fe0d3 Author: thuan.tran Date: Wed, 24 Apr 2019 17:54:25 +0700 mds: support multicast fragmented messages [#3033] - Sender may send broadcast big messages (> 65K) then small messages (< 65K). Current MDS just loop via all destinations to unicast all fragmented messages to one by one destinations. But sending multicast non-fragment messages to all destinations. Therefor, receivers may get messages with incorrect order, non-fragment messages may come before fragmented messages. For example, it may lead to OUT OF ORDER for IMMNDs during IMMD sync. - Solution: support send multicast each fragmented messages to avoid disorder of arrived broadcast messages. Complete diffstat: -- src/mds/mds_c_sndrcv.c | 3 +- src/mds/mds_dt_tipc.c | 104 +++-- 2 files changed, 40 insertions(+), 67 deletions(-) Testing Commands: - N/A Testing, Expected Results: -- N/A Conditions of Submission: - N/A Arch Built StartedLinux distro --- mipsn n mips64 n n x86 n n x86_64 y y powerpc n n powerpc64 n n Reviewer Checklist: --- [Submitters: make sure that your review doesn't trigger any checkmarks!] Your checkin has not passed review because (see checked entries): ___ Your RR template is generally incomplete; it has too many blank entries that need proper data filled in. ___ You have failed to nominate the proper persons for review and push. ___ Your patches do not have proper short+long header ___ You have grammar/spelling in your header that is unacceptable. ___ You have exceeded a sensible line length in your headers/comments/text. ___ You have failed to put in a proper Trac Ticket # into your commits. ___ You have incorrectly put/left internal data in your comments/files (i.e. internal bug tracking tool IDs, product names etc) ___ You have not given any evidence of testing beyond basic build tests. Demonstrate some level of runtime or other sanity testing. ___ You have ^M present in some of your files. These have to be removed. ___ You have needlessly changed whitespace or added whitespace crimes like trailing spaces, or spaces before tabs. ___ You have mixed real technical changes with whitespace and other cosmetic code cleanup changes. These have to be separate commits. ___ You need to refactor your submission into logical chunks; there is too much content into a single commit. ___ You have extraneous garbage in your review (merge commits etc) ___ You have giant attachments which should never have been sent; Instead you should place your content in a public tree to be pulled. ___ You have too many commits attached to an e-mail; resend as threaded commits, or place in a public tree for a pull. ___ You have resent this content multiple times without a clear indication of what has changed between each re-send. ___ You have failed to adequately and individually address all of the comments and change requests that were proposed in the initial review. ___ You have a misconfigured ~/.gitconfig file (i.e. user.name, user.email etc) ___ Your computer have a badly configured date and time; confusing the the threaded patch review. ___ Your changes affect IPC mechanism, and you don't present any results for in-service upgradability test. ___ Your changes affect user manual and documentation, your patch series do not contain the patch that updates the Doxygen manual. ___ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel
[devel] [PATCH 1/1] mds: support multicast fragmented messages [#3033]
- Sender may send broadcast big messages (> 65K) then small messages (< 65K). Current MDS just loop via all destinations to unicast all fragmented messages to one by one destinations. But sending multicast non-fragment messages to all destinations. Therefor, receivers may get messages with incorrect order, non-fragment messages may come before fragmented messages. For example, it may lead to OUT OF ORDER for IMMNDs during IMMD sync. - Solution: support send multicast each fragmented messages to avoid disorder of arrived broadcast messages. --- src/mds/mds_c_sndrcv.c | 3 +- src/mds/mds_dt_tipc.c | 104 +++-- 2 files changed, 40 insertions(+), 67 deletions(-) diff --git a/src/mds/mds_c_sndrcv.c b/src/mds/mds_c_sndrcv.c index 703bc8e..7850ac7 100644 --- a/src/mds/mds_c_sndrcv.c +++ b/src/mds/mds_c_sndrcv.c @@ -4496,8 +4496,7 @@ static uint32_t mcm_pvt_process_svc_bcast_common( info_result->key.vdest_id, req, 0, info_result->key.adest, pri); if ((svc_cb->subtn_info->prev_ver_sub_count == 0) && - (tipc_mode_enabled) && (tipc_mcast_enabled) && - (to_msg.bcast_buff_len < MDS_DIRECT_BUF_MAXSIZE)) { + (tipc_mode_enabled) && (tipc_mcast_enabled)) { m_MDS_LOG_DBG( "MDTM: Break while(1) prev_ver_sub_count: %d svc_id =%s(%d) to_msg.bcast_buff_len: %d ", svc_cb->subtn_info->prev_ver_sub_count, diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c index a3abff5..d8f8c78 100644 --- a/src/mds/mds_dt_tipc.c +++ b/src/mds/mds_dt_tipc.c @@ -2856,6 +2856,7 @@ uint32_t mdtm_frag_and_send(MDTM_SEND_REQ *req, uint32_t seq_num, uint16_t frag_val = 0; uint32_t sum_mds_hdr_plus_mdtm_hdr_plus_len; int version = req->msg_arch_word & 0x7; + uint32_t ret = NCSCC_RC_SUCCESS; if (version > 1) { sum_mds_hdr_plus_mdtm_hdr_plus_len = @@ -2914,95 +2915,66 @@ uint32_t mdtm_frag_and_send(MDTM_SEND_REQ *req, uint32_t seq_num, frag_val = NO_FRAG_BIT | i; } { + uint32_t hdr_plus = (i == 1) ? + sum_mds_hdr_plus_mdtm_hdr_plus_len : MDTM_FRAG_HDR_PLUS_LEN_2; uint8_t *body = NULL; body = calloc(1, len_buf); + p8 = (uint8_t *)m_MMGR_DATA_AT_START(usrbuf, len_buf - hdr_plus, + (char *)(body + hdr_plus)); + if (p8 != (body + hdr_plus)) + memcpy((body + hdr_plus), p8, len_buf - hdr_plus); if (i == 1) { - p8 = (uint8_t *)m_MMGR_DATA_AT_START( - usrbuf, - (len_buf - -sum_mds_hdr_plus_mdtm_hdr_plus_len), - (char -*)(body + - sum_mds_hdr_plus_mdtm_hdr_plus_len)); - - if (p8 != - (body + sum_mds_hdr_plus_mdtm_hdr_plus_len)) - memcpy( - (body + - sum_mds_hdr_plus_mdtm_hdr_plus_len), - p8, - (len_buf - - sum_mds_hdr_plus_mdtm_hdr_plus_len)); - if (NCSCC_RC_SUCCESS != mdtm_add_mds_hdr(body, req)) { m_MDS_LOG_ERR( "MDTM: frg MDS hdr addition failed\n"); - free(body); - m_MMGR_FREE_BUFR_LIST(usrbuf); - return NCSCC_RC_FAILURE; - } - - if (NCSCC_RC_SUCCESS != - mdtm_add_frag_hdr(body, len_buf, seq_num, - frag_val)) { - m_MDS_LOG_ERR( - "MDTM: Frag hdr addition failed\n"); m_MMGR_FREE_BUFR_LIST(usrbuf); free(body); return NCSCC_RC_FAILURE; } + } + if (NCSCC_RC_SUCCESS != + mdtm_add_frag_hdr(body, len_buf, seq_num, + frag_val)) { +
Re: [devel] [PATCH 1/1] mds: support multicast fragmented messages [#3033]
Hi bro.Vu, OK, you are right. It should call m_MMGR_FREE_BUFR_LIST(usrbuf); before break I will send out V2. Best Regards, ThuanTr -Original Message- From: Vu Minh Nguyen Sent: Wednesday, April 24, 2019 2:30 PM To: 'Tran Thuan' ; hans.nordeb...@ericsson.com; 'Minh Hon Chau' Cc: opensaf-devel@lists.sourceforge.net Subject: RE: [PATCH 1/1] mds: support multicast fragmented messages [#3033] Hi Thuan, m_MMGR_REMOVE_FROM_START() is just removed n bytes from the start, not whole memory chain. You can refer to descriptions of these macros to see the differences b/w them. Regards, Vu > -Original Message- > From: Tran Thuan > Sent: Wednesday, April 24, 2019 2:17 PM > To: 'Vu Minh Nguyen' ; > hans.nordeb...@ericsson.com; 'Minh Hon Chau' c...@users.sourceforge.net> > Cc: opensaf-devel@lists.sourceforge.net > Subject: RE: [PATCH 1/1] mds: support multicast fragmented messages > [#3033] > > Hi bro.Vu, > > I think it won't cause memleak since I break after > m_MMGR_REMOVE_FROM_START() > free(body) > > Best Regards, > ThuanTr > > -Original Message- > From: Vu Minh Nguyen > Sent: Wednesday, April 24, 2019 1:45 PM > To: 'thuan.tran' ; > hans.nordeb...@ericsson.com; 'Minh Hon Chau' > > Cc: opensaf-devel@lists.sourceforge.net > Subject: RE: [PATCH 1/1] mds: support multicast fragmented messages > [#3033] > > Hi Thuan, > > Tested broadcasting with large packages (each 1M). > > Ack with below comments. > > Regards, Vu > > > -Original Message- > > From: thuan.tran > > Sent: Wednesday, April 24, 2019 12:00 PM > > To: hans.nordeb...@ericsson.com; Vu Minh Nguyen > > ; Minh Hon Chau > c...@users.sourceforge.net> > > Cc: opensaf-devel@lists.sourceforge.net; thuan.tran > > > > Subject: [PATCH 1/1] mds: support multicast fragmented messages > > [#3033] > > > > - Sender may send broadcast big messages (> 65K) then small messages > > (< 65K). > > Current MDS just loop via all destinations to unicast all fragmented > messages > > to one by one destinations. But sending multicast non-fragment > > messages to all destinations. Therefor, receivers may get messages > > with incorrect order, non-fragment messages may come before > fragmented > > messages. > > For example, it may lead to OUT OF ORDER for IMMNDs during IMMD sync. > > - Solution: support send multicast each fragmented messages to avoid > > disorder of arrived broadcast messages. > > --- > > src/mds/mds_c_sndrcv.c | 3 +-- > > src/mds/mds_dt_tipc.c | 55 > > -- > > 2 files changed, 45 insertions(+), 13 deletions(-) > > > > diff --git a/src/mds/mds_c_sndrcv.c b/src/mds/mds_c_sndrcv.c index > > 703bc8e..7850ac7 100644 > > --- a/src/mds/mds_c_sndrcv.c > > +++ b/src/mds/mds_c_sndrcv.c > > @@ -4496,8 +4496,7 @@ static uint32_t > > mcm_pvt_process_svc_bcast_common( > > info_result->key.vdest_id, > req, 0, > > info_result->key.adest, pri); > > if ((svc_cb->subtn_info->prev_ver_sub_count == 0) && > > - (tipc_mode_enabled) && (tipc_mcast_enabled) && > > - (to_msg.bcast_buff_len < MDS_DIRECT_BUF_MAXSIZE)) { > > + (tipc_mode_enabled) && (tipc_mcast_enabled)) { > > m_MDS_LOG_DBG( > > "MDTM: Break while(1) prev_ver_sub_count: %d > svc_id =%s(%d) > > to_msg.bcast_buff_len: %d ", > > svc_cb->subtn_info->prev_ver_sub_count, > > diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c index > > a3abff5..656f79c 100644 > > --- a/src/mds/mds_dt_tipc.c > > +++ b/src/mds/mds_dt_tipc.c > > @@ -2856,6 +2856,7 @@ uint32_t > mdtm_frag_and_send(MDTM_SEND_REQ *req, > > uint32_t seq_num, > > uint16_t frag_val = 0; > > uint32_t sum_mds_hdr_plus_mdtm_hdr_plus_len; > > int version = req->msg_arch_word & 0x7; > > + uint32_t ret = NCSCC_RC_SUCCESS; > > > > if (version > 1) { > > sum_mds_hdr_plus_mdtm_hdr_plus_len = @@ -2952,11 > +2953,23 @@ > > > uint32_t mdtm_frag_and_send(MDTM_SEND_REQ *req, uint32_t seq_num, > > free(body); > > return NCSCC_RC_FAILURE; > > } > > - m_MDS_LOG_DBG( > > - "MDTM:Sending message with Service > > Seqno=%d, Fragment Seqnum=%d, frag_num=%d, TO > > Dest_Tipc_id=<0x%08x:%u>", > > - req->svc_seq_num, seq_num, frag_val, > > - id.node, id.ref); > > - mdtm_sendto(body, len_buf, id); > > + if (((req->snd_type == MDS_SENDTYPE_RBCAST) > > || > > +(req->snd_type == MDS_SENDTYPE_BCAST)) > > && > > + (version > 0) && (tipc_mcast_enabled)) { > > + m_MDS_LOG_DBG( > > +
Re: [devel] [PATCH 1/1] mds: support multicast fragmented messages [#3033]
Hi Thuan, m_MMGR_REMOVE_FROM_START() is just removed n bytes from the start, not whole memory chain. You can refer to descriptions of these macros to see the differences b/w them. Regards, Vu > -Original Message- > From: Tran Thuan > Sent: Wednesday, April 24, 2019 2:17 PM > To: 'Vu Minh Nguyen' ; > hans.nordeb...@ericsson.com; 'Minh Hon Chau' c...@users.sourceforge.net> > Cc: opensaf-devel@lists.sourceforge.net > Subject: RE: [PATCH 1/1] mds: support multicast fragmented messages > [#3033] > > Hi bro.Vu, > > I think it won't cause memleak since I break after > m_MMGR_REMOVE_FROM_START() > free(body) > > Best Regards, > ThuanTr > > -Original Message- > From: Vu Minh Nguyen > Sent: Wednesday, April 24, 2019 1:45 PM > To: 'thuan.tran' ; > hans.nordeb...@ericsson.com; > 'Minh Hon Chau' > Cc: opensaf-devel@lists.sourceforge.net > Subject: RE: [PATCH 1/1] mds: support multicast fragmented messages > [#3033] > > Hi Thuan, > > Tested broadcasting with large packages (each 1M). > > Ack with below comments. > > Regards, Vu > > > -Original Message- > > From: thuan.tran > > Sent: Wednesday, April 24, 2019 12:00 PM > > To: hans.nordeb...@ericsson.com; Vu Minh Nguyen > > ; Minh Hon Chau > c...@users.sourceforge.net> > > Cc: opensaf-devel@lists.sourceforge.net; thuan.tran > > > > Subject: [PATCH 1/1] mds: support multicast fragmented messages > > [#3033] > > > > - Sender may send broadcast big messages (> 65K) then small messages > > (< 65K). > > Current MDS just loop via all destinations to unicast all fragmented > messages > > to one by one destinations. But sending multicast non-fragment > > messages to all destinations. Therefor, receivers may get messages > > with incorrect order, non-fragment messages may come before > fragmented > > messages. > > For example, it may lead to OUT OF ORDER for IMMNDs during IMMD sync. > > - Solution: support send multicast each fragmented messages to avoid > > disorder of arrived broadcast messages. > > --- > > src/mds/mds_c_sndrcv.c | 3 +-- > > src/mds/mds_dt_tipc.c | 55 > > -- > > 2 files changed, 45 insertions(+), 13 deletions(-) > > > > diff --git a/src/mds/mds_c_sndrcv.c b/src/mds/mds_c_sndrcv.c index > > 703bc8e..7850ac7 100644 > > --- a/src/mds/mds_c_sndrcv.c > > +++ b/src/mds/mds_c_sndrcv.c > > @@ -4496,8 +4496,7 @@ static uint32_t > > mcm_pvt_process_svc_bcast_common( > > info_result->key.vdest_id, > req, 0, > > info_result->key.adest, pri); > > if ((svc_cb->subtn_info->prev_ver_sub_count == 0) && > > - (tipc_mode_enabled) && (tipc_mcast_enabled) && > > - (to_msg.bcast_buff_len < MDS_DIRECT_BUF_MAXSIZE)) { > > + (tipc_mode_enabled) && (tipc_mcast_enabled)) { > > m_MDS_LOG_DBG( > > "MDTM: Break while(1) prev_ver_sub_count: %d > svc_id =%s(%d) > > to_msg.bcast_buff_len: %d ", > > svc_cb->subtn_info->prev_ver_sub_count, > > diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c index > > a3abff5..656f79c 100644 > > --- a/src/mds/mds_dt_tipc.c > > +++ b/src/mds/mds_dt_tipc.c > > @@ -2856,6 +2856,7 @@ uint32_t > mdtm_frag_and_send(MDTM_SEND_REQ *req, > > uint32_t seq_num, > > uint16_t frag_val = 0; > > uint32_t sum_mds_hdr_plus_mdtm_hdr_plus_len; > > int version = req->msg_arch_word & 0x7; > > + uint32_t ret = NCSCC_RC_SUCCESS; > > > > if (version > 1) { > > sum_mds_hdr_plus_mdtm_hdr_plus_len = @@ -2952,11 > +2953,23 @@ > > > uint32_t mdtm_frag_and_send(MDTM_SEND_REQ *req, uint32_t seq_num, > > free(body); > > return NCSCC_RC_FAILURE; > > } > > - m_MDS_LOG_DBG( > > - "MDTM:Sending message with Service > > Seqno=%d, Fragment Seqnum=%d, frag_num=%d, TO > > Dest_Tipc_id=<0x%08x:%u>", > > - req->svc_seq_num, seq_num, frag_val, > > - id.node, id.ref); > > - mdtm_sendto(body, len_buf, id); > > + if (((req->snd_type == MDS_SENDTYPE_RBCAST) > > || > > +(req->snd_type == MDS_SENDTYPE_BCAST)) > > && > > + (version > 0) && (tipc_mcast_enabled)) { > > + m_MDS_LOG_DBG( > > + "MDTM:Send Multicast message > with > > Service Seqno=%d, Fragment Seqnum=%d, frag_num=%d " > > + "From svc_id = %s(%d) TO svc_id > = > > %s(%d)", > > + req->svc_seq_num, seq_num, > > frag_val, > > + get_svc_names(req->src_svc_id), > req- > > >src_svc_id, > > +
Re: [devel] [PATCH 1/1] mds: support multicast fragmented messages [#3033]
Hi bro.Vu, I think it won't cause memleak since I break after m_MMGR_REMOVE_FROM_START() free(body) Best Regards, ThuanTr -Original Message- From: Vu Minh Nguyen Sent: Wednesday, April 24, 2019 1:45 PM To: 'thuan.tran' ; hans.nordeb...@ericsson.com; 'Minh Hon Chau' Cc: opensaf-devel@lists.sourceforge.net Subject: RE: [PATCH 1/1] mds: support multicast fragmented messages [#3033] Hi Thuan, Tested broadcasting with large packages (each 1M). Ack with below comments. Regards, Vu > -Original Message- > From: thuan.tran > Sent: Wednesday, April 24, 2019 12:00 PM > To: hans.nordeb...@ericsson.com; Vu Minh Nguyen > ; Minh Hon Chau c...@users.sourceforge.net> > Cc: opensaf-devel@lists.sourceforge.net; thuan.tran > > Subject: [PATCH 1/1] mds: support multicast fragmented messages > [#3033] > > - Sender may send broadcast big messages (> 65K) then small messages > (< 65K). > Current MDS just loop via all destinations to unicast all fragmented messages > to one by one destinations. But sending multicast non-fragment > messages to all destinations. Therefor, receivers may get messages > with incorrect order, non-fragment messages may come before fragmented > messages. > For example, it may lead to OUT OF ORDER for IMMNDs during IMMD sync. > - Solution: support send multicast each fragmented messages to avoid > disorder of arrived broadcast messages. > --- > src/mds/mds_c_sndrcv.c | 3 +-- > src/mds/mds_dt_tipc.c | 55 > -- > 2 files changed, 45 insertions(+), 13 deletions(-) > > diff --git a/src/mds/mds_c_sndrcv.c b/src/mds/mds_c_sndrcv.c index > 703bc8e..7850ac7 100644 > --- a/src/mds/mds_c_sndrcv.c > +++ b/src/mds/mds_c_sndrcv.c > @@ -4496,8 +4496,7 @@ static uint32_t > mcm_pvt_process_svc_bcast_common( > info_result->key.vdest_id, req, 0, > info_result->key.adest, pri); > if ((svc_cb->subtn_info->prev_ver_sub_count == 0) && > - (tipc_mode_enabled) && (tipc_mcast_enabled) && > - (to_msg.bcast_buff_len < MDS_DIRECT_BUF_MAXSIZE)) { > + (tipc_mode_enabled) && (tipc_mcast_enabled)) { > m_MDS_LOG_DBG( > "MDTM: Break while(1) prev_ver_sub_count: %d svc_id =%s(%d) > to_msg.bcast_buff_len: %d ", > svc_cb->subtn_info->prev_ver_sub_count, > diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c index > a3abff5..656f79c 100644 > --- a/src/mds/mds_dt_tipc.c > +++ b/src/mds/mds_dt_tipc.c > @@ -2856,6 +2856,7 @@ uint32_t mdtm_frag_and_send(MDTM_SEND_REQ *req, > uint32_t seq_num, > uint16_t frag_val = 0; > uint32_t sum_mds_hdr_plus_mdtm_hdr_plus_len; > int version = req->msg_arch_word & 0x7; > + uint32_t ret = NCSCC_RC_SUCCESS; > > if (version > 1) { > sum_mds_hdr_plus_mdtm_hdr_plus_len = @@ -2952,11 +2953,23 @@ > uint32_t mdtm_frag_and_send(MDTM_SEND_REQ *req, uint32_t seq_num, > free(body); > return NCSCC_RC_FAILURE; > } > - m_MDS_LOG_DBG( > - "MDTM:Sending message with Service > Seqno=%d, Fragment Seqnum=%d, frag_num=%d, TO > Dest_Tipc_id=<0x%08x:%u>", > - req->svc_seq_num, seq_num, frag_val, > - id.node, id.ref); > - mdtm_sendto(body, len_buf, id); > + if (((req->snd_type == MDS_SENDTYPE_RBCAST) > || > + (req->snd_type == MDS_SENDTYPE_BCAST)) > && > + (version > 0) && (tipc_mcast_enabled)) { > + m_MDS_LOG_DBG( > + "MDTM:Send Multicast message with > Service Seqno=%d, Fragment Seqnum=%d, frag_num=%d " > + "From svc_id = %s(%d) TO svc_id = > %s(%d)", > + req->svc_seq_num, seq_num, > frag_val, > + get_svc_names(req->src_svc_id), req- > >src_svc_id, > + get_svc_names(req->dest_svc_id), > req->dest_svc_id); > + ret = mdtm_mcast_sendto(body, > len_buf, req); > + } else { > + m_MDS_LOG_DBG( > + "MDTM:Sending message with Service > Seqno=%d, Fragment Seqnum=%d, frag_num=%d, TO > Dest_Tipc_id=<0x%08x:%u>", > + req->svc_seq_num, seq_num, > frag_val, > + id.node, id.ref); > + ret = mdtm_sendto(body, len_buf, id); > + }
Re: [devel] [PATCH 1/1] mds: support multicast fragmented messages [#3033]
Hi Thuan, Tested broadcasting with large packages (each 1M). Ack with below comments. Regards, Vu > -Original Message- > From: thuan.tran > Sent: Wednesday, April 24, 2019 12:00 PM > To: hans.nordeb...@ericsson.com; Vu Minh Nguyen > ; Minh Hon Chau c...@users.sourceforge.net> > Cc: opensaf-devel@lists.sourceforge.net; thuan.tran > > Subject: [PATCH 1/1] mds: support multicast fragmented messages [#3033] > > - Sender may send broadcast big messages (> 65K) then small messages (< > 65K). > Current MDS just loop via all destinations to unicast all fragmented messages > to one by one destinations. But sending multicast non-fragment messages to > all > destinations. Therefor, receivers may get messages with incorrect order, > non-fragment messages may come before fragmented messages. > For example, it may lead to OUT OF ORDER for IMMNDs during IMMD sync. > - Solution: support send multicast each fragmented messages to avoid > disorder of arrived broadcast messages. > --- > src/mds/mds_c_sndrcv.c | 3 +-- > src/mds/mds_dt_tipc.c | 55 > -- > 2 files changed, 45 insertions(+), 13 deletions(-) > > diff --git a/src/mds/mds_c_sndrcv.c b/src/mds/mds_c_sndrcv.c > index 703bc8e..7850ac7 100644 > --- a/src/mds/mds_c_sndrcv.c > +++ b/src/mds/mds_c_sndrcv.c > @@ -4496,8 +4496,7 @@ static uint32_t > mcm_pvt_process_svc_bcast_common( > info_result->key.vdest_id, req, 0, > info_result->key.adest, pri); > if ((svc_cb->subtn_info->prev_ver_sub_count == 0) && > - (tipc_mode_enabled) && (tipc_mcast_enabled) && > - (to_msg.bcast_buff_len < MDS_DIRECT_BUF_MAXSIZE)) { > + (tipc_mode_enabled) && (tipc_mcast_enabled)) { > m_MDS_LOG_DBG( > "MDTM: Break while(1) prev_ver_sub_count: %d > svc_id =%s(%d) to_msg.bcast_buff_len: %d ", > svc_cb->subtn_info->prev_ver_sub_count, > diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c > index a3abff5..656f79c 100644 > --- a/src/mds/mds_dt_tipc.c > +++ b/src/mds/mds_dt_tipc.c > @@ -2856,6 +2856,7 @@ uint32_t mdtm_frag_and_send(MDTM_SEND_REQ > *req, uint32_t seq_num, > uint16_t frag_val = 0; > uint32_t sum_mds_hdr_plus_mdtm_hdr_plus_len; > int version = req->msg_arch_word & 0x7; > + uint32_t ret = NCSCC_RC_SUCCESS; > > if (version > 1) { > sum_mds_hdr_plus_mdtm_hdr_plus_len = > @@ -2952,11 +2953,23 @@ uint32_t > mdtm_frag_and_send(MDTM_SEND_REQ *req, uint32_t seq_num, > free(body); > return NCSCC_RC_FAILURE; > } > - m_MDS_LOG_DBG( > - "MDTM:Sending message with Service > Seqno=%d, Fragment Seqnum=%d, frag_num=%d, TO > Dest_Tipc_id=<0x%08x:%u>", > - req->svc_seq_num, seq_num, frag_val, > - id.node, id.ref); > - mdtm_sendto(body, len_buf, id); > + if (((req->snd_type == MDS_SENDTYPE_RBCAST) > || > + (req->snd_type == MDS_SENDTYPE_BCAST)) > && > + (version > 0) && (tipc_mcast_enabled)) { > + m_MDS_LOG_DBG( > + "MDTM:Send Multicast message with > Service Seqno=%d, Fragment Seqnum=%d, frag_num=%d " > + "From svc_id = %s(%d) TO svc_id = > %s(%d)", > + req->svc_seq_num, seq_num, > frag_val, > + get_svc_names(req->src_svc_id), req- > >src_svc_id, > + get_svc_names(req->dest_svc_id), > req->dest_svc_id); > + ret = mdtm_mcast_sendto(body, > len_buf, req); > + } else { > + m_MDS_LOG_DBG( > + "MDTM:Sending message with Service > Seqno=%d, Fragment Seqnum=%d, frag_num=%d, TO > Dest_Tipc_id=<0x%08x:%u>", > + req->svc_seq_num, seq_num, > frag_val, > + id.node, id.ref); > + ret = mdtm_sendto(body, len_buf, id); > + } > m_MMGR_REMOVE_FROM_START( > , > len_buf - > @@ -2965,6 +2978,9 @@ uint32_t mdtm_frag_and_send(MDTM_SEND_REQ > *req, uint32_t seq_num, > len = > len - (len_buf - > > sum_mds_hdr_plus_mdtm_hdr_plus_len); > + if (ret !=