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 2FB00454E9 for ; Tue, 25 Jun 2024 02:01:17 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2B8C0410DC; Tue, 25 Jun 2024 02:01:17 +0200 (CEST) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mails.dpdk.org (Postfix) with ESMTP id 753BC40EDD for ; Tue, 25 Jun 2024 02:01:15 +0200 (CEST) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-42172ed3487so37422415e9.0 for ; Mon, 24 Jun 2024 17:01:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719273675; x=1719878475; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=i7K2BjYTRdPvEIojBCl8M4B66YHMpyQA0IXYs7YGVq8=; b=MHXDqXnIncwRdlpC4ytbRZEJgUo2dOGmrrYzxp+khii80eFhNTprsvvcbtxB3toRU4 1R0pWi+r2lfPEqOcTb3XEJUxHkypv9pHK773s1HUK2niUB0bckUcZfoSsPmKznqEZdwU lGRnAdxIVYUog2/3lF3/H30Z0ADV8Elwzpl2ynMW+0vko//dMmOBtxe9bddDp58mAB3R F8/dxwCOHKWY/9PC1gt0l8j9Um7wwkgDGKF1nIa4zUlkZUw80NMgSpjuza98XTnvQj1U JVD8Dztt3hiv2QLVyr9Nj4lTGscBZ+AnTC1BMZkItjtUbVokk0irsFSQL3mLe/btbzCX z8/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719273675; x=1719878475; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i7K2BjYTRdPvEIojBCl8M4B66YHMpyQA0IXYs7YGVq8=; b=m91X/Z8BwilQR+YPrW4LVN8BhrQ3i8k3dQ+AEGF90NISUMuYS6LYq7/Bqsj0ZzYnAh cDVenCqtvyU0ORsiQM0+8b2JNdcKA9fw5sFpNdc7mSmyiFUyE8Qr9ijeSJeLv/ZQ+Huk E/OWIMorzPNGsPAAsTiEugJYQK044q4HKR2b7T7I5XkXjY/0SWwjiRoT0s4CHQ7JfTZE wdALKlQ0BX7DITNPu6odI47KOlT/8MINr9reD+wEvvS0zSQJXNyJTuB6gLMNHCa0dIsE SHZ2uxqRvpZeLaacEZHniXbnD+f21QlrA8Dv4u5EfGcAPpQl4bJrT0Nt0Sr3YeRypR5M uxNg== X-Forwarded-Encrypted: i=1; AJvYcCWoOlEkjO2a2HiwUabcGoeJc/qY1PPIca9BGsopH7woX3q9p2ZdAZ2PAwUoKKXlAI3OgeYJiZ0E8N1nhZ8cA4w= X-Gm-Message-State: AOJu0YwCZWtg+9oNKwF550RJoqUK4mBkJlyOMUWUcat+d3GW+6oZVOSK Bw9GJ5mi7Gtl1AwujuKR2ZBBkgV5fW3Xz1g1NnodF/D3Y8gQRyxH3+gzAg== X-Google-Smtp-Source: AGHT+IEqaiX/AETZSVQLLnIE7PZ32OrVmfQyImz0aAZvS7JFJQ7yATY0CqEcNOOObX9yNLgY56OGXg== X-Received: by 2002:a05:600c:4fc9:b0:424:8e5b:e71d with SMTP id 5b1f17b1804b1-4248e5be7d2mr35289745e9.28.1719273675063; Mon, 24 Jun 2024 17:01:15 -0700 (PDT) Received: from localhost ([137.220.120.171]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-366383f667dsm11217848f8f.16.2024.06.24.17.01.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Jun 2024 17:01:14 -0700 (PDT) From: luca.boccassi@gmail.com 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 22.11.6 Date: Tue, 25 Jun 2024 00:58:24 +0100 Message-Id: <20240624235907.885628-38-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240624235907.885628-1-luca.boccassi@gmail.com> References: <20240624235907.885628-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 Hi, FYI, your patch has been queued to stable release 22.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/27/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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/9d02109d19544e9834902cdf7964165e25cc75f2 Thanks. Luca Boccassi --- >From 9d02109d19544e9834902cdf7964165e25cc75f2 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 172e7f2692..8aca0a656e 100644 --- a/.mailmap +++ b/.mailmap @@ -686,6 +686,7 @@ Junjie Wan Jun Qiu Jun W Zhou Junxiao Shi +Jun Wang Jun Yang Junyu Jiang Juraj Linkeš diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 0ff334745d..2049c32c4e 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -3721,8 +3721,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO | 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 | RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP; diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index d96bbbb677..6522f2b810 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -295,6 +295,15 @@ 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; } static inline void -- 2.39.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-06-25 00:22:15.897075093 +0100 +++ 0038-net-i40e-fix-outer-UDP-checksum-offload-for-X710.patch 2024-06-25 00:22:13.153184996 +0100 @@ -1 +1 @@ -From 6b5e31f7fbd71675c8f3f6d8c0f74fd1f3a0dff5 Mon Sep 17 00:00:00 2001 +From 9d02109d19544e9834902cdf7964165e25cc75f2 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 172e7f2692..8aca0a656e 100644 @@ -39 +40 @@ -@@ -720,6 +720,7 @@ Junjie Wan +@@ -686,6 +686,7 @@ Junjie Wan @@ -48 +49 @@ -index 801cc95607..c38515a758 100644 +index 0ff334745d..2049c32c4e 100644 @@ -51 +52 @@ -@@ -3862,8 +3862,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) +@@ -3721,8 +3721,12 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) @@ -66 +67 @@ -index 155f24377b..dc466ae371 100644 +index d96bbbb677..6522f2b810 100644