From nobody Thu Nov 10 09:47:09 2022 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 4N7H721nNbz4XKTn; Thu, 10 Nov 2022 09:47:10 +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 4N7H721JPYz3k9q; Thu, 10 Nov 2022 09:47:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668073630; 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=c81lp3hn27qTMnUbkexcUm8PK/VtGuofVOdTaNINHro=; b=F1cXSwVr7Uw35hh89iMRSvNXf7bOPcCkg2QCzHZZU5AZfMPgnt1mRz6vXYrttpw5AE1xqO 6l5poWeMY8gfbGXSdUdSr1wSxy2/cKe+RCLSwEM64DkGm+3EA04xuPqptO7+wmudKeXbBZ ++PJHC47sFyYbuVkGXDvx9Xkg3dCo49ttKnr7sPOdRyrVOyb1bUZ0S2EQDtht21F0yRvdp JNOPQm5lDTt6+u9x1EelVNFPupJj/HHO7+VKx2nTa/QJPypQxsEzFo8DcfT4HsniIsna2q jIM4uXHAYEWrDI0vxUEWkvb8ZsqMjtQ5CAkwE//J+GAbmq6Oh+sXH/6SpSWwjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668073630; 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=c81lp3hn27qTMnUbkexcUm8PK/VtGuofVOdTaNINHro=; b=QnPsHN2V/pMBD5ykBQx0UqB6XpK7IJXufWYvadOqBHh2cFVdQIp9eydu3PllmEmN/KCz1N ZR44YLOyZt4V0BcRgzYgi+qWNhphTUZN+dIKAxuK5eN7XyHaJgmmW2DPBOuOopSLr1s5sO goS9kz9/VtvlTMfnnN6js+K50/VJDlsa41lvvMhGx7A+x87PtLYN6Hab/+FiD48ziEXZ+7 UwHqotX41HAwEY6Cw5c2XazQZKa8vIQ95YA64v++VdZKAoh0KzzbghBUZRc930V21ctKVd iaCUZl5WxIoZYqY7aAsrXDjoq3sUTAsYYN5twRmhf2rJLEAiftG5yeFeTsFkIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668073630; a=rsa-sha256; cv=none; b=cdASBRzQLwqXLlrjLpySHtisNEeI0sP0VXZ9h71BIK1bE6kbVuIcyMYA2BRJ7ZBdJ8uIms 8I6lE6Y4VL6pK1S4ZwWz6h89AUklQedhGqyrdhVfHXARAZjYDkU8tzIGtmTIpKp5ihUmVW 0senwyNc51P0TXnfl+0c7LKJ0gktdSMDC11505kPASCdKJrqMwvZQ5D+Zw2CXxOunGrrDT 01bFSJUQr+GfP6oib8lBvx8cXawBGCIKYPETu3OtTzs5scx5G/R5Km0ns139weGD1eygrV zvldShxZCg2qecCcpBP6HaOAdwTuZIaPUKjPq+bbB4LphaK3rlAgm6roxh++rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4N7H720FZBzwdx; Thu, 10 Nov 2022 09:47:10 +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 2AA9l9e6090463; Thu, 10 Nov 2022 09:47:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AA9l9a4090462; Thu, 10 Nov 2022 09:47:09 GMT (envelope-from git) Date: Thu, 10 Nov 2022 09:47:09 GMT Message-Id: <202211100947.2AA9l9a4090462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Andrey V. Elsukov" Subject: git: 8526120ad41c - main - ixgbe: workaround errata about UDP frames with zero checksum 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 8526120ad41ca47367b43f8f4459e0fa61285571 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=8526120ad41ca47367b43f8f4459e0fa61285571 commit 8526120ad41ca47367b43f8f4459e0fa61285571 Author: Andrey V. Elsukov AuthorDate: 2022-11-10 09:34:40 +0000 Commit: Andrey V. Elsukov CommitDate: 2022-11-10 09:34:40 +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 MFC after: 1 week Sponsored by: Yandex LLC --- 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 54008a24074b..1d472d7df628 100644 --- a/sys/dev/ixgbe/if_ix.c +++ b/sys/dev/ixgbe/if_ix.c @@ -1584,8 +1584,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 */