Lines Matching defs:nl_table

86 struct netlink_table *nl_table __read_mostly;
87 EXPORT_SYMBOL_GPL(nl_table);
131 /* nl_table locking explained:
524 struct netlink_table *table = &nl_table[protocol];
541 struct netlink_table *tbl = &nl_table[sk->sk_protocol];
564 struct netlink_table *table = &nl_table[sk->sk_protocol];
607 table = &nl_table[sk->sk_protocol];
683 if (!nl_table[protocol].registered) {
689 if (nl_table[protocol].registered &&
690 try_module_get(nl_table[protocol].module))
691 module = nl_table[protocol].module;
694 cb_mutex = nl_table[protocol].cb_mutex;
695 bind = nl_table[protocol].bind;
696 unbind = nl_table[protocol].unbind;
792 BUG_ON(nl_table[sk->sk_protocol].registered == 0);
793 if (--nl_table[sk->sk_protocol].registered == 0) {
796 old = nl_deref_protected(nl_table[sk->sk_protocol].listeners);
797 RCU_INIT_POINTER(nl_table[sk->sk_protocol].listeners, NULL);
799 nl_table[sk->sk_protocol].module = NULL;
800 nl_table[sk->sk_protocol].bind = NULL;
801 nl_table[sk->sk_protocol].unbind = NULL;
802 nl_table[sk->sk_protocol].flags = 0;
803 nl_table[sk->sk_protocol].registered = 0;
819 struct netlink_table *table = &nl_table[sk->sk_protocol];
921 return (nl_table[sock->sk->sk_protocol].flags & flag) ||
933 sk_add_bind_node(sk, &nl_table[sk->sk_protocol].mc_list);
946 groups = nl_table[sk->sk_protocol].groups;
947 if (!nl_table[sk->sk_protocol].registered) {
1375 listeners = rcu_dereference(nl_table[sk->sk_protocol].listeners);
1377 if (listeners && group - 1 < nl_table[sk->sk_protocol].groups)
1529 sk_for_each_bound(sk, &nl_table[ssk->sk_protocol].mc_list)
1617 sk_for_each_bound(sk, &nl_table[ssk->sk_protocol].mc_list)
2033 BUG_ON(!nl_table);
2066 if (!nl_table[unit].registered) {
2067 nl_table[unit].groups = groups;
2068 rcu_assign_pointer(nl_table[unit].listeners, listeners);
2069 nl_table[unit].cb_mutex = cb_mutex;
2070 nl_table[unit].module = module;
2072 nl_table[unit].bind = cfg->bind;
2073 nl_table[unit].unbind = cfg->unbind;
2074 nl_table[unit].flags = cfg->flags;
2076 nl_table[unit].compare = cfg->compare;
2078 nl_table[unit].registered = 1;
2081 nl_table[unit].registered++;
2110 struct netlink_table *tbl = &nl_table[sk->sk_protocol];
2156 struct netlink_table *tbl = &nl_table[ksk->sk_protocol];
2566 rhashtable_walk_enter(&nl_table[iter->link].hash, &iter->hti);
2804 nl_table[NETLINK_USERSOCK].groups = groups;
2805 rcu_assign_pointer(nl_table[NETLINK_USERSOCK].listeners, listeners);
2806 nl_table[NETLINK_USERSOCK].module = THIS_MODULE;
2807 nl_table[NETLINK_USERSOCK].registered = 1;
2808 nl_table[NETLINK_USERSOCK].flags = NL_CFG_F_NONROOT_SEND;
2879 nl_table = kcalloc(MAX_LINKS, sizeof(*nl_table), GFP_KERNEL);
2880 if (!nl_table)
2884 if (rhashtable_init(&nl_table[i].hash,
2887 rhashtable_destroy(&nl_table[i].hash);
2888 kfree(nl_table);
2903 panic("netlink_init: Cannot allocate nl_table\n");