From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 97D42A00BE for ; Mon, 28 Oct 2019 11:23:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8378F1BEFA; Mon, 28 Oct 2019 11:23:42 +0100 (CET) Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) by dpdk.org (Postfix) with ESMTP id 70C1C1BE80 for ; Mon, 28 Oct 2019 11:23:38 +0100 (CET) Received: by mail-lj1-f194.google.com with SMTP id t5so2849348ljk.0 for ; Mon, 28 Oct 2019 03:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pZT3fqFYEGoXSegC4wV9APFXoNf6xwuZm49Ms9DSmWY=; b=u9R4fBfuwkwCmGzUBpGKYMKulPvdKt9egUWYUzTAFkK6lJ/dJB8CcY49rk9AGqrKQL cGsQRFr2/mV4n3SuhhJ/j49f6h98mlI3PceJCubX8fivK1CJ4b0kKtZ9ZpawOT9WdpYM XgiJ2k16xYVWuZUaji3TFEaEf/iEkk8M0FQ8ouJKadwohozjPmJT5QOv8Jx25MdUD6Nq CPfj7Ry39Oc1NquNqQd7uX6yb9PzJxcphG1ayMXoMX/UaUg68CvSKx7s6iXULqHgzbnc rPx/GuPL0QhDNJYNVvF6YanQ7jqDveaMVZW4QB4NqW0tjcKTV0ANHmv4xx5Qc/7maX0t Ucug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pZT3fqFYEGoXSegC4wV9APFXoNf6xwuZm49Ms9DSmWY=; b=WcmhHVnRGdCET6/+nGPz0qUSS3PqKRbYHy6ON8asIHOK1bjCrb6P1LbhXI6Ip8Qb/C 4+1rm+VqeO71AAVGvldgBXVmPriZN7Trexbg4eE+jDoKd7Saz9Ws7LYOI9bxKm6a1yLc YDq7T2bSHO4d4m9Iv6/YOz1mBuzcrhkdxH4ydjET+O7o5bPVc+Coj8a8xz1abm1WkfQa Zb8h99LStUKU12mTJta6BnoHouRjgINpDWUL4epHFxl38X1qvz6FUzoV8tBkpbyM6Q+m GCaT9/bL7jtkSq+nM43kOwtDwMx+/WdZhkTuLqsRbhtLwHTFPuIIEU8OiUyZLx+gojo7 n6Gw== X-Gm-Message-State: APjAAAXp6q+cfyXlkHXiJDRpScN21wySLiqp9IRCSaCk8Zz+Ik9H66uJ rJI68jcvGmkCEiMjDlPbkfp0+w== X-Google-Smtp-Source: APXvYqykIAWJrbuiuKIXoSJzagFdRKo7AoUxIQMkQUQSxRV9F061azJ/Xi1hmIwcdwdqNsCmhgRsbA== X-Received: by 2002:a2e:998a:: with SMTP id w10mr4482992lji.152.1572258217844; Mon, 28 Oct 2019 03:23:37 -0700 (PDT) Received: from localhost.localdomain (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id e26sm4873270ljj.76.2019.10.28.03.23.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2019 03:23:37 -0700 (PDT) From: Michal Krawczyk To: Marcin Wojtas , Michal Krawczyk , Guy Tzalik , Evgeny Schemeilin , Igor Chauskin Cc: dev@dpdk.org, stable@dpdk.org, Maciej Bielski Date: Mon, 28 Oct 2019 11:23:33 +0100 Message-Id: <20191028102333.15439-1-mk@semihalf.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191028101604.12072-1-mk@semihalf.com> References: <20191028101604.12072-1-mk@semihalf.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH v2] net/ena: fix false indication of bad L4 Rx csums X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" From: Igor Chauskin Add checking of l4_csum_checked and frag flags before checking the l4_csum_error flag. In case of IP fragment/unchecked L4 csum - add PKT_RX_L4_CKSUM_UNKNOWN flag to the indicated mbuf. Fixes: 1173fca25af9 ("ena: add polling-mode driver") Cc: stable@dpdk.org Signed-off-by: Igor Chauskin Reviewed-by: Maciej Bielski Reviewed-by: Michal Krawczyk --- v2: * Update ENA PMD version to the v2.0.2 drivers/net/ena/ena_ethdev.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c index aa84fabc5..8bbd80dfb 100644 --- a/drivers/net/ena/ena_ethdev.c +++ b/drivers/net/ena/ena_ethdev.c @@ -27,7 +27,7 @@ #define DRV_MODULE_VER_MAJOR 2 #define DRV_MODULE_VER_MINOR 0 -#define DRV_MODULE_VER_SUBMINOR 1 +#define DRV_MODULE_VER_SUBMINOR 2 #define ENA_IO_TXQ_IDX(q) (2 * (q)) #define ENA_IO_RXQ_IDX(q) (2 * (q) + 1) @@ -272,8 +272,14 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf, else if (ena_rx_ctx->l3_proto == ENA_ETH_IO_L3_PROTO_IPV6) packet_type |= RTE_PTYPE_L3_IPV6; - if (unlikely(ena_rx_ctx->l4_csum_err)) - ol_flags |= PKT_RX_L4_CKSUM_BAD; + if (!ena_rx_ctx->l4_csum_checked) + ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN; + else + if (unlikely(ena_rx_ctx->l4_csum_err) && !ena_rx_ctx->frag) + ol_flags |= PKT_RX_L4_CKSUM_BAD; + else + ol_flags |= PKT_RX_L4_CKSUM_UNKNOWN; + if (unlikely(ena_rx_ctx->l3_csum_err)) ol_flags |= PKT_RX_IP_CKSUM_BAD; -- 2.20.1