Lines Matching +full:spin +full:- +full:table
4 * Copyright (c) 1995-2006, 2014, Ericsson AB
5 * Copyright (c) 2005, 2010-2011, Wind River Systems
70 * are protected by node spin lock.
78 * - The tipc_port spin_lock. This is protecting each port instance
81 * corresponding reference table entry, which has the same life
84 * been added in the port instance, -to be used for unlocking
86 * - A read/write lock to protect the reference table itself (teg.c).
87 * (Nobody is using read-only access to this, so it can just as
89 * - A spin lock to protect the registry of kernel/driver users (reg.c)
90 * - A global spin_lock (tipc_port_lock), which only task is to ensure
96 * 4: The name table (name_table.c, name_distr.c, subscription.c)
97 * - There is one big read/write-lock (tipc_nametbl_lock) protecting the
98 * overall name table structure. Nothing must be added/removed to
100 * - There is one local spin_lock per sub_sequence, which can be seen
101 * as a sub-domain to the tipc_nametbl_lock domain. It is used only
105 * - A local spin_lock protecting the queue of subscriber events.
114 return -1; in tipc_net_init()
129 if (cmpxchg(&tn->node_addr, 0, addr)) in tipc_net_finalize()
144 tipc_net_finalize(fwork->net, fwork->addr); in tipc_net_finalize_work()
151 tn->final_work.net = net; in tipc_sched_net_finalize()
152 tn->final_work.addr = addr; in tipc_sched_net_finalize()
153 schedule_work(&tn->final_work.work); in tipc_sched_net_finalize()
172 u64 *w0 = (u64 *)&tn->node_id[0]; in __tipc_nl_add_net()
173 u64 *w1 = (u64 *)&tn->node_id[8]; in __tipc_nl_add_net()
177 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, in __tipc_nl_add_net()
180 return -EMSGSIZE; in __tipc_nl_add_net()
182 attrs = nla_nest_start_noflag(msg->skb, TIPC_NLA_NET); in __tipc_nl_add_net()
186 if (nla_put_u32(msg->skb, TIPC_NLA_NET_ID, tn->net_id)) in __tipc_nl_add_net()
188 if (nla_put_u64_64bit(msg->skb, TIPC_NLA_NET_NODEID, *w0, 0)) in __tipc_nl_add_net()
190 if (nla_put_u64_64bit(msg->skb, TIPC_NLA_NET_NODEID_W1, *w1, 0)) in __tipc_nl_add_net()
192 nla_nest_end(msg->skb, attrs); in __tipc_nl_add_net()
193 genlmsg_end(msg->skb, hdr); in __tipc_nl_add_net()
198 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_add_net()
200 genlmsg_cancel(msg->skb, hdr); in __tipc_nl_add_net()
202 return -EMSGSIZE; in __tipc_nl_add_net()
207 struct net *net = sock_net(skb->sk); in tipc_nl_net_dump()
209 int done = cb->args[0]; in tipc_nl_net_dump()
216 msg.portid = NETLINK_CB(cb->skb).portid; in tipc_nl_net_dump()
217 msg.seq = cb->nlh->nlmsg_seq; in tipc_nl_net_dump()
225 cb->args[0] = done; in tipc_nl_net_dump()
227 return skb->len; in tipc_nl_net_dump()
233 struct net *net = sock_net(skb->sk); in __tipc_nl_net_set()
237 if (!info->attrs[TIPC_NLA_NET]) in __tipc_nl_net_set()
238 return -EINVAL; in __tipc_nl_net_set()
241 info->attrs[TIPC_NLA_NET], in __tipc_nl_net_set()
242 tipc_nl_net_policy, info->extack); in __tipc_nl_net_set()
249 return -EPERM; in __tipc_nl_net_set()
256 return -EINVAL; in __tipc_nl_net_set()
258 tn->net_id = val; in __tipc_nl_net_set()
266 return -EINVAL; in __tipc_nl_net_set()
267 tn->legacy_addr_format = true; in __tipc_nl_net_set()
277 return -EINVAL; in __tipc_nl_net_set()
302 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, in __tipc_nl_addr_legacy_get()
305 return -EMSGSIZE; in __tipc_nl_addr_legacy_get()
307 attrs = nla_nest_start(msg->skb, TIPC_NLA_NET); in __tipc_nl_addr_legacy_get()
311 if (tn->legacy_addr_format) in __tipc_nl_addr_legacy_get()
312 if (nla_put_flag(msg->skb, TIPC_NLA_NET_ADDR_LEGACY)) in __tipc_nl_addr_legacy_get()
315 nla_nest_end(msg->skb, attrs); in __tipc_nl_addr_legacy_get()
316 genlmsg_end(msg->skb, hdr); in __tipc_nl_addr_legacy_get()
321 nla_nest_cancel(msg->skb, attrs); in __tipc_nl_addr_legacy_get()
323 genlmsg_cancel(msg->skb, hdr); in __tipc_nl_addr_legacy_get()
325 return -EMSGSIZE; in __tipc_nl_addr_legacy_get()
330 struct net *net = sock_net(skb->sk); in tipc_nl_net_addr_legacy_get()
337 return -ENOMEM; in tipc_nl_net_addr_legacy_get()
340 msg.portid = info->snd_portid; in tipc_nl_net_addr_legacy_get()
341 msg.seq = info->snd_seq; in tipc_nl_net_addr_legacy_get()