public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Shan Wei <shanwei@cn•fujitsu.com>
To: David Miller <davem@davemloft•net>,
	Network-Maillist <netdev@vger•kernel.org>,
	"yoshfuji@linux-ipv6•org >> YOSHIFUJI Hideaki"
	<yoshfuji@linux-ipv6•org>
Cc: Shan Wei <shanwei@cn•fujitsu.com>
Subject: [PATCH v2 3/4] ipv6: use ND_REACHABLE_TIME and ND_RETRANS_TIMER instead of magic number
Date: Thu, 02 Dec 2010 12:05:12 +0800	[thread overview]
Message-ID: <4CF71AF8.9050205@cn.fujitsu.com> (raw)


ND_REACHABLE_TIME and ND_RETRANS_TIMER have defined 
since v2.6.12-rc2, but never been used.
So use them instead of magic number.

This patch also changes original code style to read comfortably .

Thank YOSHIFUJI Hideaki for pointing it out.

Signed-off-by: Shan Wei <shanwei@cn•fujitsu.com>
---
 net/ipv6/ndisc.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 998d6d2..e18f841 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -141,18 +141,18 @@ struct neigh_table nd_tbl = {
 	.proxy_redo =	pndisc_redo,
 	.id =		"ndisc_cache",
 	.parms = {
-		.tbl =			&nd_tbl,
-		.base_reachable_time =	30 * HZ,
-		.retrans_time =	 1 * HZ,
-		.gc_staletime =	60 * HZ,
-		.reachable_time =		30 * HZ,
-		.delay_probe_time =	 5 * HZ,
-		.queue_len =		 3,
-		.ucast_probes =	 3,
-		.mcast_probes =	 3,
-		.anycast_delay =	 1 * HZ,
-		.proxy_delay =		(8 * HZ) / 10,
-		.proxy_qlen =		64,
+		.tbl			= &nd_tbl,
+		.base_reachable_time	= ND_REACHABLE_TIME,
+		.retrans_time		= ND_RETRANS_TIMER,
+		.gc_staletime		= 60 * HZ,
+		.reachable_time		= ND_REACHABLE_TIME,
+		.delay_probe_time	= 5 * HZ,
+		.queue_len		= 3,
+		.ucast_probes		= 3,
+		.mcast_probes		= 3,
+		.anycast_delay		= 1 * HZ,
+		.proxy_delay		= (8 * HZ) / 10,
+		.proxy_qlen		= 64,
 	},
 	.gc_interval =	  30 * HZ,
 	.gc_thresh1 =	 128,
-- 
1.6.3.3

             reply	other threads:[~2010-12-02  4:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-02  4:05 Shan Wei [this message]
2010-12-02 21:28 ` [PATCH v2 3/4] ipv6: use ND_REACHABLE_TIME and ND_RETRANS_TIMER instead of magic number David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CF71AF8.9050205@cn.fujitsu.com \
    --to=shanwei@cn$(echo .)fujitsu.com \
    --cc=davem@davemloft$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=yoshfuji@linux-ipv6$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox