Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipv4: rate limit updating of next hop exceptions with same pmtu

The tunnel devices call update_pmtu for each packet sent, this causes
contention on the fnhe_lock. Ignore the pmtu update if pmtu is not
actually changed, and there is still plenty of time before the entry
expires.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Timo Teräs and committed by
David S. Miller
f016229e 387aa65a

+4
+4
net/ipv4/route.c
··· 947 947 if (mtu < ip_rt_min_pmtu) 948 948 mtu = ip_rt_min_pmtu; 949 949 950 + if (rt->rt_pmtu == mtu && 951 + time_before(jiffies, dst->expires - ip_rt_mtu_expires / 2)) 952 + return; 953 + 950 954 rcu_read_lock(); 951 955 if (fib_lookup(dev_net(dst->dev), fl4, &res) == 0) { 952 956 struct fib_nh *nh = &FIB_RES_NH(res);