liquidio(4): Stop checking for failures from malloc/taskqueue_create/buf_ring_alloc(M_WAITOK)

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45853
This commit is contained in:
Zhenlei Huang 2024-09-03 18:25:38 +08:00
parent 3fdef8e855
commit 57cd8f27b7
4 changed files with 0 additions and 20 deletions

View File

@ -159,11 +159,6 @@ lio_init_instr_queue(struct octeon_device *oct, union octeon_txpciq txpciq,
db_tq = &oct->check_db_tq[iq_no]; db_tq = &oct->check_db_tq[iq_no];
db_tq->tq = taskqueue_create("lio_check_db_timeout", M_WAITOK, db_tq->tq = taskqueue_create("lio_check_db_timeout", M_WAITOK,
taskqueue_thread_enqueue, &db_tq->tq); taskqueue_thread_enqueue, &db_tq->tq);
if (db_tq->tq == NULL) {
lio_dev_err(oct, "check db wq create failed for iq %d\n",
iq_no);
return (1);
}
TIMEOUT_TASK_INIT(db_tq->tq, &db_tq->work, 0, lio_check_db_timeout, TIMEOUT_TASK_INIT(db_tq->tq, &db_tq->work, 0, lio_check_db_timeout,
(void *)db_tq); (void *)db_tq);
@ -179,10 +174,6 @@ lio_init_instr_queue(struct octeon_device *oct, union octeon_txpciq txpciq,
oct->instr_queue[iq_no]->br = oct->instr_queue[iq_no]->br =
buf_ring_alloc(LIO_BR_SIZE, M_DEVBUF, M_WAITOK, buf_ring_alloc(LIO_BR_SIZE, M_DEVBUF, M_WAITOK,
&oct->instr_queue[iq_no]->enq_lock); &oct->instr_queue[iq_no]->enq_lock);
if (oct->instr_queue[iq_no]->br == NULL) {
lio_dev_err(oct, "Critical Failure setting up buf ring\n");
return (1);
}
return (0); return (0);
} }

View File

@ -59,10 +59,6 @@ lio_setup_response_list(struct octeon_device *oct)
ctq = &oct->dma_comp_tq; ctq = &oct->dma_comp_tq;
ctq->tq = taskqueue_create("lio_dma_comp", M_WAITOK, ctq->tq = taskqueue_create("lio_dma_comp", M_WAITOK,
taskqueue_thread_enqueue, &ctq->tq); taskqueue_thread_enqueue, &ctq->tq);
if (ctq->tq == NULL) {
lio_dev_err(oct, "failed to create wq thread\n");
return (-ENOMEM);
}
TIMEOUT_TASK_INIT(ctq->tq, &ctq->work, 0, lio_poll_req_completion, TIMEOUT_TASK_INIT(ctq->tq, &ctq->work, 0, lio_poll_req_completion,
(void *)ctq); (void *)ctq);

View File

@ -1854,10 +1854,6 @@ lio_setup_rx_oom_poll_fn(if_t ifp)
rx_status_tq->tq = taskqueue_create("lio_rx_oom_status", M_WAITOK, rx_status_tq->tq = taskqueue_create("lio_rx_oom_status", M_WAITOK,
taskqueue_thread_enqueue, taskqueue_thread_enqueue,
&rx_status_tq->tq); &rx_status_tq->tq);
if (rx_status_tq->tq == NULL) {
lio_dev_err(oct, "unable to create lio rx oom status tq\n");
return (-1);
}
TIMEOUT_TASK_INIT(rx_status_tq->tq, &rx_status_tq->work, 0, TIMEOUT_TASK_INIT(rx_status_tq->tq, &rx_status_tq->work, 0,
lio_poll_check_rx_oom_status, (void *)rx_status_tq); lio_poll_check_rx_oom_status, (void *)rx_status_tq);

View File

@ -744,9 +744,6 @@ lio_get_regs(SYSCTL_HANDLER_ARGS)
regbuf = malloc(sizeof(char) * LIO_REGDUMP_LEN_XXXX, M_DEVBUF, regbuf = malloc(sizeof(char) * LIO_REGDUMP_LEN_XXXX, M_DEVBUF,
M_WAITOK | M_ZERO); M_WAITOK | M_ZERO);
if (regbuf == NULL)
return (error);
switch (oct->chip_id) { switch (oct->chip_id) {
case LIO_CN23XX_PF_VID: case LIO_CN23XX_PF_VID:
len += lio_cn23xx_pf_read_csr_reg(regbuf, oct); len += lio_cn23xx_pf_read_csr_reg(regbuf, oct);