Lines Matching refs:idtab
65 struct rio_id_table *idtab = &net->destid_table; in rio_destid_alloc() local
67 spin_lock(&idtab->lock); in rio_destid_alloc()
68 destid = find_first_zero_bit(idtab->table, idtab->max); in rio_destid_alloc()
70 if (destid < idtab->max) { in rio_destid_alloc()
71 set_bit(destid, idtab->table); in rio_destid_alloc()
72 destid += idtab->start; in rio_destid_alloc()
76 spin_unlock(&idtab->lock); in rio_destid_alloc()
91 struct rio_id_table *idtab = &net->destid_table; in rio_destid_reserve() local
93 destid -= idtab->start; in rio_destid_reserve()
94 spin_lock(&idtab->lock); in rio_destid_reserve()
95 oldbit = test_and_set_bit(destid, idtab->table); in rio_destid_reserve()
96 spin_unlock(&idtab->lock); in rio_destid_reserve()
109 struct rio_id_table *idtab = &net->destid_table; in rio_destid_free() local
111 destid -= idtab->start; in rio_destid_free()
112 spin_lock(&idtab->lock); in rio_destid_free()
113 clear_bit(destid, idtab->table); in rio_destid_free()
114 spin_unlock(&idtab->lock); in rio_destid_free()
124 struct rio_id_table *idtab = &net->destid_table; in rio_destid_first() local
126 spin_lock(&idtab->lock); in rio_destid_first()
127 destid = find_first_bit(idtab->table, idtab->max); in rio_destid_first()
128 if (destid >= idtab->max) in rio_destid_first()
131 destid += idtab->start; in rio_destid_first()
132 spin_unlock(&idtab->lock); in rio_destid_first()
144 struct rio_id_table *idtab = &net->destid_table; in rio_destid_next() local
146 spin_lock(&idtab->lock); in rio_destid_next()
147 destid = find_next_bit(idtab->table, idtab->max, from); in rio_destid_next()
148 if (destid >= idtab->max) in rio_destid_next()
151 destid += idtab->start; in rio_destid_next()
152 spin_unlock(&idtab->lock); in rio_destid_next()