[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200331033356.29956-1-liuhangbin@gmail.com>
Date: Tue, 31 Mar 2020 11:33:56 +0800
From: Hangbin Liu <liuhangbin@...il.com>
To: netdev@...r.kernel.org
Cc: Eric Dumazet <eric.dumazet@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Hangbin Liu <liuhangbin@...il.com>
Subject: [PATCH net-next] neigh: support smaller retrans_time settting
Currently, we limited the retrans_time to be greater than HZ/2. For
example, if the HZ = 1000, setting retrans_time less than 500ms will
not work. This makes the user unable to achieve a more accurate control
for bonding arp fast failover.
But remove the sanity check would make the retransmission immediately
if user set retrans_time to 0 by wrong config. So I hard code the sanity
check to 10, which is 10ms if HZ is 1000 and 100ms if HZ is 100.
This number should be enough for user to get more accurate neigh
control.
Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
---
net/core/neighbour.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 789a73aa7bd8..245bb5bd30e2 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1125,7 +1125,7 @@ int __neigh_event_send(struct neighbour *neigh, struct sk_buff *skb)
neigh->nud_state = NUD_INCOMPLETE;
neigh->updated = now;
next = now + max(NEIGH_VAR(neigh->parms, RETRANS_TIME),
- HZ/2);
+ 10);
neigh_add_timer(neigh, next);
immediate_probe = true;
} else {
--
2.19.2
Powered by blists - more mailing lists