diff --git a/src/algo_rr.c b/src/algo_rr.c index 3872012..c4136cc 100644 --- a/src/algo_rr.c +++ b/src/algo_rr.c @@ -121,6 +121,12 @@ void rr_pkt_register(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, if (bp->ip.ap.str.id > rr->my_links_ver) { rr->my_links = bp->ip.ap.str.bitfield; rr->my_links_ver = bp->ip.ap.str.id; + printf("Links availability: ["); + for (int i = 0; i < 8; i++) { + if (rr->my_links & 1 << i) printf("U"); + else printf("-"); + } + printf("]\n"); } // 2. If packet arrived too late, we discard it @@ -385,7 +391,7 @@ int rr_on_timer(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo) { printf("Timer reached for packet %d\n", pkt->id); // !BLACKLIST LINK - //rr->remote_links &= 0xffff ^ 1 << pkt->link_num; + rr->remote_links &= 0xff ^ 1 << pkt->link_num; while (ring_lt(rr->recv_id, pkt->id)) { rr->recv_id++;