Skip to content

Commit

Permalink
[PMTUd] invalidate MTU for a link if the value is lower than minimum
Browse files Browse the repository at this point in the history
Under heavy network load and packet loss, calculated MTU can be
too small. In that case we need to invalidate the link mtu,
that would remove the link from the rotation (and traffic) and
would give PMTUd time to get the right MTU in the next round.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Oct 15, 2019
1 parent 3ed7293 commit e2af2fc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion libknet/threads_pmtud.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,12 @@ static int _handle_check_pmtud(knet_handle_t knet_h, struct knet_host *dst_host,
}
dst_link->has_valid_mtu = 0;
} else {
dst_link->has_valid_mtu = 1;
if (dst_link->status.mtu < calc_min_mtu(knet_h)) {
log_debug(knet_h, KNET_SUB_PMTUD, "Invalid MTU detected for host: %u link: %u", dst_host->host_id, dst_link->link_id);
dst_link->has_valid_mtu = 0;
} else {
dst_link->has_valid_mtu = 1;
}
if (dst_link->has_valid_mtu) {
if ((saved_pmtud) && (saved_pmtud != dst_link->status.mtu)) {
log_info(knet_h, KNET_SUB_PMTUD, "PMTUD link change for host: %u link: %u from %u to %u",
Expand Down

0 comments on commit e2af2fc

Please sign in to comment.