Searched refs:res_cb (Results 1 – 5 of 5) sorted by relevance
385 dev->res_cb[ERDMA_RES_TYPE_PD].max_cap = ERDMA_MAX_PD; in erdma_dev_attrs_init()386 dev->res_cb[ERDMA_RES_TYPE_STAG_IDX].max_cap = dev->attrs.max_mr; in erdma_dev_attrs_init()421 dev->res_cb[i].next_alloc_idx = 1; in erdma_res_cb_init()422 spin_lock_init(&dev->res_cb[i].lock); in erdma_res_cb_init()423 dev->res_cb[i].bitmap = in erdma_res_cb_init()424 bitmap_zalloc(dev->res_cb[i].max_cap, GFP_KERNEL); in erdma_res_cb_init()425 if (!dev->res_cb[i].bitmap) in erdma_res_cb_init()433 bitmap_free(dev->res_cb[j].bitmap); in erdma_res_cb_init()443 bitmap_free(dev->res_cb[i].bitmap); in erdma_res_cb_free()
249 static int erdma_alloc_idx(struct erdma_resource_cb *res_cb) in erdma_alloc_idx() argument254 spin_lock_irqsave(&res_cb->lock, flags); in erdma_alloc_idx()255 idx = find_next_zero_bit(res_cb->bitmap, res_cb->max_cap, in erdma_alloc_idx()256 res_cb->next_alloc_idx); in erdma_alloc_idx()257 if (idx == res_cb->max_cap) { in erdma_alloc_idx()258 idx = find_first_zero_bit(res_cb->bitmap, res_cb->max_cap); in erdma_alloc_idx()259 if (idx == res_cb->max_cap) { in erdma_alloc_idx()260 res_cb->next_alloc_idx = 1; in erdma_alloc_idx()261 spin_unlock_irqrestore(&res_cb->lock, flags); in erdma_alloc_idx()266 set_bit(idx, res_cb->bitmap); in erdma_alloc_idx()[all …]
206 struct erdma_resource_cb res_cb[ERDMA_RES_CNT]; member
640 struct hnae_desc_cb *res_cb) in hnae_replace_buffer() argument645 ring->desc_cb[i] = *res_cb; in hnae_replace_buffer()
3557 struct hns3_desc_cb *res_cb) in hns3_replace_buffer() argument 3560 ring->desc_cb[i] = *res_cb; in hns3_replace_buffer()