Lines Matching refs:pdt
776 struct bnxt_qplib_pd_tbl *pdt = &res->pd_tbl; in bnxt_qplib_alloc_pd() local
779 bit_num = find_first_bit(pdt->tbl, pdt->max); in bnxt_qplib_alloc_pd()
780 if (bit_num == pdt->max - 1) {/* Last bit is reserved */ in bnxt_qplib_alloc_pd()
786 clear_bit(bit_num, pdt->tbl); in bnxt_qplib_alloc_pd()
794 struct bnxt_qplib_pd_tbl *pdt, in bnxt_qplib_dealloc_pd() argument
798 if (test_and_set_bit(pd->id, pdt->tbl)) { in bnxt_qplib_dealloc_pd()
805 pd->id = pdt->max - 1; in bnxt_qplib_dealloc_pd()
811 static void bnxt_qplib_free_pd_tbl(struct bnxt_qplib_pd_tbl *pdt) in bnxt_qplib_free_pd_tbl() argument
813 if (pdt->tbl) { in bnxt_qplib_free_pd_tbl()
814 kfree(pdt->tbl); in bnxt_qplib_free_pd_tbl()
815 pdt->tbl = NULL; in bnxt_qplib_free_pd_tbl()
817 pdt->max = 0; in bnxt_qplib_free_pd_tbl()
822 struct bnxt_qplib_pd_tbl *pdt; in bnxt_qplib_alloc_pd_tbl() local
825 pdt = &res->pd_tbl; in bnxt_qplib_alloc_pd_tbl()
832 pdt->tbl = kmalloc(bytes, GFP_KERNEL); in bnxt_qplib_alloc_pd_tbl()
833 if (!pdt->tbl) { in bnxt_qplib_alloc_pd_tbl()
838 pdt->max = max; in bnxt_qplib_alloc_pd_tbl()
839 memset((u8 *)pdt->tbl, 0xFF, bytes); in bnxt_qplib_alloc_pd_tbl()