Lines Matching refs:pdt
678 int bnxt_qplib_alloc_pd(struct bnxt_qplib_pd_tbl *pdt, struct bnxt_qplib_pd *pd) in bnxt_qplib_alloc_pd() argument
682 bit_num = find_first_bit(pdt->tbl, pdt->max); in bnxt_qplib_alloc_pd()
683 if (bit_num == pdt->max) in bnxt_qplib_alloc_pd()
687 clear_bit(bit_num, pdt->tbl); in bnxt_qplib_alloc_pd()
693 struct bnxt_qplib_pd_tbl *pdt, in bnxt_qplib_dealloc_pd() argument
696 if (test_and_set_bit(pd->id, pdt->tbl)) { in bnxt_qplib_dealloc_pd()
705 static void bnxt_qplib_free_pd_tbl(struct bnxt_qplib_pd_tbl *pdt) in bnxt_qplib_free_pd_tbl() argument
707 kfree(pdt->tbl); in bnxt_qplib_free_pd_tbl()
708 pdt->tbl = NULL; in bnxt_qplib_free_pd_tbl()
709 pdt->max = 0; in bnxt_qplib_free_pd_tbl()
713 struct bnxt_qplib_pd_tbl *pdt, in bnxt_qplib_alloc_pd_tbl() argument
721 pdt->tbl = kmalloc(bytes, GFP_KERNEL); in bnxt_qplib_alloc_pd_tbl()
722 if (!pdt->tbl) in bnxt_qplib_alloc_pd_tbl()
725 pdt->max = max; in bnxt_qplib_alloc_pd_tbl()
726 memset((u8 *)pdt->tbl, 0xFF, bytes); in bnxt_qplib_alloc_pd_tbl()