From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0A4F7A00BE for ; Wed, 9 Mar 2022 12:02:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 03FF7410DC; Wed, 9 Mar 2022 12:02:41 +0100 (CET) Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by mails.dpdk.org (Postfix) with ESMTP id 59AE840687 for ; Wed, 9 Mar 2022 12:02:40 +0100 (CET) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 37AD13F1FC for ; Wed, 9 Mar 2022 11:02:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1646823760; bh=btgcFITtIL7NdEfTlZ/lJt78TZD6A5pHo8lGjTx6/+U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=igJqwtT8jo1pSNG8Ww2ieM387zzYI6vLrEHpcnQ4q5FyMCRWJNMiRc+BiqCf8Zfc5 TjmNl1l9KOSilcSjnnoC98IHjTvzb2t85zTKdZ4cHSio0t8H3VlCVSnZIskZpO8ZHL 7BtaFzKXX2ybLQQeif2cmQv8dOgVZ1sDWvJtgPXKZ2My8p2CacIV2BJRkkZnfkd3AQ uToct8seKMwqgDKOMCQWRlsRYNPgBZHyD4FB90ienBrvuv+2TjQPb+J/Hw5wpmDh/5 gUvj3fZLzx0Y6hdHGjUBjNNndjWBPCw8QPTKk+srDWsu3915zoMeNT9zm3c9o7g7i5 P8duSEroaejnA== Received: by mail-wr1-f69.google.com with SMTP id w17-20020adfec51000000b001f068bc3342so639395wrn.6 for ; Wed, 09 Mar 2022 03:02:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=btgcFITtIL7NdEfTlZ/lJt78TZD6A5pHo8lGjTx6/+U=; b=vmGtv2wqsken3YVJQhVLMOYO8w/nWnHYsZTnbESKfNSUCPKWBSDfNUHFJeJhynxU8L eAF+wSKdsq3z5rnqB2VvByO8fJcfOVQQG2ZAs7H9R45RwQxMNqY53fn/DivTLdGcDe9N dAPcxCSGcwW7AIHZHkoilFeJATYEmI5F5Ld5nrEsDfRwsrzq7JAfwFtYXaJn9nTJi69d djM3KXvEEf5Sb3Z/4kYiuJtjx3FD6lvGTxzeKN+tCT9EZmp3qvLp+OV6TJMA3e7pqTIE rP4ha3hoeK42U/iPA6BSFZQdBxf58GBLhTnIxp5vuVuWfmWt73lxjPUspUnCd0K5UqHU zLRA== X-Gm-Message-State: AOAM531Yz9eGnIQNCwr0pfY1W5JxJjFZB2uNn7uS73xg+rzpmWRK83o8 XpL7uFd0GAJmzD1gHIFeCYiYD7j5OUYw5D8Um0sKWNtyT3hRIeMZ8qXYJ4CJfuZl6UFq5tsUdly YN0xju/hqXu0c9g6v6FRJUkVp X-Received: by 2002:a5d:648f:0:b0:1f0:567b:5619 with SMTP id o15-20020a5d648f000000b001f0567b5619mr15114455wri.66.1646823759707; Wed, 09 Mar 2022 03:02:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyU17T+unvgQcAHgzRuiuf9sFFSx3z9Rv/EvuN5R4LcwsrrdCb1iVAdLAeT3U29zabhCIpvIA== X-Received: by 2002:a5d:648f:0:b0:1f0:567b:5619 with SMTP id o15-20020a5d648f000000b001f0567b5619mr15114438wri.66.1646823759488; Wed, 09 Mar 2022 03:02:39 -0800 (PST) Received: from localhost.localdomain (068-133-067-156.ip-addr.inexio.net. [156.67.133.68]) by smtp.gmail.com with ESMTPSA id a8-20020a05600c068800b00389bdc8c8c2sm1361092wmn.12.2022.03.09.03.02.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Mar 2022 03:02:38 -0800 (PST) From: christian.ehrhardt@canonical.com To: Michal Krawczyk Cc: dpdk stable Subject: patch 'net/ena: fix checksum flag for L4' has been queued to stable release 19.11.12 Date: Wed, 9 Mar 2022 12:00:53 +0100 Message-Id: <20220309110116.1295395-22-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220309110116.1295395-1-christian.ehrhardt@canonical.com> References: <20220309110116.1295395-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 19.11.12 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/11/22. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/1e9ddbec02163de2dc48f9fbffba77c190c8416c Thanks. Christian Ehrhardt --- >From 1e9ddbec02163de2dc48f9fbffba77c190c8416c Mon Sep 17 00:00:00 2001 From: Michal Krawczyk Date: Wed, 23 Feb 2022 13:19:43 +0100 Subject: [PATCH] net/ena: fix checksum flag for L4 [ upstream commit b2d2f1cf89a6c3661e68b750364e4a7018f954ba ] Some HW may invalidly set checksum error bit for the valid L4 checksum. To avoid drop of the packets in that situation, do not indicate bad checksum for L4 Rx csum offloads. Instead, set it as unknown, so the application will re-verify this value. The statistics counters will still work as previously. Fixes: 05817057faba ("net/ena: fix indication of bad L4 Rx checksums") Signed-off-by: Michal Krawczyk --- drivers/net/ena/ena_ethdev.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index 5d5111e2c7..7601d2fa25 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -297,7 +297,13 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf, ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN; else if (unlikely(ena_rx_ctx->l4_csum_err)) - ol_flags |= PKT_RX_L4_CKSUM_BAD; + /* + * For the L4 Rx checksum offload the HW may indicate + * bad checksum although it's valid. Because of that, + * we're setting the UNKNOWN flag to let the app + * re-verify the checksum. + */ + ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN; else ol_flags |= PKT_RX_L4_CKSUM_GOOD; -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-03-09 11:57:44.524809903 +0100 +++ 0022-net-ena-fix-checksum-flag-for-L4.patch 2022-03-09 11:57:43.368938231 +0100 @@ -1 +1 @@ -From b2d2f1cf89a6c3661e68b750364e4a7018f954ba Mon Sep 17 00:00:00 2001 +From 1e9ddbec02163de2dc48f9fbffba77c190c8416c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit b2d2f1cf89a6c3661e68b750364e4a7018f954ba ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -22 +23 @@ -index 151c688eec..4b58dcda74 100644 +index 5d5111e2c7..7601d2fa25 100644 @@ -25,5 +26,5 @@ -@@ -583,7 +583,13 @@ static inline void ena_rx_mbuf_prepare(struct ena_ring *rx_ring, - } else { - if (unlikely(ena_rx_ctx->l4_csum_err)) { - ++rx_stats->l4_csum_bad; -- ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD; +@@ -297,7 +297,13 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf, + ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN; + else + if (unlikely(ena_rx_ctx->l4_csum_err)) +- ol_flags |= PKT_RX_L4_CKSUM_BAD; @@ -36,4 +37,4 @@ -+ ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN; - } else { - ++rx_stats->l4_csum_good; - ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD; ++ ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN; + else + ol_flags |= PKT_RX_L4_CKSUM_GOOD; +