Lines Matching refs:ctr
49 struct efx_tc_counter_index *ctr = ptr; in efx_tc_counter_id_free() local
51 WARN_ON(refcount_read(&ctr->ref)); in efx_tc_counter_id_free()
52 kfree(ctr); in efx_tc_counter_id_free()
212 struct efx_tc_counter_index *ctr) in efx_tc_flower_put_counter_index() argument
214 if (!refcount_dec_and_test(&ctr->ref)) in efx_tc_flower_put_counter_index()
216 rhashtable_remove_fast(&efx->tc->counter_id_ht, &ctr->linkage, in efx_tc_flower_put_counter_index()
218 efx_tc_flower_release_counter(efx, ctr->cnt); in efx_tc_flower_put_counter_index()
219 kfree(ctr); in efx_tc_flower_put_counter_index()
226 struct efx_tc_counter_index *ctr, *old; in efx_tc_flower_get_counter_index() local
229 ctr = kzalloc(sizeof(*ctr), GFP_USER); in efx_tc_flower_get_counter_index()
230 if (!ctr) in efx_tc_flower_get_counter_index()
232 ctr->cookie = cookie; in efx_tc_flower_get_counter_index()
234 &ctr->linkage, in efx_tc_flower_get_counter_index()
238 kfree(ctr); in efx_tc_flower_get_counter_index()
244 ctr = old; in efx_tc_flower_get_counter_index()
249 &ctr->linkage, in efx_tc_flower_get_counter_index()
251 kfree(ctr); in efx_tc_flower_get_counter_index()
254 ctr->cnt = cnt; in efx_tc_flower_get_counter_index()
255 refcount_set(&ctr->ref, 1); in efx_tc_flower_get_counter_index()
257 return ctr; in efx_tc_flower_get_counter_index()