Lines Matching refs:smc_clc_eid_table

44 struct smc_clc_eid_table {  struct
51 static struct smc_clc_eid_table smc_clc_eid_table; argument
96 write_lock(&smc_clc_eid_table.lock); in smc_clc_ueid_add()
97 if (smc_clc_eid_table.ueid_cnt >= SMC_MAX_UEID) { in smc_clc_ueid_add()
101 list_for_each_entry(tmp_ueid, &smc_clc_eid_table.list, list) { in smc_clc_ueid_add()
107 list_add_tail(&new_ueid->list, &smc_clc_eid_table.list); in smc_clc_ueid_add()
108 smc_clc_eid_table.ueid_cnt++; in smc_clc_ueid_add()
109 write_unlock(&smc_clc_eid_table.lock); in smc_clc_ueid_add()
113 write_unlock(&smc_clc_eid_table.lock); in smc_clc_ueid_add()
122 read_lock(&smc_clc_eid_table.lock); in smc_clc_ueid_count()
123 count = smc_clc_eid_table.ueid_cnt; in smc_clc_ueid_count()
124 read_unlock(&smc_clc_eid_table.lock); in smc_clc_ueid_count()
148 write_lock(&smc_clc_eid_table.lock); in smc_clc_ueid_remove()
149 list_for_each_entry_safe(lst_ueid, tmp_ueid, &smc_clc_eid_table.list, in smc_clc_ueid_remove()
153 smc_clc_eid_table.ueid_cnt--; in smc_clc_ueid_remove()
158 if (!rc && !smc_clc_eid_table.ueid_cnt) { in smc_clc_ueid_remove()
159 smc_clc_eid_table.seid_enabled = 1; in smc_clc_ueid_remove()
162 write_unlock(&smc_clc_eid_table.lock); in smc_clc_ueid_remove()
210 read_lock(&smc_clc_eid_table.lock); in _smc_nl_ueid_dump()
211 list_for_each_entry(lst_ueid, &smc_clc_eid_table.list, list) { in _smc_nl_ueid_dump()
220 read_unlock(&smc_clc_eid_table.lock); in _smc_nl_ueid_dump()
260 read_lock(&smc_clc_eid_table.lock); in smc_nl_dump_seid()
261 seid_enabled = smc_clc_eid_table.seid_enabled; in smc_nl_dump_seid()
262 read_unlock(&smc_clc_eid_table.lock); in smc_nl_dump_seid()
276 write_lock(&smc_clc_eid_table.lock); in smc_nl_enable_seid()
277 smc_clc_eid_table.seid_enabled = 1; in smc_nl_enable_seid()
278 write_unlock(&smc_clc_eid_table.lock); in smc_nl_enable_seid()
286 write_lock(&smc_clc_eid_table.lock); in smc_nl_disable_seid()
287 if (!smc_clc_eid_table.ueid_cnt) in smc_nl_disable_seid()
290 smc_clc_eid_table.seid_enabled = 0; in smc_nl_disable_seid()
291 write_unlock(&smc_clc_eid_table.lock); in smc_nl_disable_seid()
299 list_for_each_entry(tmp_ueid, &smc_clc_eid_table.list, list) { in _smc_clc_match_ueid()
314 read_lock(&smc_clc_eid_table.lock); in smc_clc_match_eid()
316 smc_clc_eid_table.seid_enabled && in smc_clc_match_eid()
333 read_unlock(&smc_clc_eid_table.lock); in smc_clc_match_eid()
892 read_lock(&smc_clc_eid_table.lock); in smc_clc_send_proposal()
893 v2_ext->hdr.eid_cnt = smc_clc_eid_table.ueid_cnt; in smc_clc_send_proposal()
894 plen += smc_clc_eid_table.ueid_cnt * SMC_MAX_EID_LEN; in smc_clc_send_proposal()
896 list_for_each_entry(ueident, &smc_clc_eid_table.list, list) { in smc_clc_send_proposal()
900 read_unlock(&smc_clc_eid_table.lock); in smc_clc_send_proposal()
905 v2_ext->hdr.flag.seid = smc_clc_eid_table.seid_enabled; in smc_clc_send_proposal()
1166 INIT_LIST_HEAD(&smc_clc_eid_table.list); in smc_clc_init()
1167 rwlock_init(&smc_clc_eid_table.lock); in smc_clc_init()
1168 smc_clc_eid_table.ueid_cnt = 0; in smc_clc_init()
1169 smc_clc_eid_table.seid_enabled = 1; in smc_clc_init()