aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/addr.h
diff options
context:
space:
mode:
authorJon Maloy <jon.maloy@ericsson.com>2018-03-22 20:42:47 +0100
committerDavid S. Miller <davem@davemloft.net>2018-03-23 13:12:18 -0400
commit2026364149db36c6a2c0c8cae8362fe9a7f954dd (patch)
tree267dc296fc385f53a8bd9537c9ac8193ea4b5663 /net/tipc/addr.h
parenttipc: some cleanups in the file discover.c (diff)
downloadlinux-dev-2026364149db36c6a2c0c8cae8362fe9a7f954dd.tar.xz
linux-dev-2026364149db36c6a2c0c8cae8362fe9a7f954dd.zip
tipc: remove restrictions on node address values
Nominally, TIPC organizes network nodes into a three-level network hierarchy consisting of the levels 'zone', 'cluster' and 'node'. This hierarchy is reflected in the node address format, - it is sub-divided into an 8-bit zone id, and 12 bit cluster id, and a 12-bit node id. However, the 'zone' and 'cluster' levels have in reality never been fully implemented,and never will be. The result of this has been that the first 20 bits the node identity structure have been wasted, and the usable node identity range within a cluster has been limited to 12 bits. This is starting to become a problem. In the following commits, we will need to be able to connect between nodes which are using the whole 32-bit value space of the node address. We therefore remove the restrictions on which values can be assigned to node identity, -it is from now on only a 32-bit integer with no assumed internal structure. Isolation between clusters is now achieved only by setting different values for the 'network id' field used during neighbor discovery, in practice leading to the latter becoming the new cluster identity. The rules for accepting discovery requests/responses from neighboring nodes now become: - If the user is using legacy address format on both peers, reception of discovery messages is subject to the legacy lookup domain check in addition to the cluster id check. - Otherwise, the discovery request/response is always accepted, provided both peers have the same network id. This secures backwards compatibility for users who have been using zone or cluster identities as cluster separators, instead of the intended 'network id'. Acked-by: Ying Xue <ying.xue@windriver.com> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/addr.h')
-rw-r--r--net/tipc/addr.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/net/tipc/addr.h b/net/tipc/addr.h
index 2ecf5a5d40dd..5ffde51b0e68 100644
--- a/net/tipc/addr.h
+++ b/net/tipc/addr.h
@@ -50,11 +50,6 @@ static inline u32 tipc_own_addr(struct net *net)
return tn->own_addr;
}
-static inline u32 tipc_zone_mask(u32 addr)
-{
- return addr & TIPC_ZONE_MASK;
-}
-
static inline u32 tipc_cluster_mask(u32 addr)
{
return addr & TIPC_ZONE_CLUSTER_MASK;
@@ -71,14 +66,8 @@ static inline int tipc_scope2node(struct net *net, int sc)
}
u32 tipc_own_addr(struct net *net);
-int in_own_cluster(struct net *net, u32 addr);
-int in_own_cluster_exact(struct net *net, u32 addr);
int in_own_node(struct net *net, u32 addr);
-u32 addr_domain(struct net *net, u32 sc);
-int tipc_addr_domain_valid(u32);
-int tipc_addr_node_valid(u32 addr);
int tipc_in_scope(u32 domain, u32 addr);
-int tipc_addr_scope(u32 domain);
char *tipc_addr_string_fill(char *string, u32 addr);
#endif