From nobody Tue Feb 08 15:14:03 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 3808419C39E9; Tue, 8 Feb 2022 15:14:08 +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 4JtRPC6Hg4z4dWT; Tue, 8 Feb 2022 15:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644333247; 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=Kqm0Zl91z49G8cZ9zbIIg23KjKmQEE2P+3qQJW1WhJo=; b=GJoqQXgalV82PGy21uj99LXiSmQ5xjQL9PCwRfFawnktyndfGrKIpuNqmav5WP74ah5HE5 ycOmR0RcL7zt2H6ebR5tF/kmRewzgssVCKtb0NtWA1nlPrYUfb74v8ozWJTA1uqwh9TbrH d5H8/1v2ghoOFJmWbKHyxakLz0oiFTTYJy66SCIxSamtfskOe50o8mnZGaSrvYlGvWm1GD rH05fChfvIrRL6cq0ThBLupZJxVHLEh7+Pf40ofXgloUXaBOZqnq5SNQCM/DYfrxlNZe4E zbkUDj3wLWYfrL+b1Bfn8Huz/mpwk92ZWrpr2OYgs27DsGlvvX+tXIvT3JfiSw== 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 1CBEC1BA73; Tue, 8 Feb 2022 15:14:04 +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 218FE3i8020788; Tue, 8 Feb 2022 15:14:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 218FE33J020787; Tue, 8 Feb 2022 15:14:03 GMT (envelope-from git) Date: Tue, 8 Feb 2022 15:14:03 GMT Message-Id: <202202081514.218FE33J020787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Hans Petter Selasky Subject: git: 75312cafe79f - stable/13 - mlx5en: Properly account for no-checksum on tunneled packets. 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: hselasky X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 75312cafe79f3ea6b2bd96174084bd75df91bb08 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644333247; 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=Kqm0Zl91z49G8cZ9zbIIg23KjKmQEE2P+3qQJW1WhJo=; b=Gy4mWkI99VFnhYX5ktibF0hp0zdBeVdwwH62GR/yvJamZ3FzXYt9zUEz53H8jAALBU19Wn VjvIQQj7eSVcEHX557U8I1pVcbDgrtrHteOu829pQJuPoGWRdys3+pq9j7VvXZQNr8ngGk 5yaUji0QORLTzwl52bxSQq2EeVh2dg4Z78OjoTyeg33rKm6igRMbaoniwpnRQ0pyHrHbJF dag8y3KoSwNyv3Hf1osz+gwvwLK7KankOHBk8ay4y/zcC6dZpNQOEgsMuDwcp7k7jVGmsI LS/myto+uJXcsTwkWYmSW+xqt/Q3H1Y7ORAcUVGo3Qg50mUFmvqdtFLfRDYU1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644333247; a=rsa-sha256; cv=none; b=swKNrcmyWZPoWsaQMSJ10S9GGCtUxTUYGLknI/5evtlBOJojZCh9VW39XTl37ZU06k3mcb VQLlBSI7AKvDAIMVm/QnlyyvPXby7RlOAOISZSkrWVc8srQg7+DnPIXe6f7Hzm7pxnRDZL 1kz1Oe2FWsQqaCmWQhD+9SLmncfpik16YMUNofese1e9wweiktcFfD32qoNAeiCF+3XAcv xGC6kjNbVWi9RF2o41VcVsL98pHpBR167s6JRSqRJBfILfxXqNWf9iAyYNmj3NBIPzVf6z GCrYzJ564L7hz7xb+ctd2hARA/BN22lz8Wmn1HCLNnix2wGRd0qqeKBjW7XSwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=75312cafe79f3ea6b2bd96174084bd75df91bb08 commit 75312cafe79f3ea6b2bd96174084bd75df91bb08 Author: Hans Petter Selasky AuthorDate: 2022-02-08 15:08:53 +0000 Commit: Hans Petter Selasky CommitDate: 2022-02-08 15:08:53 +0000 mlx5en: Properly account for no-checksum on tunneled packets. Sponsored by: NVIDIA Networking (cherry picked from commit aabca1034c742ed6160ffec57a7e481d929153f7) --- sys/dev/mlx5/mlx5_en/mlx5_en_rx.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c index 522e3f09df2c..9e58a9bd7904 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c @@ -333,11 +333,13 @@ mlx5e_build_rx_mbuf(struct mlx5_cqe64 *cqe, CSUM_IP_CHECKED | CSUM_IP_VALID | CSUM_DATA_VALID | CSUM_PSEUDO_HDR; mb->m_pkthdr.csum_data = htons(0xffff); - } - if (((cqe->hds_ip_ext & (CQE_L2_OK | CQE_L3_OK | CQE_L4_OK)) == - (CQE_L2_OK | CQE_L3_OK | CQE_L4_OK))) { - mb->m_pkthdr.csum_flags |= - CSUM_INNER_L4_CALC | CSUM_INNER_L4_VALID; + + if (likely((cqe->hds_ip_ext & CQE_L4_OK) == CQE_L4_OK)) { + mb->m_pkthdr.csum_flags |= + CSUM_INNER_L4_CALC | CSUM_INNER_L4_VALID; + } + } else { + rq->stats.csum_none++; } } else if (likely((ifp->if_capenable & (IFCAP_RXCSUM | IFCAP_RXCSUM_IPV6)) != 0) &&