From nobody Sun May 15 17:04:19 2022 X-Original-To: dev-commits-src-all@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 5426A1AD9235; Sun, 15 May 2022 17:04:19 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L1TJ31vSDz3hjW; Sun, 15 May 2022 17:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652634259; 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=jSnZVduGif+uRhh8HDfYljmPZ9zw+Gb/nTwe0mJVjA0=; b=tS0P5DJ22cGcNipNw31kYPwJ3opLEieuCmWjiQzv83lFo1azBHm9Ga8exAbt6SguLoetQC gkkLKkG7KpixwqYWjAtQ5EYPbnJl1lsda7scPfheRE7gq8oYXayjZnA1bNdHe+pTTQVMgN aLWuKhZQ0pcSN30UH0aqj4pzwHOZzuMl1w7jjhjlTdsHMHlNQoTN9dEGot8N0Q6eSiBIOR 89r1qCbfHUSIj4wmZYUDzzOIilkwmPMxIKgCzylF5dCTsnswc0r5FzwimYAMYzs4+NPCgY 5JY0j/OIrW4yyU3LvvN6gB+Kdcb/7rKuGIrpeFJDjATcRiuW1/Pf8+Ln10jc+w== 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 226F37C85; Sun, 15 May 2022 17:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24FH4Jv9087279; Sun, 15 May 2022 17:04:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24FH4JXt087278; Sun, 15 May 2022 17:04:19 GMT (envelope-from git) Date: Sun, 15 May 2022 17:04:19 GMT Message-Id: <202205151704.24FH4JXt087278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kevin Bowling Subject: git: 3f8306cf8e2d - stable/13 - e1000: Increase rx_buffer_size to 32b List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3f8306cf8e2d817f3c50ec2ecdfa52a71f2515ae Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652634259; 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=jSnZVduGif+uRhh8HDfYljmPZ9zw+Gb/nTwe0mJVjA0=; b=R5AbDK1ZbLdcM7cEo0EM02ht5gH6KI+oG0lA2VSmu5IY2GS56xv6fxecX+qWDUktGzX4mv 8HHPobRhPFVaW48by0cBWh14xuNmEmrbtDJGtbJXTcK+lDA3kFrzMdO8gybj5F5l3nJOvW 0f+GjTgBXVxsU5JBHI7v16T93TaPydFp2qysIZWvInBLX3Re1bbZ+QovCpi8VFKQtWw4U0 s6ZNqFvmpHqTNzVToCrC5CVQTSf1Qa7anE/yAagpkKJSSwuqrfx2aLikZynrhdtujXuGsK +AlwRwKudMb1vRVMz95zC6eHJrxOT9fVWgsDXfhRffitqX4HK0r0ENGkEa60Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652634259; a=rsa-sha256; cv=none; b=w03Dhb6rTyOpmEJqL3RUmQR9/gCS9+E09YIwEc0ei2q2kDQe72lrRsPye46dWrCRSc/cx3 sEEgaJD/0O4Wzr5Kfs6Dhjwm/Uq0enoegRrPsyEo/+Sp3HW4y1yRqVPyZIRAquYwDE/bni /yuRfANu6QojyrWXa0d3dct0tR6JlmwL1EsIrLMqJd8Rv3m9Xq2TfhCLStEqNH9Kux/EFP GTqEKspCdDU+uCUnL2LRaTNlThhgSPtW408hnkr022ArQ4EtCWDMu6NJQtXsmNzI4DkP7F wuweKw3yzeGxM1L+wnPbJ1yLrNtn8NhdKv+KJjBwBXRGVmdK4yylQ60jpQ8koQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=3f8306cf8e2d817f3c50ec2ecdfa52a71f2515ae commit 3f8306cf8e2d817f3c50ec2ecdfa52a71f2515ae Author: Kevin Bowling AuthorDate: 2022-05-12 15:38:09 +0000 Commit: Kevin Bowling CommitDate: 2022-05-15 17:04:00 +0000 e1000: Increase rx_buffer_size to 32b Extend the size of the local rx_buffer_size variable to account for larger buffer sizes possible on 82580, i350 chips. From i350 datasheet, 6.2.10 Initialization Control 4 (LAN Base Address + Offset 0x13): When 4 ports are enabled maximum buffer size is 36 KB. When 2 ports are enabled maximum buffer size is 72 KB. When only a single port is enabled maximum buffer size is 144 KB. and 8.3: The overall available internal buffer size in the I350 for all ports is 144 KB for receive buffers and 80 KB for transmit Buffers. Disabled ports memory can be shared between active ports and sharing can be asymmetric. The default buffer size for each port is loaded from the EEPROM on initialization. From the reporter: But for I350 when only 2 ports are used PBA size can be set as 72KB (see datasheet RXPbsize or e1000_rxpbs_adjust_82580 function in e1000_82575.c). In this case calculating the rx_buffer_size overflows as 0x0048 << 10 = 73728 or 0x12000 pushed into u16. It is then set as 0x2000 or 8192. PR: 263896 Reported by: hannula@gmail.com Tested by: hannula@gmail.com Approved by: markj Differential Revision: https://reviews.freebsd.org/D35167 (cherry picked from commit 6987c47569b377f4b6eba9966afdedfb1b39fca8) --- sys/dev/e1000/if_em.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c index f9d3edbd59a6..6dd494f1fbb3 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -2479,7 +2479,7 @@ em_reset(if_ctx_t ctx) struct e1000_softc *sc = iflib_get_softc(ctx); struct ifnet *ifp = iflib_get_ifp(ctx); struct e1000_hw *hw = &sc->hw; - u16 rx_buffer_size; + u32 rx_buffer_size; u32 pba; INIT_DEBUGOUT("em_reset: begin");