From nobody Thu May 12 15:44:15 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 340891AD31D9; Thu, 12 May 2022 15:44:16 +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 4Kzbg40xVbz3BtZ; Thu, 12 May 2022 15:44:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652370256; 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=OT1QF/pyJk+0D68XYZS3mLkKyKL3cZK3/TtV1HgXLmc=; b=L5FPmUut+ywnO8SEjZzPg/oMtxAYZXvJjnlhuiudld6gRq5dG9HCUPCQ4riDq0gtWn5S8t 2QuzRqFyA79parHnC9UVwn+qAYzEFsGp8KHnTUM12OOiG6CQTt/qGSxVz8qaY7XY/G32Zh rsKz7QBOfyuRuFjfyJoXe3dWJTV0m0xIjodk8WKa4qdWnJ2hq/J87ZVggs0DT5y0oHRcnH b3FrV8ly8DVZVkPCAb3lt6bYleKaNgF4JwI9elIionoCSpiz/4U7UHPzQ5UyhCrTB1ppp+ FDNeHCLsAtMYflvgaNYhWhza+7kR0kd7TxWwU5LgdDfBFqZgWuY88bfXGE29+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 0096610FC1; Thu, 12 May 2022 15:44:16 +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 24CFiFia039282; Thu, 12 May 2022 15:44:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24CFiFCP039281; Thu, 12 May 2022 15:44:15 GMT (envelope-from git) Date: Thu, 12 May 2022 15:44:15 GMT Message-Id: <202205121544.24CFiFCP039281@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 6987c47569b3 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 6987c47569b377f4b6eba9966afdedfb1b39fca8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652370256; 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=OT1QF/pyJk+0D68XYZS3mLkKyKL3cZK3/TtV1HgXLmc=; b=rh+7JJDm3AQdryWYBUafFpyEAo+g6v+qcsUu4foGB/+1qllXd6304N9LGEXIyEbYYMXuHJ ObBbp0DZVt6qof9nOF+4DQfkWwx9/tHnx6aR4UVelmj081Y/lc4irz8OiSWUQ+8adYazqk jzGq/okqXSRyIiJbhPKNN7nRCnViyxtr/TZzgeoY14yjImBtoc0L5hgLqil63Yc02QTPjq LPDJt/S0gAI5OLK65w9W6341AnT45P1EP8JhK9QF2LAvvg17jeykWPOEgEXowdlA6C1u3o b3seNvr6tbi8AFqF2GqK5jWcuB1pM3gmfNBxn5h84o4X/yMhngmADkAoNNXM0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652370256; a=rsa-sha256; cv=none; b=CcofsOBLu1QnfD2TWYx8BBpY9cvgkeJ3x1HlZ+HRaMVIHxa2r8yBXpQcGHAK76/75N04ZJ Z233KkyHKN/NDBiiPXepRCZcCzuxLfng7jvnwMT3Pp64blwbRk/UIRXTAmotGnRuic/ZWQ plhIjiDYi6neL1XSVM3AKcoBG23p48x7c00A+1tdorTLLqboiZqOhe62GVLm89+NntiYz5 iEMdP8+u4GJrec5kKSU0upiBl0qBosF7XoKO784jSMc8Ar1cOPhQ4lB6YvOlI61xKZhuzU P3UXyO4SBq7ci/I5Yank8NmMADJqFBYMPaUn/BYQd83dWwdGucwnOJ3Af2XgDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kbowling (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=6987c47569b377f4b6eba9966afdedfb1b39fca8 commit 6987c47569b377f4b6eba9966afdedfb1b39fca8 Author: Kevin Bowling AuthorDate: 2022-05-12 15:38:09 +0000 Commit: Kevin Bowling CommitDate: 2022-05-12 15:43:55 +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 MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D35167 --- 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 bdb76d86995a..211ccad78d4a 100644 --- a/sys/dev/e1000/if_em.c +++ b/sys/dev/e1000/if_em.c @@ -2477,7 +2477,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");