Lines Matching +full:spin +full:- +full:table
4 * Copyright (c) 1995-2006, 2014, Ericsson AB
5 * Copyright (c) 2005, 2010-2011, Wind River Systems
71 * are protected by node spin lock.
79 * - The tipc_port spin_lock. This is protecting each port instance
82 * corresponding reference table entry, which has the same life
85 * been added in the port instance, -to be used for unlocking
87 * - A read/write lock to protect the reference table itself (teg.c).
88 * (Nobody is using read-only access to this, so it can just as
90 * - A spin lock to protect the registry of kernel/driver users (reg.c)
91 * - A global spin_lock (tipc_port_lock), which only task is to ensure
97 * 4: The name table (name_table.c, name_distr.c, subscription.c)
98 * - There is one big read/write-lock (tipc_nametbl_lock) protecting the
99 * overall name table structure. Nothing must be added/removed to
101 * - There is one local spin_lock per sub_sequence, which can be seen
102 * as a sub-domain to the tipc_nametbl_lock domain. It is used only
106 * - A local spin_lock protecting the queue of subscriber events.
115 return -1; in tipc_net_init()
135 if (cmpxchg(&tn->node_addr, 0, addr)) in tipc_net_finalize()
148 tipc_net_finalize(tipc_link_net(tn->bcl), tn->trial_addr); in tipc_net_finalize_work()
167 u64 *w0 = (u64 *)&tn->node_id[0]; in __tipc_nl_add_net()
168 u64 *w1 = (u64 *)&tn->node_id[8]; in __tipc_nl_add_net()
172 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, in __tipc_nl_add_net()
175 return -EMSGSIZE; in __tipc_nl_add_net()
177 attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_NET); in __tipc_nl_add_net()
181 if (nla_put_u32(msg->skb, TIPC_NLA_NET_ID, tn->net_id)) in __tipc_nl_add_net()
183 if (nla_put_u64_64bit(msg->skb, TIPC_NLA_NET_NODEID, *w0, 0)) in __tipc_nl_add_net()
185 if (nla_put_u64_64bit(msg->skb, TIPC_NLA_NET_NODEID_W1, *w1, 0)) in __tipc_nl_add_net()
187 nla_nest_end(msg->skb, attrs); in __tipc_nl_add_net()
188 genlmsg_end(msg->skb, hdr); in __tipc_nl_add_net()
193 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_add_net()
195 genlmsg_cancel(msg->skb, hdr); in __tipc_nl_add_net()
197 return -EMSGSIZE; in __tipc_nl_add_net()
202 struct net *net = sock_net(skb->sk); in tipc_nl_net_dump()
204 int done = cb->args[0]; in tipc_nl_net_dump()
211 msg.portid = NETLINK_CB(cb->skb).portid; in tipc_nl_net_dump()
212 msg.seq = cb->nlh->nlmsg_seq; in tipc_nl_net_dump()
220 cb->args[0] = done; in tipc_nl_net_dump()
222 return skb->len; in tipc_nl_net_dump()
228 struct net *net = sock_net(skb->sk); in __tipc_nl_net_set()
232 if (!info->attrs[TIPC_NLA_NET]) in __tipc_nl_net_set()
233 return -EINVAL; in __tipc_nl_net_set()
236 info->attrs[TIPC_NLA_NET], in __tipc_nl_net_set()
237 tipc_nl_net_policy, info->extack); in __tipc_nl_net_set()
244 return -EPERM; in __tipc_nl_net_set()
251 return -EINVAL; in __tipc_nl_net_set()
253 tn->net_id = val; in __tipc_nl_net_set()
261 return -EINVAL; in __tipc_nl_net_set()
262 tn->legacy_addr_format = true; in __tipc_nl_net_set()
272 return -EINVAL; in __tipc_nl_net_set()
297 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, in __tipc_nl_addr_legacy_get()
300 return -EMSGSIZE; in __tipc_nl_addr_legacy_get()
302 attrs = nla_nest_start(msg->skb, TIPC_NLA_NET); in __tipc_nl_addr_legacy_get()
306 if (tn->legacy_addr_format) in __tipc_nl_addr_legacy_get()
307 if (nla_put_flag(msg->skb, TIPC_NLA_NET_ADDR_LEGACY)) in __tipc_nl_addr_legacy_get()
310 nla_nest_end(msg->skb, attrs); in __tipc_nl_addr_legacy_get()
311 genlmsg_end(msg->skb, hdr); in __tipc_nl_addr_legacy_get()
316 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_addr_legacy_get()
318 genlmsg_cancel(msg->skb, hdr); in __tipc_nl_addr_legacy_get()
320 return -EMSGSIZE; in __tipc_nl_addr_legacy_get()
325 struct net *net = sock_net(skb->sk); in tipc_nl_net_addr_legacy_get()
332 return -ENOMEM; in tipc_nl_net_addr_legacy_get()
335 msg.portid = info->snd_portid; in tipc_nl_net_addr_legacy_get()
336 msg.seq = info->snd_seq; in tipc_nl_net_addr_legacy_get()