jmax was not taken in account...
This commit is contained in:
parent
caf1573e6d
commit
34eef75969
1 changed files with 4 additions and 5 deletions
|
@ -7,7 +7,6 @@
|
|||
|
||||
// A Tor cell size is 512 bytes but handle only 498 bytes of data
|
||||
#define TOR_CELL_SIZE 498
|
||||
#define ALLOWED_JITTER_MS 100
|
||||
#define MAX_LINKS 64
|
||||
|
||||
struct thunder_ctx {
|
||||
|
@ -243,13 +242,13 @@ void classify(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct b
|
|||
printf("\n");*/
|
||||
|
||||
for (int i = 0; i < thunderc->total_links; i++) {
|
||||
if (ALLOWED_JITTER_MS >= li[i].delta_t) continue;
|
||||
if (li[i].delta_t - ALLOWED_JITTER_MS <= thunderc->rcv_delta_t_per_link[i]) continue;
|
||||
if (thunderc->allowed_jitter_ms >= li[i].delta_t) continue;
|
||||
if (li[i].delta_t - thunderc->allowed_jitter_ms <= thunderc->rcv_delta_t_per_link[i]) continue;
|
||||
|
||||
struct block_info *bi = malloc(sizeof(struct block_info));
|
||||
bi->i = i; bi->app_ctx = app_ctx; bi->missing = thunderc->received_pkts_on_link[i];
|
||||
|
||||
//printf(" Packet Too Late - Blocked link %d (expected: at least %dms ago, received: %ldms ago)\n", i, li[i].delta_t - ALLOWED_JITTER_MS, thunderc->rcv_delta_t_per_link[i]);
|
||||
//printf(" Packet Too Late - Blocked link %d (expected: at least %dms ago, received: %ldms ago)\n", i, li[i].delta_t - thunderc->allowed_jitter_ms, thunderc->rcv_delta_t_per_link[i]);
|
||||
on_block(ctx, bi);
|
||||
}
|
||||
}
|
||||
|
@ -259,7 +258,7 @@ void classify(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct b
|
|||
uint64_t expected = i <= link_id ? thunderc->received_pkts_on_link[link_id] : thunderc->received_pkts_on_link[link_id] - 1;
|
||||
if (thunderc->received_pkts_on_link[i] >= expected) continue; // Nothing to do, all packets have been received
|
||||
|
||||
int64_t timeout = ALLOWED_JITTER_MS - li[i].delta_t;
|
||||
int64_t timeout = thunderc->allowed_jitter_ms - li[i].delta_t;
|
||||
|
||||
struct block_info *bi = malloc(sizeof(struct block_info));
|
||||
bi->i = i; bi->app_ctx = app_ctx; bi->missing = expected;
|
||||
|
|
Loading…
Reference in a new issue