mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-07 23:11:27 +00:00
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>
This commit is contained in:
parent
d1bcb11544
commit
f831c963b5
7 changed files with 9 additions and 57 deletions
|
@ -2,7 +2,7 @@
|
|||
* net/tipc/addr.c: TIPC address utility routines
|
||||
*
|
||||
* Copyright (c) 2000-2006, Ericsson AB
|
||||
* Copyright (c) 2004-2005, Wind River Systems
|
||||
* Copyright (c) 2004-2005, 2010-2011, Wind River Systems
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -41,7 +41,7 @@
|
|||
* tipc_addr_domain_valid - validates a network domain address
|
||||
*
|
||||
* Accepts <Z.C.N>, <Z.C.0>, <Z.0.0>, and <0.0.0>,
|
||||
* where Z, C, and N are non-zero and do not exceed the configured limits.
|
||||
* where Z, C, and N are non-zero.
|
||||
*
|
||||
* Returns 1 if domain address is valid, otherwise 0
|
||||
*/
|
||||
|
@ -51,10 +51,6 @@ int tipc_addr_domain_valid(u32 addr)
|
|||
u32 n = tipc_node(addr);
|
||||
u32 c = tipc_cluster(addr);
|
||||
u32 z = tipc_zone(addr);
|
||||
u32 max_nodes = tipc_max_nodes;
|
||||
|
||||
if (n > max_nodes)
|
||||
return 0;
|
||||
|
||||
if (n && (!z || !c))
|
||||
return 0;
|
||||
|
@ -66,8 +62,7 @@ int tipc_addr_domain_valid(u32 addr)
|
|||
/**
|
||||
* tipc_addr_node_valid - validates a proposed network address for this node
|
||||
*
|
||||
* Accepts <Z.C.N>, where Z, C, and N are non-zero and do not exceed
|
||||
* the configured limits.
|
||||
* Accepts <Z.C.N>, where Z, C, and N are non-zero.
|
||||
*
|
||||
* Returns 1 if address can be used, otherwise 0
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue