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 6147DA00C3 for ; Wed, 8 Dec 2021 03:32:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FDDA410E8; Wed, 8 Dec 2021 03:32:27 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 8595B410E8 for ; Wed, 8 Dec 2021 03:32:26 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10191"; a="235254315" X-IronPort-AV: E=Sophos;i="5.87,296,1631602800"; d="scan'208";a="235254315" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2021 18:32:25 -0800 X-IronPort-AV: E=Sophos;i="5.87,296,1631602800"; d="scan'208";a="515582286" Received: from unknown (HELO intel-cd-odc-gavin.cd.intel.com) ([10.240.178.183]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2021 18:32:23 -0800 From: Jie Wang To: stable@dpdk.org Cc: Jie Wang , Beilei Xing Subject: [PATCH 19.11] net/i40e: fix forward outer IPv6 VXLAN Date: Wed, 8 Dec 2021 18:28:31 +0800 Message-Id: <20211208102831.204356-1-jie1x.wang@intel.com> X-Mailer: git-send-email 2.25.1 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 [ upstream commit 8cc79a1636cda2e9d6ba4cfd1cf16cf2a782ae1b ] Testpmd forwards packets in checksum mode that it need to calculate the checksum of each layer's protocol. Then it will fill flags and header length into mbuf. In process_outer_cksums, HW calculates the outer checksum if tx_offloads contains outer UDP checksum otherwise SW calculates the outer checksum. When tx_offloads contains outer UDP checksum or outer IPv4 checksum, mbuf will be filled with correct header length. This patch added outer UDP checksum in tx_offload_capa and I40E_TX_OFFLOAD_MASK, when we set csum hw outer-udp on that the engine can forward outer IPv6 VXLAN packets. Fixes: 7497d3e2f777 ("net/i40e: convert to new Tx offloads API") Signed-off-by: Jie Wang Acked-by: Beilei Xing --- drivers/net/i40e/i40e_ethdev.c | 1 + drivers/net/i40e/i40e_rxtx.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 508f90595f..b05cb52b22 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -3714,6 +3714,7 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) DEV_TX_OFFLOAD_IPIP_TNL_TSO | DEV_TX_OFFLOAD_GENEVE_TNL_TSO | DEV_TX_OFFLOAD_MULTI_SEGS | + DEV_TX_OFFLOAD_OUTER_UDP_CKSUM | dev_info->tx_queue_offload_capa; 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 6cba729639..f6868e2ccf 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -66,6 +66,7 @@ PKT_TX_QINQ_PKT | \ PKT_TX_VLAN_PKT | \ PKT_TX_TUNNEL_MASK | \ + PKT_TX_OUTER_UDP_CKSUM | \ I40E_TX_IEEE1588_TMST) #define I40E_TX_OFFLOAD_NOTSUP_MASK \ -- 2.25.1