* [PATCH 1/3] net: kill unused macros in head file
@ 2010-11-29 6:53 Shan Wei
2010-11-29 7:42 ` YOSHIFUJI Hideaki
0 siblings, 1 reply; 4+ messages in thread
From: Shan Wei @ 2010-11-29 6:53 UTC (permalink / raw)
To: David Miller
Cc: Network-Maillist, kuznet, pekkas, jmorris,
yoshfuji@linux-ipv6.org >> YOSHIFUJI Hideaki,
Patrick McHardy, Shan Wei
These macros have been defined for several years since v2.6.12-rc2(tracing by git),
but never be used. So remove them.
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
---
include/net/addrconf.h | 2 --
include/net/ip6_route.h | 1 -
include/net/ndisc.h | 6 ------
include/net/snmp.h | 1 -
include/net/sock.h | 3 ---
include/net/tcp.h | 6 ------
6 files changed, 0 insertions(+), 19 deletions(-)
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index a944124..23710aa 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -1,8 +1,6 @@
#ifndef _ADDRCONF_H
#define _ADDRCONF_H
-#define RETRANS_TIMER HZ
-
#define MAX_RTR_SOLICITATIONS 3
#define RTR_SOLICITATION_INTERVAL (4*HZ)
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index 278312c..52c0550 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -3,7 +3,6 @@
#define IP6_RT_PRIO_USER 1024
#define IP6_RT_PRIO_ADDRCONF 256
-#define IP6_RT_PRIO_KERN 512
struct route_info {
__u8 type;
diff --git a/include/net/ndisc.h b/include/net/ndisc.h
index 895997b..f134987 100644
--- a/include/net/ndisc.h
+++ b/include/net/ndisc.h
@@ -39,12 +39,6 @@ enum {
#define MAX_RTR_SOLICITATION_DELAY HZ
-#define ND_REACHABLE_TIME (30*HZ)
-#define ND_RETRANS_TIMER HZ
-
-#define ND_MIN_RANDOM_FACTOR (1/2)
-#define ND_MAX_RANDOM_FACTOR (3/2)
-
#ifdef __KERNEL__
#include <linux/compiler.h>
diff --git a/include/net/snmp.h b/include/net/snmp.h
index a0e6180..835c587 100644
--- a/include/net/snmp.h
+++ b/include/net/snmp.h
@@ -60,7 +60,6 @@ struct ipstats_mib {
};
/* ICMP */
-#define ICMP_MIB_DUMMY __ICMP_MIB_MAX
#define ICMP_MIB_MAX (__ICMP_MIB_MAX + 1)
struct icmp_mib {
diff --git a/include/net/sock.h b/include/net/sock.h
index 5557dfb..717cfbf 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -516,9 +516,6 @@ static __inline__ void sk_add_bind_node(struct sock *sk,
#define sk_nulls_for_each_from(__sk, node) \
if (__sk && ({ node = &(__sk)->sk_nulls_node; 1; })) \
hlist_nulls_for_each_entry_from(__sk, node, sk_nulls_node)
-#define sk_for_each_continue(__sk, node) \
- if (__sk && ({ node = &(__sk)->sk_node; 1; })) \
- hlist_for_each_entry_continue(__sk, node, sk_node)
#define sk_for_each_safe(__sk, node, tmp, list) \
hlist_for_each_entry_safe(__sk, node, tmp, list, sk_node)
#define sk_for_each_bound(__sk, node, list) \
diff --git a/include/net/tcp.h b/include/net/tcp.h
index e36c874..ea819cc 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -100,12 +100,6 @@ extern void tcp_time_wait(struct sock *sk, int state, int timeo);
#define TCP_SYNACK_RETRIES 5 /* number of times to retry passive opening a
* connection: ~180sec is RFC minimum */
-
-#define TCP_ORPHAN_RETRIES 7 /* number of times to retry on an orphaned
- * socket. 7 is ~50sec-16min.
- */
-
-
#define TCP_TIMEWAIT_LEN (60*HZ) /* how long to wait to destroy TIME-WAIT
* state, about 60 seconds */
#define TCP_FIN_TIMEOUT TCP_TIMEWAIT_LEN
--
1.6.3.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] net: kill unused macros in head file
2010-11-29 6:53 [PATCH 1/3] net: kill unused macros in head file Shan Wei
@ 2010-11-29 7:42 ` YOSHIFUJI Hideaki
2010-11-29 8:21 ` Shan Wei
0 siblings, 1 reply; 4+ messages in thread
From: YOSHIFUJI Hideaki @ 2010-11-29 7:42 UTC (permalink / raw)
To: Shan Wei
Cc: David Miller, Network-Maillist, kuznet, pekkas, jmorris,
Patrick McHardy, yoshfuji
2010-11-29 14:53 +0800, Shan Wei wrote:
> These macros have been defined for several years since v2.6.12-rc2(tracing by git),
> but never be used. So remove them.
>
>
> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
> ---
> include/net/addrconf.h | 2 --
> include/net/ip6_route.h | 1 -
> include/net/ndisc.h | 6 ------
> include/net/snmp.h | 1 -
> include/net/sock.h | 3 ---
> include/net/tcp.h | 6 ------
> 6 files changed, 0 insertions(+), 19 deletions(-)
>
> diff --git a/include/net/addrconf.h b/include/net/addrconf.h
> index a944124..23710aa 100644
> --- a/include/net/addrconf.h
> +++ b/include/net/addrconf.h
> @@ -1,8 +1,6 @@
> #ifndef _ADDRCONF_H
> #define _ADDRCONF_H
>
> -#define RETRANS_TIMER HZ
> -
> #define MAX_RTR_SOLICITATIONS 3
> #define RTR_SOLICITATION_INTERVAL (4*HZ)
>
I think we should use it in net/ipv6/addrconf.c,
instead of magic number.
> diff --git a/include/net/ndisc.h b/include/net/ndisc.h
> index 895997b..f134987 100644
> --- a/include/net/ndisc.h
> +++ b/include/net/ndisc.h
> @@ -39,12 +39,6 @@ enum {
>
> #define MAX_RTR_SOLICITATION_DELAY HZ
>
> -#define ND_REACHABLE_TIME (30*HZ)
> -#define ND_RETRANS_TIMER HZ
ditto (in net/ipv6/ndisc.c)
--yoshfuji
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] net: kill unused macros in head file
2010-11-29 7:42 ` YOSHIFUJI Hideaki
@ 2010-11-29 8:21 ` Shan Wei
2010-12-01 20:33 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: Shan Wei @ 2010-11-29 8:21 UTC (permalink / raw)
To: YOSHIFUJI Hideaki
Cc: David Miller, Network-Maillist, kuznet, pekkas, jmorris, Patrick McHardy
Hi yoshifuji-san:
YOSHIFUJI Hideaki wrote, at 11/29/2010 03:42 PM:
>>
>> -#define RETRANS_TIMER HZ
>> -
>> #define MAX_RTR_SOLICITATIONS 3
>> #define RTR_SOLICITATION_INTERVAL (4*HZ)
>>
>
> I think we should use it in net/ipv6/addrconf.c,
> instead of magic number.
Do you mean to replace all HZ in net/ipv6/addrconf.c with RETRANS_TIMER?
HZ is also a macro. And I think HZ is more easier to read than RETRANS_TIMER.
--
Best Regards
-----
Shan Wei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] net: kill unused macros in head file
2010-11-29 8:21 ` Shan Wei
@ 2010-12-01 20:33 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-12-01 20:33 UTC (permalink / raw)
To: shanwei; +Cc: yoshfuji, netdev, kuznet, pekkas, jmorris, kaber
From: Shan Wei <shanwei@cn.fujitsu.com>
Date: Mon, 29 Nov 2010 16:21:14 +0800
> Hi yoshifuji-san:
>
> YOSHIFUJI Hideaki wrote, at 11/29/2010 03:42 PM:
>>>
>>> -#define RETRANS_TIMER HZ
>>> -
>>> #define MAX_RTR_SOLICITATIONS 3
>>> #define RTR_SOLICITATION_INTERVAL (4*HZ)
>>>
>>
>> I think we should use it in net/ipv6/addrconf.c,
>> instead of magic number.
>
> Do you mean to replace all HZ in net/ipv6/addrconf.c with RETRANS_TIMER?
>
> HZ is also a macro. And I think HZ is more easier to read than RETRANS_TIMER.
These things currently say "1 * HZ" and "30 * HZ", so I think Hideaki's
request is reasonable.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-01 20:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-29 6:53 [PATCH 1/3] net: kill unused macros in head file Shan Wei
2010-11-29 7:42 ` YOSHIFUJI Hideaki
2010-11-29 8:21 ` Shan Wei
2010-12-01 20:33 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.