From nobody Tue Sep 03 10:27:01 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wyhd15Tlyz5MkJv; Tue, 03 Sep 2024 10:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wyhd14n1sz4s2t; Tue, 3 Sep 2024 10:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WAimFSsosdG+ZKS9aUVF6OYxdRPMzobc7MjAh6Zcv4g=; b=bUWmh9BlYMT8x5PFU8Z5EMOUOTGUSwf2tcb2rRButNX5cKhjGAhLmpg6H4S8SFH72V6fBQ Dl45Gpm6bYmWRw0vAXA7Mq/pOJCnJQTa9wOTKJtovV8OdH6waYkGjp5rC19Noh5JkvjPiN 79ZPknxvVYRcfXFUdC9iIKh37f99VCuolL1GjBYjldChfDFwxhUpxQcHoeOApU7DrcjHHA h7C2WAIPxdxAo07PUjj/rtHHMXZozuszlJcUXuzrUeWQ3E/hOe1Q7CkMBUdLfo8Vc95XEd T3ZWSIaXRgCIcps/HnIZHUtMmmBSTx7v3/uNRqyAHF1doiiWhq0o7v7tsxzPig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725359221; a=rsa-sha256; cv=none; b=eRkUOiP6idZL06HcmQlXGlNCeHbwPLuzC6EWWH1ay7XNlr+GktIaf0B8a3ccDrox7WUB4w YsS47zl7uRRg+dxHi338kOnOytwhgX6UrInZd8dWmQm8hMISqcw6FNXw/UzBKsE0PlZbP6 2UcXeHXuU3n7tQiyGkWGs/bEte+row3wwTJ/sQiKCjqoHYM5UTFzQ8Xi1+xdKetvHGemfW PMu4Ht7lZf61Bn5tkhXF6iwuXmKcfZCp7C4FkyrRenwJ8gneX/c8AxES6ZbI0Eb4hyvo/b wl5JQfnweTm/UMTDamSkhJFywj/Unl+Wbr1u//G51t8XDQaujxT1/xpzQ1R/EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725359221; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WAimFSsosdG+ZKS9aUVF6OYxdRPMzobc7MjAh6Zcv4g=; b=nt0R1E+gZxFcpFmEsHGg8qceRKFpy6z/B+pKQimg5/6Vj0X1DE1BnmLcMK4xq5APRTop1N +eVZJt7+kU4mzU6kpigIXf3LVljTf/175j2hUT7davQWG9eHbzCIiuKLTNf7YUtEgmGIlI jpKZEQWGYh/fbmPSik/yJ3ktzHMYp5XvS3uF5iSyzxjrM49V3jq+3p8aN7U5rPrOVVpyJy LzLQr33k943HW6xDP30+zKsll/XF+Rg9/XbHMfgCHeWHYzKMsjKzFQbb7RRWpQM15B5BPB Wja1k0uKu2XLIc0xRIXLQsAnuvHTVkmYx7oloYWEC1Z6WCodU94nL1ybgldiqA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Wyhd14H2PzcJv; Tue, 3 Sep 2024 10:27:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 483AR1dp009524; Tue, 3 Sep 2024 10:27:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 483AR1iM009521; Tue, 3 Sep 2024 10:27:01 GMT (envelope-from git) Date: Tue, 3 Sep 2024 10:27:01 GMT Message-Id: <202409031027.483AR1iM009521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 00ae9c1be02e - main - al_eth: Stop checking for failures from malloc/buf_ring_alloc(M_WAITOK) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 00ae9c1be02e2db6ede1abd5b787bb9a3fbd76b0 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=00ae9c1be02e2db6ede1abd5b787bb9a3fbd76b0 commit 00ae9c1be02e2db6ede1abd5b787bb9a3fbd76b0 Author: Zhenlei Huang AuthorDate: 2024-09-03 10:25:23 +0000 Commit: Zhenlei Huang CommitDate: 2024-09-03 10:25:23 +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 --- 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 b8dd95e7ca58..e12c8dfcc281 100644 --- a/sys/dev/al_eth/al_eth.c +++ b/sys/dev/al_eth/al_eth.c @@ -2004,14 +2004,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; @@ -2299,9 +2291,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; @@ -2324,10 +2313,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); @@ -2476,9 +2461,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;