From nobody Thu Nov 17 20:14:54 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 4NCrk62X5Zz4dGnH; Thu, 17 Nov 2022 20:14:54 +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 4NCrk61yWZz4M7V; Thu, 17 Nov 2022 20:14:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668716094; 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=QNND1adnWPLlNDgBCvW4vrgm0ktxegH/U1qzrbTjKns=; b=kniIMnYqFrlvT5fn3gkPEI/lOfak17/bApyxSNFIo9P9+DJ7mIfN0SGsiN5LNvSfpFkM1v RLLvpP1bSlB4oSqBU6FIKTgAJRhsiWIF9qjGqlhixMzt886yxLoM1tPGaiegkMQYQKcMQy 1zJeBTNQASXn+w5fdc7IFPiUUAWW7BKC5PMB+3GXE8evI/CouMjOY4Z+q+TO0cfQbusmXW 00tTfdHW9itEtYiGVuCRn3CI9/gKwCbLyp7P6jFnpNn17ceoyZ8P84/e+vLomCOP9dP8o6 whE0kNrrRAJ0cKL/7ouERLL1Aj0vDcGlslnsl1DCYSjPFon1N7kdOw2TvPdpsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668716094; 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=QNND1adnWPLlNDgBCvW4vrgm0ktxegH/U1qzrbTjKns=; b=PGnHukwSdnwFnxB7OWxboiJ1yzVpARxDCXUOMJCLOsklfHGBQDBNW3YcJur8ih48PgxI8u zWhN8d7B0XCRGznjnLgXQooat/XjV4aOAml4Xpnjf84TcdnW+XhqExLxh7mnqpeVZvezTQ RLfKXci/zdjzvSKL3nR+5ITI9nuX90FwOZIHj1TzB4rp4U0NPrQnmeJ4eOdvsucFSZIQZq sN+TtWusd/LC25AYa8lYbOC29VU3tDxkPvHq6e+pDAoaAqoQbktMRL4TT1jycEv4Y4p/od z9TM71cB2VRQ7WU+J/PACk6bm60YzANlzrOeTZbkxRk9g1jyPrReXSz60fg4LA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668716094; a=rsa-sha256; cv=none; b=jyDmiry5vE3quWZhxYM0cnFlIbee5GDEx50TrU1KyvjBu+3zsr434ChMZRsJqosArCmR08 E9fYhxVg0gi98Yu7hgfq67R6PBtT1f71zLgK8OfEUTGfGn3ufvG8Ju6Fo6AjP0oCqLHxUf Y6iy3ebZV2eOTDc1A85XJeclRmDf0kwStTHuIOi/76MmpOLKMbxQvjstuf2d2xfU55XsQz vVpg3FxQ/39JcTOD1iWcrWXFcUr7zo32oYxjJ0fkU4i2WoHIwhuhs59OOv3ZYToROW+ckl OwV7GuA+slT2RYK/rRHyAmUsG4CcGF/xbEECA6nLJnYmbpOvzC6DndlrHb3qyQ== 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 4NCrk611P6zv6l; Thu, 17 Nov 2022 20:14:54 +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 2AHKEscf038368; Thu, 17 Nov 2022 20:14:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AHKEswA038367; Thu, 17 Nov 2022 20:14:54 GMT (envelope-from git) Date: Thu, 17 Nov 2022 20:14:54 GMT Message-Id: <202211172014.2AHKEswA038367@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: daf3d88ac184 - stable/13 - ixgbe: workaround errata about UDP frames with zero checksum 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: ae X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: daf3d88ac1849c9a6c5f05d2a663c7fe57453b37 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=daf3d88ac1849c9a6c5f05d2a663c7fe57453b37 commit daf3d88ac1849c9a6c5f05d2a663c7fe57453b37 Author: Andrey V. Elsukov AuthorDate: 2022-11-10 09:34:40 +0000 Commit: Andrey V. Elsukov CommitDate: 2022-11-17 20:13:43 +0000 ixgbe: workaround errata about UDP frames with zero checksum Intel 82599 has errata related to IPv4 UDP frames with zero checksum. It reports such datagrams with L4 integrity errors in IXGBE_XEC register. And after afb1aa4e6df2 commit such errors are reported via IFCOUNTER_IERRORS. This confuses users, since actually all frames are handled correctly by the system. To workaround the problem, let's ignore the XEC register value for 82599 cards for now. PR: 266048 Discussed with: erj Sponsored by: Yandex LLC (cherry picked from commit 8526120ad41ca47367b43f8f4459e0fa61285571) --- sys/dev/ixgbe/if_ix.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c index e36bea228058..c985e89b4cca 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1585,8 +1585,12 @@ ixgbe_update_stats_counters(struct ixgbe_softc *sc) * - fragmented packets count, * - oversized packets count, * - jabber count. + * + * Ignore XEC errors for 82599 to workaround errata about + * UDP frames with zero checksum. */ - IXGBE_SET_IERRORS(sc, stats->crcerrs + stats->illerrc + stats->xec + + IXGBE_SET_IERRORS(sc, stats->crcerrs + stats->illerrc + + (hw->mac.type != ixgbe_mac_82599EB ? stats->xec : 0) + stats->mpc[0] + stats->rlec + stats->ruc + stats->rfc + stats->roc + stats->rjc); } /* ixgbe_update_stats_counters */