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 1371D45804 for ; Fri, 23 Aug 2024 18:20:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0991D43379; Fri, 23 Aug 2024 18:20:49 +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 BB1C14336D for ; Fri, 23 Aug 2024 18:20:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724430047; 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; bh=2HKO0AzkokyyjarXIjM17mVWrNC/aVNPWoouLTvHa5w=; b=Alxxr0Hv8eDzs/FWiBtJEM7tHe0hLBK65qmV8Ue/hXqZlNmt2agMfuOTA/Ku5dnlkQMqrz okpHcZwIF7rKU7O6KHKsZ2mDH+/t4grKDO12luhnFmsRkwwWntRCENsUtzT5Af+rwJJfBc 9imRLwtinAhk/oPvEuo7+au4uxCk1MQ= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-682-4HQymjHRNaaq7zTUARXFJA-1; Fri, 23 Aug 2024 12:20:44 -0400 X-MC-Unique: 4HQymjHRNaaq7zTUARXFJA-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C85FF1955F03; Fri, 23 Aug 2024 16:20:42 +0000 (UTC) Received: from rh.redhat.com (unknown [10.39.193.224]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D91CE1956053; Fri, 23 Aug 2024 16:20:40 +0000 (UTC) From: Kevin Traynor To: David Marchand Cc: Jun Wang , Ali Alnubani , dpdk stable Subject: patch 'net/i40e: fix outer UDP checksum offload for X710' has been queued to stable release 21.11.8 Date: Fri, 23 Aug 2024 17:17:38 +0100 Message-ID: <20240823161929.1004778-30-ktraynor@redhat.com> In-Reply-To: <20240823161929.1004778-1-ktraynor@redhat.com> References: <20240823161929.1004778-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 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/d6ec78819d65c1f8f54c8a891f123c6df439d249 Thanks. Kevin --- >From d6ec78819d65c1f8f54c8a891f123c6df439d249 Mon Sep 17 00:00:00 2001 From: David Marchand Date: Thu, 18 Apr 2024 10:20:19 +0200 Subject: [PATCH] net/i40e: fix outer UDP checksum offload for X710 [ upstream commit 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 ] According to the X710 datasheet (and confirmed on the field..), X710 devices do not support outer checksum offload. """ 8.4.4.2 Transmit L3 and L4 Integrity Offload Tunneling UDP headers and GRE header are not offloaded while the X710/XXV710/XL710 leaves their checksum field as is. If a checksum is required, software should provide it as well as the inner checksum value(s) that are required for the outer checksum. """ Fix Tx offload capabilities according to the hardware. X722 may support such offload by setting I40E_TXD_CTX_QW0_L4T_CS_MASK. Bugzilla ID: 1406 Fixes: 8cc79a1636cd ("net/i40e: fix forward outer IPv6 VXLAN") Reported-by: Jun Wang Signed-off-by: David Marchand Tested-by: Ali Alnubani --- .mailmap | 1 + drivers/net/i40e/i40e_ethdev.c | 6 +++++- drivers/net/i40e/i40e_rxtx.c | 9 +++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.mailmap b/.mailmap index 434b0b53b7..7d18ead520 100644 --- a/.mailmap +++ b/.mailmap @@ -686,4 +686,5 @@ Jun Qiu Jun W Zhou Junxiao Shi +Jun Wang Jun Yang Junyu Jiang diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index d829467f41..8571d1419d 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -3758,6 +3758,10 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO | RTE_ETH_TX_OFFLOAD_MULTI_SEGS | - RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM | dev_info->tx_queue_offload_capa; + if (hw->mac.type == I40E_MAC_X722) { + dev_info->tx_offload_capa |= + RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM; + } + dev_info->dev_capa = RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP | diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index 8a277dfe31..20215a8e1e 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -296,4 +296,13 @@ i40e_parse_tunneling_params(uint64_t ol_flags, *cd_tunneling |= (tx_offload.l2_len >> 1) << I40E_TXD_CTX_QW0_NATLEN_SHIFT; + + /** + * Calculate the tunneling UDP checksum (only supported with X722). + * Shall be set only if L4TUNT = 01b and EIPT is not zero + */ + if ((*cd_tunneling & I40E_TXD_CTX_QW0_EXT_IP_MASK) && + (*cd_tunneling & I40E_TXD_CTX_UDP_TUNNELING) && + (ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM)) + *cd_tunneling |= I40E_TXD_CTX_QW0_L4T_CS_MASK; } -- 2.46.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-08-23 17:18:10.859137123 +0100 +++ 0030-net-i40e-fix-outer-UDP-checksum-offload-for-X710.patch 2024-08-23 17:18:09.661429899 +0100 @@ -1 +1 @@ -From 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 Mon Sep 17 00:00:00 2001 +From d6ec78819d65c1f8f54c8a891f123c6df439d249 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 ] + @@ -24 +25,0 @@ -Cc: stable@dpdk.org @@ -36 +37 @@ -index cb8d65bf0e..1aca379558 100644 +index 434b0b53b7..7d18ead520 100644 @@ -39 +40 @@ -@@ -721,4 +721,5 @@ Jun Qiu +@@ -686,4 +686,5 @@ Jun Qiu @@ -46 +47 @@ -index 801cc95607..c38515a758 100644 +index d829467f41..8571d1419d 100644 @@ -49 +50 @@ -@@ -3863,6 +3863,10 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -3758,6 +3758,10 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -62 +63 @@ -index 155f24377b..dc466ae371 100644 +index 8a277dfe31..20215a8e1e 100644