You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2018/06/22 14:27:04 UTC
qpid-dispatch git commit: DISPATCH-1044 - Fixed ingress, egress,
transit and pre-settled count for linkk routes
Repository: qpid-dispatch
Updated Branches:
refs/heads/master 6d5d7cd29 -> 2e766f35c
DISPATCH-1044 - Fixed ingress, egress, transit and pre-settled count for linkk routes
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/2e766f35
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/2e766f35
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/2e766f35
Branch: refs/heads/master
Commit: 2e766f35cf2b3a172aaa58cef6c996376e69f1c9
Parents: 6d5d7cd
Author: Ganesh Murthy <gm...@redhat.com>
Authored: Thu Jun 21 20:01:00 2018 -0400
Committer: Ganesh Murthy <gm...@redhat.com>
Committed: Thu Jun 21 20:01:00 2018 -0400
----------------------------------------------------------------------
src/router_core/forwarder.c | 23 ++++++++++++++++++++---
src/router_core/transfer.c | 8 ++++++--
2 files changed, 26 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/2e766f35/src/router_core/forwarder.c
----------------------------------------------------------------------
diff --git a/src/router_core/forwarder.c b/src/router_core/forwarder.c
index fca19c3..0557d01 100644
--- a/src/router_core/forwarder.c
+++ b/src/router_core/forwarder.c
@@ -192,6 +192,20 @@ void qdr_forward_deliver_CT(qdr_core_t *core, qdr_link_t *out_link, qdr_delivery
sys_mutex_unlock(out_link->conn->work_lock);
//
+ // We are dealing here only with link routed deliveries
+ // If the out_link has a connected link and if the out_link is an inter-router link, increment the global deliveries_transit
+ // If the out_link is a route container link, add to the global deliveries_egress
+ //
+ if (out_link && out_link->connected_link) {
+ if (out_link->conn->role == QDR_ROLE_INTER_ROUTER) {
+ core->deliveries_transit++;
+ }
+ else {
+ core->deliveries_egress++;
+ }
+ }
+
+ //
// Activate the outgoing connection for later processing.
//
qdr_connection_activate_CT(core, out_link->conn);
@@ -326,7 +340,8 @@ int qdr_forward_multicast_CT(qdr_core_t *core,
qdr_forward_deliver_CT(core, dest_link, out_delivery);
fanout++;
addr->deliveries_transit++;
- core->deliveries_transit++;
+ if (dest_link->link_type == QD_LINK_ROUTER)
+ core->deliveries_transit++;
}
}
@@ -499,7 +514,8 @@ int qdr_forward_closest_CT(qdr_core_t *core,
out_delivery = qdr_forward_new_delivery_CT(core, in_delivery, out_link, msg);
qdr_forward_deliver_CT(core, out_link, out_delivery);
addr->deliveries_transit++;
- core->deliveries_transit++;
+ if (out_link->link_type == QD_LINK_ROUTER)
+ core->deliveries_transit++;
return 1;
}
}
@@ -661,7 +677,8 @@ int qdr_forward_balanced_CT(qdr_core_t *core,
//
if (chosen_link_bit >= 0) {
addr->deliveries_transit++;
- core->deliveries_transit++;
+ if (chosen_link->link_type == QD_LINK_ROUTER)
+ core->deliveries_transit++;
}
else {
addr->deliveries_egress++;
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/2e766f35/src/router_core/transfer.c
----------------------------------------------------------------------
diff --git a/src/router_core/transfer.c b/src/router_core/transfer.c
index dfaaf35..184cda6 100644
--- a/src/router_core/transfer.c
+++ b/src/router_core/transfer.c
@@ -531,7 +531,7 @@ static void qdr_delete_delivery_internal_CT(qdr_core_t *core, qdr_delivery_t *de
if (link) {
if (delivery->presettled) {
link->presettled_deliveries++;
- if (link->link_direction == QD_INCOMING)
+ if (link->link_direction == QD_INCOMING && link->link_type == QD_LINK_ENDPOINT)
core->presettled_deliveries++;
}
else if (delivery->disposition == PN_ACCEPTED) {
@@ -810,7 +810,8 @@ static void qdr_link_forward_CT(qdr_core_t *core, qdr_link_t *link, qdr_delivery
if (dlv->settled) {
// Increment the presettled_dropped_deliveries on the in_link
link->dropped_presettled_deliveries++;
- core->dropped_presettled_deliveries++;
+ if (dlv->link->link_type == QD_LINK_ENDPOINT)
+ core->dropped_presettled_deliveries++;
} else
qdr_delivery_release_CT(core, dlv);
@@ -946,6 +947,9 @@ static void qdr_link_deliver_CT(qdr_core_t *core, qdr_action_t *action, bool dis
if (link->connected_link) {
+ if (link->link_direction == QD_INCOMING)
+ core->deliveries_ingress++;
+
//
// If this is an attach-routed link, put the delivery directly onto the peer link
//
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org