diff options
author | Allan Stephens <Allan.Stephens@windriver.com> | 2011-02-25 14:22:11 -0500 |
---|---|---|
committer | Paul Gortmaker <paul.gortmaker@windriver.com> | 2011-03-13 16:35:17 -0400 |
commit | f831c963b5c20bec230edce89e25f369996be5db (patch) | |
tree | 8024a1771fae59bddaa8f83c025ea9d5d9743f59 /net/tipc/addr.c | |
parent | d1bcb11544109114d72965afea7805cc3e16a83a (diff) |
tipc: Eliminate configuration for maximum number of cluster nodes
Gets rid of the need for users to specify the maximum number of
cluster nodes supported by TIPC. TIPC now automatically provides
support for all 4K nodes allowed by its addressing scheme.
Note: This change sets TIPC's memory usage to the amount used by
a maximum size node table with 4K entries. An upcoming patch that
converts the node table from a linear array to a hash table will
compact the node table to a more efficient design, but for clarity
it is nice to have all the Kconfig infrastruture go away separately.
Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/addr.c')
-rw-r--r-- | net/tipc/addr.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/net/tipc/addr.c b/net/tipc/addr.c index 087e399518c1..a6fdab33877e 100644 --- a/net/tipc/addr.c +++ b/net/tipc/addr.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * net/tipc/addr.c: TIPC address utility routines | 2 | * net/tipc/addr.c: TIPC address utility routines |
3 | * | 3 | * |
4 | * Copyright (c) 2000-2006, Ericsson AB | 4 | * Copyright (c) 2000-2006, Ericsson AB |
5 | * Copyright (c) 2004-2005, Wind River Systems | 5 | * Copyright (c) 2004-2005, 2010-2011, Wind River Systems |
6 | * All rights reserved. | 6 | * All rights reserved. |
7 | * | 7 | * |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without |
@@ -41,7 +41,7 @@ | |||
41 | * tipc_addr_domain_valid - validates a network domain address | 41 | * tipc_addr_domain_valid - validates a network domain address |
42 | * | 42 | * |
43 | * Accepts <Z.C.N>, <Z.C.0>, <Z.0.0>, and <0.0.0>, | 43 | * Accepts <Z.C.N>, <Z.C.0>, <Z.0.0>, and <0.0.0>, |
44 | * where Z, C, and N are non-zero and do not exceed the configured limits. | 44 | * where Z, C, and N are non-zero. |
45 | * | 45 | * |
46 | * Returns 1 if domain address is valid, otherwise 0 | 46 | * Returns 1 if domain address is valid, otherwise 0 |
47 | */ | 47 | */ |
@@ -51,10 +51,6 @@ int tipc_addr_domain_valid(u32 addr) | |||
51 | u32 n = tipc_node(addr); | 51 | u32 n = tipc_node(addr); |
52 | u32 c = tipc_cluster(addr); | 52 | u32 c = tipc_cluster(addr); |
53 | u32 z = tipc_zone(addr); | 53 | u32 z = tipc_zone(addr); |
54 | u32 max_nodes = tipc_max_nodes; | ||
55 | |||
56 | if (n > max_nodes) | ||
57 | return 0; | ||
58 | 54 | ||
59 | if (n && (!z || !c)) | 55 | if (n && (!z || !c)) |
60 | return 0; | 56 | return 0; |
@@ -66,8 +62,7 @@ int tipc_addr_domain_valid(u32 addr) | |||
66 | /** | 62 | /** |
67 | * tipc_addr_node_valid - validates a proposed network address for this node | 63 | * tipc_addr_node_valid - validates a proposed network address for this node |
68 | * | 64 | * |
69 | * Accepts <Z.C.N>, where Z, C, and N are non-zero and do not exceed | 65 | * Accepts <Z.C.N>, where Z, C, and N are non-zero. |
70 | * the configured limits. | ||
71 | * | 66 | * |
72 | * Returns 1 if address can be used, otherwise 0 | 67 | * Returns 1 if address can be used, otherwise 0 |
73 | */ | 68 | */ |