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()
159 if (!rc && !smc_clc_eid_table.ueid_cnt) { in smc_clc_ueid_remove()
160 smc_clc_eid_table.seid_enabled = 1; in smc_clc_ueid_remove()
164 write_unlock(&smc_clc_eid_table.lock); in smc_clc_ueid_remove()
212 read_lock(&smc_clc_eid_table.lock); in _smc_nl_ueid_dump()
213 list_for_each_entry(lst_ueid, &smc_clc_eid_table.list, list) { in _smc_nl_ueid_dump()
222 read_unlock(&smc_clc_eid_table.lock); in _smc_nl_ueid_dump()
262 read_lock(&smc_clc_eid_table.lock); in smc_nl_dump_seid()
263 seid_enabled = smc_clc_eid_table.seid_enabled; in smc_nl_dump_seid()
264 read_unlock(&smc_clc_eid_table.lock); in smc_nl_dump_seid()
279 write_lock(&smc_clc_eid_table.lock); in smc_nl_enable_seid()
280 smc_clc_eid_table.seid_enabled = 1; in smc_nl_enable_seid()
281 write_unlock(&smc_clc_eid_table.lock); in smc_nl_enable_seid()
293 write_lock(&smc_clc_eid_table.lock); in smc_nl_disable_seid()
294 if (!smc_clc_eid_table.ueid_cnt) in smc_nl_disable_seid()
297 smc_clc_eid_table.seid_enabled = 0; in smc_nl_disable_seid()
298 write_unlock(&smc_clc_eid_table.lock); in smc_nl_disable_seid()
309 list_for_each_entry(tmp_ueid, &smc_clc_eid_table.list, list) { in _smc_clc_match_ueid()
324 read_lock(&smc_clc_eid_table.lock); in smc_clc_match_eid()
326 smc_clc_eid_table.seid_enabled && in smc_clc_match_eid()
343 read_unlock(&smc_clc_eid_table.lock); in smc_clc_match_eid()
926 read_lock(&smc_clc_eid_table.lock); in smc_clc_send_proposal()
927 v2_ext->hdr.eid_cnt = smc_clc_eid_table.ueid_cnt; in smc_clc_send_proposal()
928 plen += smc_clc_eid_table.ueid_cnt * SMC_MAX_EID_LEN; in smc_clc_send_proposal()
930 list_for_each_entry(ueident, &smc_clc_eid_table.list, list) { in smc_clc_send_proposal()
934 read_unlock(&smc_clc_eid_table.lock); in smc_clc_send_proposal()
941 v2_ext->hdr.flag.seid = smc_clc_eid_table.seid_enabled; in smc_clc_send_proposal()
1340 INIT_LIST_HEAD(&smc_clc_eid_table.list); in smc_clc_init()
1341 rwlock_init(&smc_clc_eid_table.lock); in smc_clc_init()
1342 smc_clc_eid_table.ueid_cnt = 0; in smc_clc_init()
1344 smc_clc_eid_table.seid_enabled = 1; in smc_clc_init()
1346 smc_clc_eid_table.seid_enabled = 0; in smc_clc_init()