Fix out of order
This commit is contained in:
parent
3f40d205c9
commit
f61148345e
1 changed files with 6 additions and 3 deletions
|
@ -180,8 +180,11 @@ release:
|
|||
int is_in_order(struct thunder_ctx* thunderc, uint8_t link_id) {
|
||||
uint64_t ref = thunderc->received_pkts_on_link[link_id];
|
||||
for (int i = 0; i < thunderc->total_links; i++) {
|
||||
uint64_t expected = link_id > i ? ref - 1 : ref;
|
||||
if (thunderc->received_pkts_on_link[i] > expected) return 0;
|
||||
uint64_t expected = link_id >= i ? ref : ref - 1;
|
||||
if (thunderc->received_pkts_on_link[i] > expected) {
|
||||
printf("link_id=%d, i=%d, pkt_i=%ld, pkt_i_expected=%ld, pkt_link_id=%ld\n", link_id, i, thunderc->received_pkts_on_link[i], expected, ref);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -253,7 +256,7 @@ void classify(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct b
|
|||
|
||||
if (timeout <= 0) {
|
||||
on_block(ctx, bi);
|
||||
printf(" Missing Packet - Blocked link %d (expected: %ld, seen: %ld, )\n", i, expected, thunderc->received_pkts_on_link[i]);
|
||||
printf(" Missing Packet - Blocked link %d (expected: %ld, seen: %ld)\n", i, expected, thunderc->received_pkts_on_link[i]);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue