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 2A5A9A0518 for ; Fri, 24 Jul 2020 14:02:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 22AD81C025; Fri, 24 Jul 2020 14:02:44 +0200 (CEST) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by dpdk.org (Postfix) with ESMTP id 1984D1C025 for ; Fri, 24 Jul 2020 14:02:43 +0200 (CEST) Received: by mail-wr1-f54.google.com with SMTP id r2so2987919wrs.8 for ; Fri, 24 Jul 2020 05:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=28Su7mp+eXfJzFnQMFD4KHRGEPf1IfRVKY41xCKbp7Y=; b=tl5g+j2DKspAYWPjCcfg/15ECcqPRtNiEQpxfvg3Row0DjaWBDUSxU8ZEI9Nw4Ox94 XMMJAglCJXY3MwkWwriDEqWr/rWJ0IMgr3aPHEPNJdeChFM0SWlQhPad8zuFKSq+aasc o1dafRaqfr4LNbdo7mbBshoNMXPUuScWFAts5d8L6dIyT+Qaynwyq7AXrr/04sIt5R69 w5PoFO2dsHtQQSnLCbBZV3/9x0AEumTEHWxJXbPAaOFNargKKcHEQY8z0ky6b6592ufu tnBv0aTIK2uWGfF+KITe5T6aTYogqgHTSDaNORk7En6G3XKqtp0n87VcPENLW5hkwHuK I7AA== 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=28Su7mp+eXfJzFnQMFD4KHRGEPf1IfRVKY41xCKbp7Y=; b=ZMJV9OWVQ4/oteRvVS/firamGapJk8vRNmEwxiGKPe6CqAv8vf8xOZ8wEvwMxfLSK2 M/aKSjLNRLFnEEpyWQTqc9drwOeUJ5XE7SWLlJBvTTsogI3QdzQpN/ZeX/Zq2O3tiKiW bfSLE9sGzciTPvdOY8mV+HvCDggefivJKeWyhuq1YzvtsqMjHskpwCXPZws8qzmle72U n5emNXTIPqYt21DZiCDPJMrJQuGHaP8Cu5UQGNdXPE7JEcoSvf6Sp1qF0Bga3Lesb1h8 jfl1oVwejhMjgG/RGTeMtLW2b7H3lqjqIpdGa0NfbNZIecI0OdtO1EywbkKso0fppBTZ lM9Q== X-Gm-Message-State: AOAM530382eDQR9EEBYPAKjIB/mxcAJ4IEAs2Aj6LY13et1M9lOcPKJ4 q9iDjpkuqDyC+kDkblQXqFds0SZEPIUmIA== X-Google-Smtp-Source: ABdhPJyssYcYtRCR8WZVzf7BbG4qy6TI7n20TCKxBUOKEU2dz5b+5J8fR5nb+EpTRxLjeu40TmlS5Q== X-Received: by 2002:adf:c386:: with SMTP id p6mr8297370wrf.344.1595592162850; Fri, 24 Jul 2020 05:02:42 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id m8sm1093927wro.75.2020.07.24.05.02.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Jul 2020 05:02:39 -0700 (PDT) From: luca.boccassi@gmail.com To: Dong Zhou Cc: Matan Azrad , dpdk stable Date: Fri, 24 Jul 2020 12:57:52 +0100 Message-Id: <20200724120030.1863487-34-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200724120030.1863487-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix LRO checksum' has been queued to stable release 19.11.4 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" Hi, FYI, your patch has been queued to stable release 19.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 07/26/20. 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. Thanks. Luca Boccassi --- >From caedd7c3682922aeb7b3ba7747655da90cc8dac4 Mon Sep 17 00:00:00 2001 From: Dong Zhou Date: Fri, 12 Jun 2020 11:57:46 +0300 Subject: [PATCH] net/mlx5: fix LRO checksum [ upstream commit eb10fe7fb150d3a9c1ef01134403f85890d5e06e ] The TCP checksum includes IPV4 pseudo-header checksum and L3 payload checksum which include TCP header and TCP payload. When mlx5 LRO is enabled, HW will calculate the TCP payload checksum, PMD need complete the IPV4 pseudo-header checksum and the TCP header checksum. The mlx5_lro_update_tcp_hdr function completes the TCP header checksum, but this function using lower 4 bits of data-offset field in TCP header to get the whole TCP header length, this will cause TCP header checksum wrong calculation. Update the code using higher 4 bits of data-offset field instead of lower 4 bits. Fixes: e4c2a16eb1de ("net/mlx5: handle LRO packets in Rx queue") Signed-off-by: Dong Zhou Acked-by: Matan Azrad --- drivers/net/mlx5/mlx5_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c index 90625e71f..a9c618128 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c @@ -1439,7 +1439,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *restrict tcp, if (cqe->lro_tcppsh_abort_dupack & MLX5_CQE_LRO_PUSH_MASK) tcp->tcp_flags |= RTE_TCP_PSH_FLAG; tcp->cksum = 0; - csum += rte_raw_cksum(tcp, (tcp->data_off & 0xF) * 4); + csum += rte_raw_cksum(tcp, (tcp->data_off >> 4) * 4); csum = ((csum & 0xffff0000) >> 16) + (csum & 0xffff); csum = (~csum) & 0xffff; if (csum == 0) -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-07-24 12:53:49.914474559 +0100 +++ 0034-net-mlx5-fix-LRO-checksum.patch 2020-07-24 12:53:48.231005416 +0100 @@ -1,8 +1,10 @@ -From eb10fe7fb150d3a9c1ef01134403f85890d5e06e Mon Sep 17 00:00:00 2001 +From caedd7c3682922aeb7b3ba7747655da90cc8dac4 Mon Sep 17 00:00:00 2001 From: Dong Zhou Date: Fri, 12 Jun 2020 11:57:46 +0300 Subject: [PATCH] net/mlx5: fix LRO checksum +[ upstream commit eb10fe7fb150d3a9c1ef01134403f85890d5e06e ] + The TCP checksum includes IPV4 pseudo-header checksum and L3 payload checksum which include TCP header and TCP payload. When mlx5 LRO is enabled, HW will calculate the TCP payload @@ -18,7 +20,6 @@ instead of lower 4 bits. Fixes: e4c2a16eb1de ("net/mlx5: handle LRO packets in Rx queue") -Cc: stable@dpdk.org Signed-off-by: Dong Zhou Acked-by: Matan Azrad @@ -27,10 +28,10 @@ 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c -index 4d67925e5..e4106bf0a 100644 +index 90625e71f..a9c618128 100644 --- a/drivers/net/mlx5/mlx5_rxtx.c +++ b/drivers/net/mlx5/mlx5_rxtx.c -@@ -1529,7 +1529,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *restrict tcp, +@@ -1439,7 +1439,7 @@ mlx5_lro_update_tcp_hdr(struct rte_tcp_hdr *restrict tcp, if (cqe->lro_tcppsh_abort_dupack & MLX5_CQE_LRO_PUSH_MASK) tcp->tcp_flags |= RTE_TCP_PSH_FLAG; tcp->cksum = 0;