Lines Matching refs:pdt
653 int bnxt_qplib_alloc_pd(struct bnxt_qplib_pd_tbl *pdt, struct bnxt_qplib_pd *pd) in bnxt_qplib_alloc_pd() argument
657 bit_num = find_first_bit(pdt->tbl, pdt->max); in bnxt_qplib_alloc_pd()
658 if (bit_num == pdt->max) in bnxt_qplib_alloc_pd()
662 clear_bit(bit_num, pdt->tbl); in bnxt_qplib_alloc_pd()
668 struct bnxt_qplib_pd_tbl *pdt, in bnxt_qplib_dealloc_pd() argument
671 if (test_and_set_bit(pd->id, pdt->tbl)) { in bnxt_qplib_dealloc_pd()
680 static void bnxt_qplib_free_pd_tbl(struct bnxt_qplib_pd_tbl *pdt) in bnxt_qplib_free_pd_tbl() argument
682 kfree(pdt->tbl); in bnxt_qplib_free_pd_tbl()
683 pdt->tbl = NULL; in bnxt_qplib_free_pd_tbl()
684 pdt->max = 0; in bnxt_qplib_free_pd_tbl()
688 struct bnxt_qplib_pd_tbl *pdt, in bnxt_qplib_alloc_pd_tbl() argument
696 pdt->tbl = kmalloc(bytes, GFP_KERNEL); in bnxt_qplib_alloc_pd_tbl()
697 if (!pdt->tbl) in bnxt_qplib_alloc_pd_tbl()
700 pdt->max = max; in bnxt_qplib_alloc_pd_tbl()
701 memset((u8 *)pdt->tbl, 0xFF, bytes); in bnxt_qplib_alloc_pd_tbl()