Date: Mon, 30 Sep 2024 05:08:13 GMT From: Zhenlei Huang <zlei@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 9113fe381f1e - stable/13 - al_eth: Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK) Message-ID: <202409300508.48U58DSL024605@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9113fe381f1ea848d960315a3d3abdf9b770da07 commit 9113fe381f1ea848d960315a3d3abdf9b770da07 Author: Zhenlei Huang <zlei@FreeBSD.org> AuthorDate: 2024-09-03 10:25:23 +0000 Commit: Zhenlei Huang <zlei@FreeBSD.org> CommitDate: 2024-09-30 05:05:32 +0000 al_eth: Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45852 (cherry picked from commit 00ae9c1be02e2db6ede1abd5b787bb9a3fbd76b0) (cherry picked from commit 74887e322101cbc9e531e3acd08a6eb10dd2169e) --- sys/dev/al_eth/al_eth.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/sys/dev/al_eth/al_eth.c b/sys/dev/al_eth/al_eth.c index eb6525a566dd..409769b5ee5f 100644 --- a/sys/dev/al_eth/al_eth.c +++ b/sys/dev/al_eth/al_eth.c @@ -2009,14 +2009,6 @@ al_eth_enable_msix(struct al_eth_adapter *adapter) adapter->msix_entries = malloc(msix_vecs*sizeof(*adapter->msix_entries), M_IFAL, M_ZERO | M_WAITOK); - - if (adapter->msix_entries == NULL) { - device_printf_dbg(adapter->dev, "failed to allocate" - " msix_entries %d\n", msix_vecs); - rc = ENOMEM; - goto exit; - } - /* management vector (GROUP_A) @2*/ adapter->msix_entries[AL_ETH_MGMT_IRQ_IDX].entry = 2; adapter->msix_entries[AL_ETH_MGMT_IRQ_IDX].vector = 0; @@ -2304,9 +2296,6 @@ al_eth_setup_tx_resources(struct al_eth_adapter *adapter, int qid) size = sizeof(struct al_eth_tx_buffer) * tx_ring->sw_count; tx_ring->tx_buffer_info = malloc(size, M_IFAL, M_ZERO | M_WAITOK); - if (tx_ring->tx_buffer_info == NULL) - return (ENOMEM); - tx_ring->descs_size = tx_ring->hw_count * sizeof(union al_udma_desc); q_params->size = tx_ring->hw_count; @@ -2329,10 +2318,6 @@ al_eth_setup_tx_resources(struct al_eth_adapter *adapter, int qid) mtx_init(&tx_ring->br_mtx, "AlRingMtx", NULL, MTX_DEF); tx_ring->br = buf_ring_alloc(AL_BR_SIZE, M_DEVBUF, M_WAITOK, &tx_ring->br_mtx); - if (tx_ring->br == NULL) { - device_printf(dev, "Critical Failure setting up buf ring\n"); - return (ENOMEM); - } /* Allocate taskqueues */ TASK_INIT(&tx_ring->enqueue_task, 0, al_eth_start_xmit, tx_ring); @@ -2481,9 +2466,6 @@ al_eth_setup_rx_resources(struct al_eth_adapter *adapter, unsigned int qid) size += 1; rx_ring->rx_buffer_info = malloc(size, M_IFAL, M_ZERO | M_WAITOK); - if (rx_ring->rx_buffer_info == NULL) - return (ENOMEM); - rx_ring->descs_size = rx_ring->hw_count * sizeof(union al_udma_desc); q_params->size = rx_ring->hw_count;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409300508.48U58DSL024605>