diff options
author | Joe Perches <joe@perches.com> | 2010-02-16 13:40:04 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-17 03:03:28 -0500 |
commit | 9874c41cd5e70bfc97bcd52a8b6c98c2a6ba7299 (patch) | |
tree | cb7bb9f3c624f35baf356fd05387df3108793eb2 /include | |
parent | dc4c2c31053ba5bf685d273cd62ecca406dddb2d (diff) |
ipv6.h: reassembly: replace calculated magic number with multiplication
On Tue, 2010-02-16 at 16:47 +0100, Patrick McHardy wrote:
> Joe Perches wrote:
> >> @@ -246,6 +246,8 @@ extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb);
> >> int ip6_frag_nqueues(struct net *net);
> >> int ip6_frag_mem(struct net *net);
> >>
> >> +#define IPV6_FRAG_HIGH_THRESH 262144 /* == 256*1024 */
> >> +#define IPV6_FRAG_LOW_THRESH 196608 /* == 192*1024 */
> >> #define IPV6_FRAG_TIMEOUT (60*HZ) /* 60 seconds */
> >
> > 196608 isn't a number I want to remember.
> > Is this better as:
> >
> > #define IPV6_FRAG_HIGH_THRESH (256 * 1024) /* 262144 */
> > #define IPV6_FRAG_LOW_THRESH (192 * 1024) /* 196608 */
>
> Please send a patch, I'll apply it once these patches are in Dave's
> tree.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/ipv6.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 639ec53ea081..d067db1f88c7 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -246,9 +246,9 @@ extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb); | |||
246 | int ip6_frag_nqueues(struct net *net); | 246 | int ip6_frag_nqueues(struct net *net); |
247 | int ip6_frag_mem(struct net *net); | 247 | int ip6_frag_mem(struct net *net); |
248 | 248 | ||
249 | #define IPV6_FRAG_HIGH_THRESH 262144 /* == 256*1024 */ | 249 | #define IPV6_FRAG_HIGH_THRESH (256 * 1024) /* 262144 */ |
250 | #define IPV6_FRAG_LOW_THRESH 196608 /* == 192*1024 */ | 250 | #define IPV6_FRAG_LOW_THRESH (192 * 1024) /* 196608 */ |
251 | #define IPV6_FRAG_TIMEOUT (60*HZ) /* 60 seconds */ | 251 | #define IPV6_FRAG_TIMEOUT (60 * HZ) /* 60 seconds */ |
252 | 252 | ||
253 | extern int __ipv6_addr_type(const struct in6_addr *addr); | 253 | extern int __ipv6_addr_type(const struct in6_addr *addr); |
254 | static inline int ipv6_addr_type(const struct in6_addr *addr) | 254 | static inline int ipv6_addr_type(const struct in6_addr *addr) |