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 A8EFFA034C for ; Wed, 23 Feb 2022 13:21:04 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D906F4274E; Wed, 23 Feb 2022 13:20:57 +0100 (CET) Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) by mails.dpdk.org (Postfix) with ESMTP id 7B28042732 for ; Wed, 23 Feb 2022 13:20:54 +0100 (CET) Received: by mail-ej1-f43.google.com with SMTP id a8so52157404ejc.8 for ; Wed, 23 Feb 2022 04:20:54 -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=ndDl5vZNa01BJ1hxdPWPddH4EPEaX15QxhpSKgHJ0xU=; b=xFd9q7GAAlvhGGlR4xhJMDc0nqFIFYB7qbNh/zaH/nslkzCdOR85eCaKoiTL2sRYSi FbldCFGiifU/ofieSg7XSd0wAYKUkWAHdTFGd5SxLZcHKJXD84VkIlLvpeV0IMrdjBg5 0b7s/UyLApbrF2kUnzsfT+5amphUpM5HbCE0twBFApxEwt2idhydswD/V3BhMtqyA1aW LmoZj4ReQw85/UG4I2Kqf9HaMrc0g7uXo2ow2VwPk1DexKa/yn5agbYMOxM9IZkLNoW+ WMaVpsintpNW0dUi23vJ4kdNfYKRT41Pqo+sGhxJVfOFlGvbY5Rk+tyheNm43icGAxRi nzjw== 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=ndDl5vZNa01BJ1hxdPWPddH4EPEaX15QxhpSKgHJ0xU=; b=gC590oDOgn9s2tlA+bkwkkIw2vnrdrGJ3nLZfFkvhSub/xc78aUFSSGrA3OCuUcw2C A+fnjcIlU2Tf6wmt4fZchfLzzajh4IUKJjrXS/dF+RITv44v21ST3X91/ueyF3vanmR9 jBSViQQnUO13veg7wnzraq2XKcfE1au13mPdKEgbFoX1hB6MXOX1Qi/9Y9KxPFiaFcnD FhWKrwx+1Tkgrd+EVuTaxcKo5tqNU0dFX+HK994nC542gKDRrsO/tdqKRyps3PVCtAeY SPPqbiFmwntaEYN7qak7SZ7pkIISCM5fHJYbW8twyKiHgcpxra1KVXsDQZjAZTIrb14o 57ww== X-Gm-Message-State: AOAM530FLkZFRO3k3ATJSGPtXfc87zYqrox/9gwwfzaXJYQO+GN09PJ1 heH7CkaQmDEEOweaeydG2dOWelI8EHacrw== X-Google-Smtp-Source: ABdhPJwnwMZw3aYg1Vr2/pEf1u0XYrWThiR9t8DZM3pFwqUs8upYOf73jehPlCRMu8H9wF2hrejCIw== X-Received: by 2002:a17:907:7053:b0:6a6:b835:dbd3 with SMTP id ws19-20020a170907705300b006a6b835dbd3mr21965007ejb.190.1645618854239; Wed, 23 Feb 2022 04:20:54 -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 v12sm11629224edr.8.2022.02.23.04.20.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 04:20:53 -0800 (PST) From: Michal Krawczyk To: dev@dpdk.org Cc: ferruh.yigit@intel.com, shaibran@amazon.com, upstream@semihalf.com, Michal Krawczyk , stable@dpdk.org Subject: [PATCH v3 20/21] net/ena: don't indicate bad csum for L4 csum error Date: Wed, 23 Feb 2022 13:19:43 +0100 Message-Id: <20220223121944.24156-21-mk@semihalf.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220223121944.24156-1-mk@semihalf.com> References: <20220222181146.28882-1-mk@semihalf.com> <20220223121944.24156-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 151c688eec..4b58dcda74 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