Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ixl/ixl_pf_qmgr.c
Show All 39 Lines | |||||
int | int | ||||
ixl_pf_qmgr_init(struct ixl_pf_qmgr *qmgr, u16 num_queues) | ixl_pf_qmgr_init(struct ixl_pf_qmgr *qmgr, u16 num_queues) | ||||
{ | { | ||||
if (num_queues < 1) | if (num_queues < 1) | ||||
return (EINVAL); | return (EINVAL); | ||||
qmgr->num_queues = num_queues; | qmgr->num_queues = num_queues; | ||||
qmgr->qinfo = malloc(num_queues * sizeof(struct ixl_pf_qmgr_qinfo), | qmgr->qinfo = malloc(num_queues * sizeof(struct ixl_pf_qmgr_qinfo), | ||||
M_IXL, M_ZERO | M_WAITOK); | M_IXL, M_ZERO | M_NOWAIT); | ||||
if (qmgr->qinfo == NULL) | if (qmgr->qinfo == NULL) | ||||
return ENOMEM; | return ENOMEM; | ||||
return (0); | return (0); | ||||
} | } | ||||
int | int | ||||
ixl_pf_qmgr_alloc_contiguous(struct ixl_pf_qmgr *qmgr, u16 num, struct ixl_pf_qtag *qtag) | ixl_pf_qmgr_alloc_contiguous(struct ixl_pf_qmgr *qmgr, u16 num, struct ixl_pf_qtag *qtag) | ||||
▲ Show 20 Lines • Show All 252 Lines • Show Last 20 Lines |