Loading MAINTAINERS +2 −4 Original line number Diff line number Diff line Loading @@ -6083,13 +6083,11 @@ F: sound/soc/codecs/twl4030* TIPC NETWORK LAYER M: Jon Maloy <jon.maloy@ericsson.com> M: Allan Stephens <allan.stephens@windriver.com> L: tipc-discussion@lists.sourceforge.net L: netdev@vger.kernel.org (core kernel code) L: tipc-discussion@lists.sourceforge.net (user apps, general discussion) W: http://tipc.sourceforge.net/ W: http://tipc.cslab.ericsson.net/ T: git git://tipc.cslab.ericsson.net/pub/git/tipc.git S: Maintained F: include/linux/tipc*.h F: include/net/tipc/ F: net/tipc/ TILE ARCHITECTURE Loading include/linux/tipc_config.h +3 −3 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ #define TIPC_CMD_GET_MAX_SUBSCR 0x4006 /* tx none, rx unsigned */ #define TIPC_CMD_GET_MAX_ZONES 0x4007 /* obsoleted */ #define TIPC_CMD_GET_MAX_CLUSTERS 0x4008 /* obsoleted */ #define TIPC_CMD_GET_MAX_NODES 0x4009 /* tx none, rx unsigned */ #define TIPC_CMD_GET_MAX_NODES 0x4009 /* obsoleted */ #define TIPC_CMD_GET_MAX_SLAVES 0x400A /* obsoleted */ #define TIPC_CMD_GET_NETID 0x400B /* tx none, rx unsigned */ Loading @@ -115,7 +115,7 @@ #define TIPC_CMD_SET_MAX_SUBSCR 0x8006 /* tx unsigned, rx none */ #define TIPC_CMD_SET_MAX_ZONES 0x8007 /* obsoleted */ #define TIPC_CMD_SET_MAX_CLUSTERS 0x8008 /* obsoleted */ #define TIPC_CMD_SET_MAX_NODES 0x8009 /* tx unsigned, rx none */ #define TIPC_CMD_SET_MAX_NODES 0x8009 /* obsoleted */ #define TIPC_CMD_SET_MAX_SLAVES 0x800A /* obsoleted */ #define TIPC_CMD_SET_NETID 0x800B /* tx unsigned, rx none */ Loading Loading @@ -202,7 +202,7 @@ struct tipc_link_info { struct tipc_bearer_config { __be32 priority; /* Range [1,31]. Override per link */ __be32 detect_scope; __be32 disc_domain; /* <Z.C.N> describing desired nodes */ char name[TIPC_MAX_BEARER_NAME]; }; Loading net/tipc/Kconfig +0 −12 Original line number Diff line number Diff line Loading @@ -29,18 +29,6 @@ config TIPC_ADVANCED Saying Y here will open some advanced configuration for TIPC. Most users do not need to bother; if unsure, just say N. config TIPC_NODES int "Maximum number of nodes in a cluster" depends on TIPC_ADVANCED range 8 2047 default "255" help Specifies how many nodes can be supported in a TIPC cluster. Can range from 8 to 2047 nodes; default is 255. Setting this to a smaller value saves some memory; setting it to higher allows for more nodes. config TIPC_PORTS int "Maximum number of ports in a node" depends on TIPC_ADVANCED Loading net/tipc/addr.c +5 −10 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 */ Loading @@ -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; Loading @@ -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 @@ -81,9 +76,9 @@ int tipc_in_scope(u32 domain, u32 addr) { if (!domain || (domain == addr)) return 1; if (domain == (addr & 0xfffff000u)) /* domain <Z.C.0> */ if (domain == tipc_cluster_mask(addr)) /* domain <Z.C.0> */ return 1; if (domain == (addr & 0xff000000u)) /* domain <Z.0.0> */ if (domain == tipc_zone_mask(addr)) /* domain <Z.0.0> */ return 1; return 0; } Loading net/tipc/addr.h +13 −4 Original line number Diff line number Diff line Loading @@ -37,6 +37,16 @@ #ifndef _TIPC_ADDR_H #define _TIPC_ADDR_H static inline u32 tipc_zone_mask(u32 addr) { return addr & 0xff000000u; } static inline u32 tipc_cluster_mask(u32 addr) { return addr & 0xfffff000u; } static inline int in_own_cluster(u32 addr) { return !((addr ^ tipc_own_addr) >> 12); Loading @@ -49,14 +59,13 @@ static inline int in_own_cluster(u32 addr) * after a network hop. */ static inline int addr_domain(int sc) static inline u32 addr_domain(u32 sc) { if (likely(sc == TIPC_NODE_SCOPE)) return tipc_own_addr; if (sc == TIPC_CLUSTER_SCOPE) return tipc_addr(tipc_zone(tipc_own_addr), tipc_cluster(tipc_own_addr), 0); return tipc_addr(tipc_zone(tipc_own_addr), 0, 0); return tipc_cluster_mask(tipc_own_addr); return tipc_zone_mask(tipc_own_addr); } int tipc_addr_domain_valid(u32); Loading Loading
MAINTAINERS +2 −4 Original line number Diff line number Diff line Loading @@ -6083,13 +6083,11 @@ F: sound/soc/codecs/twl4030* TIPC NETWORK LAYER M: Jon Maloy <jon.maloy@ericsson.com> M: Allan Stephens <allan.stephens@windriver.com> L: tipc-discussion@lists.sourceforge.net L: netdev@vger.kernel.org (core kernel code) L: tipc-discussion@lists.sourceforge.net (user apps, general discussion) W: http://tipc.sourceforge.net/ W: http://tipc.cslab.ericsson.net/ T: git git://tipc.cslab.ericsson.net/pub/git/tipc.git S: Maintained F: include/linux/tipc*.h F: include/net/tipc/ F: net/tipc/ TILE ARCHITECTURE Loading
include/linux/tipc_config.h +3 −3 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ #define TIPC_CMD_GET_MAX_SUBSCR 0x4006 /* tx none, rx unsigned */ #define TIPC_CMD_GET_MAX_ZONES 0x4007 /* obsoleted */ #define TIPC_CMD_GET_MAX_CLUSTERS 0x4008 /* obsoleted */ #define TIPC_CMD_GET_MAX_NODES 0x4009 /* tx none, rx unsigned */ #define TIPC_CMD_GET_MAX_NODES 0x4009 /* obsoleted */ #define TIPC_CMD_GET_MAX_SLAVES 0x400A /* obsoleted */ #define TIPC_CMD_GET_NETID 0x400B /* tx none, rx unsigned */ Loading @@ -115,7 +115,7 @@ #define TIPC_CMD_SET_MAX_SUBSCR 0x8006 /* tx unsigned, rx none */ #define TIPC_CMD_SET_MAX_ZONES 0x8007 /* obsoleted */ #define TIPC_CMD_SET_MAX_CLUSTERS 0x8008 /* obsoleted */ #define TIPC_CMD_SET_MAX_NODES 0x8009 /* tx unsigned, rx none */ #define TIPC_CMD_SET_MAX_NODES 0x8009 /* obsoleted */ #define TIPC_CMD_SET_MAX_SLAVES 0x800A /* obsoleted */ #define TIPC_CMD_SET_NETID 0x800B /* tx unsigned, rx none */ Loading Loading @@ -202,7 +202,7 @@ struct tipc_link_info { struct tipc_bearer_config { __be32 priority; /* Range [1,31]. Override per link */ __be32 detect_scope; __be32 disc_domain; /* <Z.C.N> describing desired nodes */ char name[TIPC_MAX_BEARER_NAME]; }; Loading
net/tipc/Kconfig +0 −12 Original line number Diff line number Diff line Loading @@ -29,18 +29,6 @@ config TIPC_ADVANCED Saying Y here will open some advanced configuration for TIPC. Most users do not need to bother; if unsure, just say N. config TIPC_NODES int "Maximum number of nodes in a cluster" depends on TIPC_ADVANCED range 8 2047 default "255" help Specifies how many nodes can be supported in a TIPC cluster. Can range from 8 to 2047 nodes; default is 255. Setting this to a smaller value saves some memory; setting it to higher allows for more nodes. config TIPC_PORTS int "Maximum number of ports in a node" depends on TIPC_ADVANCED Loading
net/tipc/addr.c +5 −10 Original line number Diff line number Diff line Loading @@ -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 Loading Loading @@ -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 */ Loading @@ -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; Loading @@ -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 @@ -81,9 +76,9 @@ int tipc_in_scope(u32 domain, u32 addr) { if (!domain || (domain == addr)) return 1; if (domain == (addr & 0xfffff000u)) /* domain <Z.C.0> */ if (domain == tipc_cluster_mask(addr)) /* domain <Z.C.0> */ return 1; if (domain == (addr & 0xff000000u)) /* domain <Z.0.0> */ if (domain == tipc_zone_mask(addr)) /* domain <Z.0.0> */ return 1; return 0; } Loading
net/tipc/addr.h +13 −4 Original line number Diff line number Diff line Loading @@ -37,6 +37,16 @@ #ifndef _TIPC_ADDR_H #define _TIPC_ADDR_H static inline u32 tipc_zone_mask(u32 addr) { return addr & 0xff000000u; } static inline u32 tipc_cluster_mask(u32 addr) { return addr & 0xfffff000u; } static inline int in_own_cluster(u32 addr) { return !((addr ^ tipc_own_addr) >> 12); Loading @@ -49,14 +59,13 @@ static inline int in_own_cluster(u32 addr) * after a network hop. */ static inline int addr_domain(int sc) static inline u32 addr_domain(u32 sc) { if (likely(sc == TIPC_NODE_SCOPE)) return tipc_own_addr; if (sc == TIPC_CLUSTER_SCOPE) return tipc_addr(tipc_zone(tipc_own_addr), tipc_cluster(tipc_own_addr), 0); return tipc_addr(tipc_zone(tipc_own_addr), 0, 0); return tipc_cluster_mask(tipc_own_addr); return tipc_zone_mask(tipc_own_addr); } int tipc_addr_domain_valid(u32); Loading