@@ -635,6 +635,14 @@ void qdr_core_remove_address_config(qdr_core_t *core, qdr_address_config_t *addr
635
635
bool qdr_is_addr_treatment_multicast (qdr_address_t * addr );
636
636
const char * get_address_treatment_string (qd_address_treatment_t treatment );
637
637
638
+ // non-streaming inter-router links sorted by priority
639
+ //
640
+ typedef struct qdr_priority_sheaf_t {
641
+ qdr_link_t * link [QDR_N_PRIORITIES ];
642
+ int count ;
643
+ } qdr_priority_sheaf_t ;
644
+
645
+
638
646
//
639
647
// Connection Information
640
648
//
@@ -682,26 +690,29 @@ struct qdr_connection_t {
682
690
bool closed ; // This bit is used in the case where a client is trying to force close this connection.
683
691
uint8_t next_pri ; // for incoming inter-router data links
684
692
qdr_connection_role_t role ;
685
- int inter_router_cost ;
686
693
qdr_conn_identifier_t * conn_id ;
687
694
qdr_conn_identifier_t * alt_conn_id ;
688
695
bool strip_annotations_in ;
689
696
bool strip_annotations_out ;
697
+ bool enable_protocol_trace ; // Has trace level logging been turned on for this connection.
698
+ bool has_streaming_links ; ///< one or more of this connection's links are for streaming messages
699
+ int inter_router_cost ;
690
700
int link_capacity ;
691
- int mask_bit ; ///< set only if inter-router connection
701
+ int mask_bit ; ///< set only if inter-router control connection
702
+ int group_parent_mask_bit ; ///< if inter-router data connection maskbit of group parent inter-router control conn
692
703
qdr_connection_work_list_t work_list ;
693
704
sys_mutex_t work_lock ;
694
705
qdr_link_ref_list_t links ;
695
706
qdr_link_ref_list_t links_with_work [QDR_N_PRIORITIES ];
696
707
qdr_connection_info_t * connection_info ;
697
708
void * user_context ; /* Updated from IO thread, use work_lock */
709
+ qdr_link_t * control_links [2 ]; // QD_LINK_CONTROL links [QD_INCOMING/QD_OUTGOING] (inter-router conn only)
710
+ qdr_priority_sheaf_t data_links ; // links for non-streaming messages (by priority) (inter-router conn only)
698
711
qd_conn_oper_status_t oper_status ;
699
712
qd_conn_admin_status_t admin_status ;
700
713
qdr_error_t * error ;
701
714
uint32_t conn_uptime ; // Timestamp which can be used to calculate the number of seconds this connection has been up and running.
702
715
uint32_t last_delivery_time ; // Timestamp which can be used to calculate the number of seconds since the last delivery arrived on this connection.
703
- bool enable_protocol_trace ; // Has trace level logging been turned on for this connection.
704
- bool has_streaming_links ; ///< one or more of this connection's links are for streaming messages
705
716
qdr_link_list_t streaming_link_pool ; ///< pool of links available for streaming messages
706
717
const qd_policy_spec_t * policy_spec ;
707
718
qdr_connection_list_t connection_group ; ///< List of associated connection group members
@@ -767,11 +778,6 @@ struct qdr_conn_identifier_t {
767
778
qdr_auto_link_list_t auto_link_refs ;
768
779
};
769
780
770
- typedef struct qdr_priority_sheaf_t {
771
- qdr_link_t * links [QDR_N_PRIORITIES ];
772
- int count ;
773
- } qdr_priority_sheaf_t ;
774
-
775
781
776
782
struct qdr_protocol_adaptor_t {
777
783
DEQ_LINKS (qdr_protocol_adaptor_t );
@@ -882,14 +888,13 @@ struct qdr_core_t {
882
888
qdr_address_t * router_addr_T ;
883
889
qdr_address_t * routerma_addr_T ;
884
890
885
- qdr_node_list_t routers ; ///< List of routers, in order of cost, from lowest to highest
886
- qd_bitmask_t * neighbor_free_mask ; ///< bits available for new conns (qd_connection_t->mask_bit values)
887
- qdr_node_t * * routers_by_mask_bit ; ///< indexed by qdr_node_t->mask_bit
888
- qdr_connection_t * * rnode_conns_by_mask_bit ; ///< inter-router conns indexed by conn->mask_bit
889
- qdr_link_t * * control_links_by_mask_bit ; ///< indexed by qdr_node_t->link_mask_bit, qdr_connection_t->mask_bit
890
- qdr_priority_sheaf_t * data_links_by_mask_bit ; ///< indexed by qdr_node_t->link_mask_bit, qdr_connection_t->mask_bit
891
- qdr_connection_list_t unallocated_group_members ; ///< List of unallocated group members (i.e. before the group is given a maskbit)
892
- char * * group_correlator_by_maskbit ; ///< Group correlator number indexed by conn->maskbit
891
+ qdr_node_list_t routers ; ///< List of routers, in order of cost, from lowest to highest
892
+ qd_bitmask_t * neighbor_free_mask ; ///< bits available for new conns (qd_connection_t->mask_bit values)
893
+ qdr_node_t * * routers_by_mask_bit ; ///< indexed by qdr_node_t->mask_bit
894
+ qdr_connection_t * * rnode_conns_by_mask_bit ; ///< inter-router conns indexed by conn->mask_bit
895
+ qdr_connection_t * * pending_rnode_conns_by_mask_bit ; ///< higher precedence inter-router conns pending upgrade [conn->mask_bit]
896
+ qdr_connection_list_t unallocated_group_members ; ///< List of unallocated group members (i.e. before the group is given a maskbit)
897
+ char * * group_correlator_by_maskbit ; ///< Group correlator number indexed by conn->maskbit
893
898
uint64_t cost_epoch ;
894
899
895
900
uint64_t next_tag ;
@@ -1061,10 +1066,9 @@ void qdr_core_timer_free_CT(qdr_core_t *core, qdr_core_timer_t *timer);
1061
1066
* Clears the sheaf of priority links in a connection.
1062
1067
* Call this when a connection is being closed, when the mask-bit
1063
1068
* for that sheaf is being returned to the core for re-use.
1064
- * @param core Pointer to the core object returned by qd_core()
1065
- * @param n uint8_t index for the sheaf to be reset prior to re-use.
1069
+ * @param conn Pointer to the connection owning the sheaf
1066
1070
*/
1067
- void qdr_reset_sheaf (qdr_core_t * core , uint8_t n );
1071
+ void qdr_reset_sheaf (qdr_connection_t * conn );
1068
1072
1069
1073
/**
1070
1074
* Run in an IO thread.
0 commit comments