netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] neigh: support smaller retrans_time settting
@ 2020-03-31  3:33 Hangbin Liu
  2020-03-31 16:54 ` David Miller
  2020-04-01  2:07 ` [PATCHv2 " Hangbin Liu
  0 siblings, 2 replies; 6+ messages in thread
From: Hangbin Liu @ 2020-03-31  3:33 UTC (permalink / raw)
  To: netdev; +Cc: Eric Dumazet, David S . Miller, Hangbin Liu

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@gmail.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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-03  0:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-31  3:33 [PATCH net-next] neigh: support smaller retrans_time settting Hangbin Liu
2020-03-31 16:54 ` David Miller
2020-04-01  2:07 ` [PATCHv2 " Hangbin Liu
2020-04-01  2:36   ` Eric Dumazet
2020-04-01  6:46   ` [PATCHv3 " Hangbin Liu
2020-04-03  0:55     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).