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 C14FCA0352 for ; Tue, 22 Feb 2022 17:07:34 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D74D0426E8; Tue, 22 Feb 2022 17:07:23 +0100 (CET) Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) by mails.dpdk.org (Postfix) with ESMTP id 8EEEC4116A for ; Tue, 22 Feb 2022 17:07:17 +0100 (CET) Received: by mail-ed1-f51.google.com with SMTP id u18so38118433edt.6 for ; Tue, 22 Feb 2022 08:07:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=14NUlgp7/uwht08EEffkISHQVyhpeQZpdRvDSsgGcy4=; b=AcIUZGq+VO/yvAcKAuUJHJhZsdch7/Oso943NP5XgMSAV8FsudjS/cnMyhOXPH66LQ 6+a3VkbWKkmEKbyQGrqpO49L5KfiC5DwQqyk9LORMxOhAIzNEThzagcsWcTgofabxnSf G7eZYjfg71uBRNLZxubzuj3J1+miJwZf+ygYHIlRf/FIj/LZcPM0KRImM61IfnTn/pbj NC6TeL0m33RcIaSoMOCacHhGdB0jfBR6XfoBvAAdhyiGQW2ZQDtkZmyXbNWQCijqn5GB HoC49nVQq4TgsRrkG7/qYmrO3B2zoRv/8VuXL+jzQK7OcebI2An1KXbdEYZRaMUFv4HZ iJzQ== 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=14NUlgp7/uwht08EEffkISHQVyhpeQZpdRvDSsgGcy4=; b=yNY46PbJZsrazKtbn8HXr2pt5jDVQsdolo4k/C2joyyk4FuejncA6Ir+YDVBAT96Le PXORdwGAz6KUt22e2kG4WzFRNpati/jk7lin0lPFgqmf8R/CDwR8EcpKY8oYeGtxP7Aq ZKGDKrw9aPRRA9L8ngq11e4XWDH9pppS2O5XbeuCwKXECZUGinu672eRPPz3HaZ31vDq rNTo1qbvwgRQDDBHKyQotSN5f/HJtnC7kppr4W9pOZVPW5+kAf5lqyzMiUoAW1feMGR1 vTxcTcaQ/T3mCyj1VMjuST7Y9wHAMUj40Z3e5XF4lzIDgKnqnaYUxO/qHWE3YistGf9i Uy0w== X-Gm-Message-State: AOAM531sSZVhTQkhWzBY6OAIOT7TuMxwZHOj8reKmI9JpVmOzWBFAO3I 8R2eFQFsggY2vTt9qd0iWsd4nA== X-Google-Smtp-Source: ABdhPJwec77IkJVhMcKhcG2c2Fv51uu5+SuGWRUj6NQE+seFtJfnmV2Kw4QOfpKZ49fwDvQ88RsSBA== X-Received: by 2002:aa7:cac8:0:b0:410:cc6c:6512 with SMTP id l8-20020aa7cac8000000b00410cc6c6512mr26698410edt.408.1645546037251; Tue, 22 Feb 2022 08:07:17 -0800 (PST) Received: from DESKTOP-U5LNN3J.localdomain (89-79-181-52.dynamic.chello.pl. [89.79.181.52]) by smtp.gmail.com with ESMTPSA id x6sm10013477edv.109.2022.02.22.08.07.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Feb 2022 08:07:16 -0800 (PST) From: Michal Krawczyk To: dev@dpdk.org Cc: shaibran@amazon.com, upstream@semihalf.com, Michal Krawczyk , stable@dpdk.org Subject: [PATCH 20/21] net/ena: don't indicate bad csum for L4 csum error Date: Tue, 22 Feb 2022 17:06:33 +0100 Message-Id: <20220222160634.24489-21-mk@semihalf.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220222160634.24489-1-mk@semihalf.com> References: <20220222160634.24489-1-mk@semihalf.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 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") Cc: stable@dpdk.org 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 9f29cf04ac..0861206ea4 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -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; + /* + * 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; } else { ++rx_stats->l4_csum_good; ol_flags |= RTE_MBUF_F_RX_L4_CKSUM_GOOD; -- 2.25.1