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 DEC1E45903 for ; Wed, 4 Sep 2024 16:30:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B72974025A; Wed, 4 Sep 2024 16:30:58 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id EE9764014F for ; Wed, 4 Sep 2024 16:30:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725460256; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=Yc7Z69OK9lYt7CaHma+GiezfmAt0gZxqir+GIIRuLJ0=; b=Ahb76Ek647PNOFMS1tS6sfm3mrZyr/mbZGfv18gFYP59dvIarS2AxBbdUbUQENutEN/eDA YCCSbwh7tOZZKHEo6jt8oHojMcyK1Gz3/CHn3MtiDQ1jiFZK3Blbo3Y65P210au6+efghV C033X9G/kt/twUuXDYgiDIrKKVjZE5I= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-416-fcPBuxtKMD-rms8eyM4XUg-1; Wed, 04 Sep 2024 10:30:54 -0400 X-MC-Unique: fcPBuxtKMD-rms8eyM4XUg-1 Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-a86915aeb32so71594766b.3 for ; Wed, 04 Sep 2024 07:30:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725460253; x=1726065053; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Yc7Z69OK9lYt7CaHma+GiezfmAt0gZxqir+GIIRuLJ0=; b=dgjEdi/oWPdvjPR1jftqCXD5lnXmoSf0zzWJncwXRfnm7EFrpEtzmp8Wu9g39n3gaK 8hnRb96nPzXVMNPcbqOo3t9aCnrlW/pPNDQcjotxmzjURg0dI9tQvR6yESfK3cWQGBAZ neR0LxFXHTtFbXqgG7SHp1Xudh9V8+WcSzLpM+xQToQ9BgYjg2wBXNclCSgIZJLVXI7B JU7lgGG79Noqu8SeApVD470Fu3Gi30U1EkMdZrEnyKI1KLdnpw008YUSVz9hzUQugTGT K2Bbzp1vqvDHJEGivrtB63BVQYRiY4uFhtcEuwy91a68uWMA64Aie20D3Gf5qUgZEpEY bR1Q== X-Gm-Message-State: AOJu0YyokJ5nk77UIQebCjSqLfn/PMhubLxPuv2EoUBZNi/R3a0kGEne ogkLQgmL7p6uVfj9cLcqwoWIY26oW2D8N7XxCVWboAwofE/Q7YSHuq0+aNVW2HReBUyW1Zb98Al lcS/2iw1ebr2Y2ZaU5wOc8d5wOfstJxll+Ipm28sunH3xz+ZRWGiD X-Received: by 2002:a17:907:7245:b0:a86:6fb3:fda5 with SMTP id a640c23a62f3a-a8a3f24a7e8mr178568166b.32.1725460253366; Wed, 04 Sep 2024 07:30:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGLpDt3cYfk2HmL+rzRqWpwVOypg5ZzSR8jwOgMcDYZUOrFohaaPIaqI1GWeilTB//D45V4uQ== X-Received: by 2002:a17:907:7245:b0:a86:6fb3:fda5 with SMTP id a640c23a62f3a-a8a3f24a7e8mr178565366b.32.1725460252739; Wed, 04 Sep 2024 07:30:52 -0700 (PDT) Received: from [192.168.0.36] ([78.19.103.36]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8a61fbb1f4sm176266b.29.2024.09.04.07.30.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 Sep 2024 07:30:52 -0700 (PDT) Message-ID: <37b891a1-6398-43df-81d4-66ec14e0a43c@redhat.com> Date: Wed, 4 Sep 2024 15:30:51 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: patch 'net/ena: fix bad checksum handling' has been queued to stable release 21.11.8 To: "Brandes, Shai" Cc: dpdk stable References: <20240823161929.1004778-1-ktraynor@redhat.com> <20240823161929.1004778-109-ktraynor@redhat.com> <908f1df9-7f08-40b6-bdf9-ed72e32c4bff@redhat.com> <6b65b43218114c0f906ba788d09a095a@amazon.com> From: Kevin Traynor Autocrypt: addr=ktraynor@redhat.com; keydata= xsFNBF2J2awBEADUEPNhgNI+nJNgiTAUcw4YIgVXEoHlsNPyyzG1BEXkWXALy0Y3fNTiw6+r ltWDkF9jzL9kfkecgQ67itGfk1OaBXgSGKuw1PUpxAwX2Bi76LAR6M5OsyGM9TSVVQwARalz hMwRBIZPzPc7or6Pw7jAOJ8SQGJ1Zlp1YJCjrvpe87V1tH/LY8Wnxn/EuoseFmWILAQZAtYS tGjcrAgYn3SPMLR1B0BP5bTBY06vWQjiufH8drenfDnMJAzuBdG1mqjnTqCjULZ3Hunv4xqZ aMnkvL/K5Tj1c12Oe4930EE53LrXIBUltRg5mBudSWHnC7twjH0082HH9f963Z/2UI63SFIT iUvRvAzJYytgy7XnWLQ0+goZBADKYfolOuC0H8VgCaux8u8KFF28Dy+N6TV2KI58jTlyg1Zu l7QwykZpnOkJFiy37Gfbu3YEOzO72cP/S7/A+zvuqkxi63jyEkd+FY99vLt/HN2MUZwRmKDw UPbLkmrs8WU01/POVsqDcfvz7vu2St8hqqTiSIdQGS2zyTKB2/DvPSM3jws3udkIYSuhn+X4 QBiV6lkVZ7DSE6a065gnAauAql+b32Eymy+xnG5jCt1tR+0Cp2VZYCR9OU2gmomUKBDoX/He pSgED01CqYPNjN+Tdd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gdTKaiDL2Vao4+XRIA3Y57b6MO35a3HuzAv7+i5Z0mnDEJO XxXqTOmKYpMIGexzM/PtuA0712sT1abG9tAJ17ao/B7cqMW5IkKkalemFbWfI2unns4Papvo tk9igVqyp6EJDU98z5TJioCVojwK2laDaoIjTJk9YYv3iwCsqPd5feU= In-Reply-To: <6b65b43218114c0f906ba788d09a095a@amazon.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 On 02/09/2024 14:01, Brandes, Shai wrote: > Hi Kevin, > > The fix is indeed required as it fixes an issue where checksum was inspected for non tcp/udp packets. > If you need I can prepare a dedicated patch for this on top of 21.11.8 Hi Shai, No need, I rebased the patch with the below and pushed to: https://git.dpdk.org/dpdk-stable/commit/?h=21.11&id=80d05a5ea82dcb5d79b90af95d8a0fa4c556651f thanks, Kevin. > It should go into https://github.com/kevintraynor/dpdk-stable/blob/21.11/drivers/net/ena/ena_ethdev.c#L309: > > packet_type |= RTE_PTYPE_L3_IPV6; > } > > - if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag) { > + if (!ena_rx_ctx->l4_csum_checked || ena_rx_ctx->frag || > + !(packet_type & (RTE_PTYPE_L4_TCP | RTE_PTYPE_L4_UDP))) { > ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN; > else > if (unlikely(ena_rx_ctx->l4_csum_err)) > ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD; > else > ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD; > > All the best, > Shai > > >> -----Original Message----- >> From: Kevin Traynor >> Sent: Monday, August 26, 2024 2:18 PM >> To: Brandes, Shai >> Cc: dpdk stable >> Subject: RE: [EXTERNAL] patch 'net/ena: fix bad checksum handling' has been >> queued to stable release 21.11.8 >> >> CAUTION: This email originated from outside of the organization. Do not click >> links or open attachments unless you can confirm the sender and know the >> content is safe. >> >> >> >> On 26/08/2024 11:26, Brandes, Shai wrote: >>> Hi Kevin, >>> >> >> Hi Shai, >> >>> I think there is one net/ena patch that was not picked up for the stable >> release (likely since there are two patches with similar title). >>> I would appreciate if you could verify. >>> >>> The missing patch: net/ena: fix wrong handling of checksum see >>> patchwork >>> https://patches.dpdk.org/project/dpdk/patch/20240702144626.14545-14- >> sh >>> aibran@amazon.com/ >>> >> >> >> Thanks for checking! It wasn't listed as relevant for 21.11 LTS as the 'Fixes:' >> tag indicates it is fixing a feature introduced after 21.11. >> >> commit f66055c7564050e55c7eab147d039bf01048829a >> Author: Shai Brandes >> Date: Tue Jul 2 17:46:24 2024 +0300 >> >> net/ena: fix checksum handling >> >> This change fixes an issue where a non tcp/udp packet can be indicated >> to have an invalid csum. If the device erroneously tries to verify the >> csum on a non tcp/udp packet it will result in false indication that >> there is a csum error. This change make the driver ignore the >> indication for csum error on such packets. >> >> Fixes: 84daba9962b5 ("net/ena: add extra Rx checksum related xstats") >> Cc: stable@dpdk.org >> >> Signed-off-by: Shai Brandes >> >> >> $ git tag --contains 84daba9962b5 >> v22.03 >> ... >> >> If you believe the Fixes: tag is incorrect and it should go to 21.11 branch, let >> me know (though I see it doesn't apply cleanly). >> >> thanks, >> Kevin. >> >> >>> All the best, >>> Shai Brandes >>> ENA drivers team >>> >>>> -----Original Message----- >>>> From: Kevin Traynor >>>> Sent: Friday, August 23, 2024 7:19 PM >>>> To: Brandes, Shai >>>> Cc: dpdk stable >>>> Subject: [EXTERNAL] patch 'net/ena: fix bad checksum handling' has >>>> been queued to stable release 21.11.8 >>>> >>>> CAUTION: This email originated from outside of the organization. Do >>>> not click links or open attachments unless you can confirm the sender >>>> and know the content is safe. >>>> >>>> >>>> >>>> Hi, >>>> >>>> FYI, your patch has been queued to stable release 21.11.8 >>>> >>>> Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. >>>> It will be pushed if I get no objections before 08/28/24. 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/kevintraynor/dpdk-stable >>>> >>>> This queued commit can be viewed at: >>>> https://github.com/kevintraynor/dpdk- >>>> stable/commit/082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f >>>> >>>> Thanks. >>>> >>>> Kevin >>>> >>>> --- >>>> From 082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f Mon Sep 17 00:00:00 >>>> 2001 >>>> From: Shai Brandes >>>> Date: Tue, 2 Jul 2024 17:46:22 +0300 >>>> Subject: [PATCH] net/ena: fix bad checksum handling >>>> >>>> [ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ] >>>> >>>> Removed a workaround for a false L4 bad Rx csum indication from the >>>> device. The workaround was to set it as unknown so the application >>>> would check it instead. >>>> The issue was fixed in the device, thus the driver bad csum handling >>>> should be fixed in the PMD. >>>> >>>> Fixes: b2d2f1cf89a6 ("net/ena: fix checksum flag for L4") >>>> >>>> Signed-off-by: Shai Brandes >>>> --- >>>> drivers/net/ena/ena_ethdev.c | 8 +------- >>>> 1 file changed, 1 insertion(+), 7 deletions(-) >>>> >>>> diff --git a/drivers/net/ena/ena_ethdev.c >>>> b/drivers/net/ena/ena_ethdev.c index 1c61f793e6..84c41f1b9d 100644 >>>> --- a/drivers/net/ena/ena_ethdev.c >>>> +++ b/drivers/net/ena/ena_ethdev.c >>>> @@ -311,11 +311,5 @@ static inline void ena_rx_mbuf_prepare(struct >>>> rte_mbuf *mbuf, >>>> else >>>> if (unlikely(ena_rx_ctx->l4_csum_err)) >>>> - /* >>>> - * 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 |= RTE_MBUF_F_RX_L4_CKSUM_UNKNOWN; >>>> + ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_BAD; >>>> else >>>> ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD; >>>> -- >>>> 2.46.0 >>>> >>>> --- >>>> Diff of the applied patch vs upstream commit (please double-check >>>> if non- >>>> empty: >>>> --- >>>> --- - 2024-08-23 17:18:12.913173354 +0100 >>>> +++ 0109-net-ena-fix-bad-checksum-handling.patch 2024-08-23 >>>> 17:18:09.849430556 +0100 >>>> @@ -1 +1 @@ >>>> -From fa4bb7025255036fcff9556c637efa2627ac4af4 Mon Sep 17 00:00:00 >>>> 2001 >>>> +From 082bd6be7b93ae090f2bdcc55fddc48c3bf16c2f Mon Sep 17 00:00:00 >>>> 2001 >>>> @@ -5,0 +6,2 @@ >>>> +[ upstream commit fa4bb7025255036fcff9556c637efa2627ac4af4 ] >>>> + >>>> @@ -13 +14,0 @@ >>>> -Cc: stable@dpdk.org >>>> @@ -21 +22 @@ >>>> -index 4e7171e629..b43b913903 100644 >>>> +index 1c61f793e6..84c41f1b9d 100644 >>>> @@ -24,3 +25,3 @@ >>>> -@@ -675,11 +675,5 @@ static inline void ena_rx_mbuf_prepare(struct >>>> ena_ring *rx_ring, >>>> - if (unlikely(ena_rx_ctx->l4_csum_err)) { >>>> - ++rx_stats->l4_csum_bad; >>>> +@@ -311,11 +311,5 @@ static inline void ena_rx_mbuf_prepare(struct >>>> rte_mbuf *mbuf, >>>> + else >>>> + if (unlikely(ena_rx_ctx->l4_csum_err)) >>>> @@ -35,2 +36,2 @@ >>>> - } else { >>>> - ++rx_stats->l4_csum_good; >>>> + else >>>> + ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD; >>> >