Skip to content

Commit

Permalink
[host] use correct seq_num to reclaim buffers
Browse files Browse the repository at this point in the history
we cannot use incoming packet seq_num to reclaim buffers as that causes
havoc.

use latest recorded (highest) packet number instead that follows the
reclaiming window

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Aug 5, 2021
1 parent 66562e2 commit 9ce3ca4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libknet/host.c
Expand Up @@ -586,7 +586,7 @@ int _seq_num_lookup(knet_handle_t knet_h, struct knet_host *host, seq_num_t seq_
_clear_cbuffers(host, seq_num);
}

_reclaim_old_defrag_bufs(knet_h, host, seq_num);
_reclaim_old_defrag_bufs(knet_h, host, *dst_seq_num);

if (seq_num < *dst_seq_num) {
seq_dist = (SEQ_MAX - seq_num) + *dst_seq_num;
Expand Down

0 comments on commit 9ce3ca4

Please sign in to comment.