From: Matthew Dillon Date: Fri, 10 Aug 2012 18:20:24 +0000 (-0700) Subject: hammer2 - Message span tree work X-Git-Tag: v3.4.0rc~1022 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/c1963fb27dcd022b165fc27bb6586af2ea3ac41d hammer2 - Message span tree work * Trivially optimize out the sending of a SPAN back across the same connection it was received from. --- diff --git a/sbin/hammer2/msg_lnk.c b/sbin/hammer2/msg_lnk.c index b1216e7..1c0ab69 100644 --- a/sbin/hammer2/msg_lnk.c +++ b/sbin/hammer2/msg_lnk.c @@ -819,6 +819,13 @@ hammer2_relay_scan_specific(h2span_node_t *node, h2span_connect_t *conn) * we can break out of the loop. */ break; + } else if (slink->state->iocom == conn->state->iocom) { + /* + * No match but we would transmit a LNK_SPAN + * out the same connection it came in on, which + * can be trivially optimized out. + */ + break; } else { /* * No match, distance is ok, construct a new relay.