From patchwork Fri Jun 2 01:42:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhichao Zeng X-Patchwork-Id: 127939 X-Patchwork-Delegate: qi.z.zhang@intel.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 99B7F42C09; Fri, 2 Jun 2023 03:37:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B1304161A; Fri, 2 Jun 2023 03:37:11 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 80B70410D0; Fri, 2 Jun 2023 03:37:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685669829; x=1717205829; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ObsKfy1RaF2SdTFnmst906dGL3vG+JfzzJ+nxlFnoQE=; b=YLA3hP5hfQWho0lLn+P2LSVBCMP1x6L8SdV7ci8yAc4VnbN/g+1yyLA3 jjdlirrvEO+NJO7pNfDKntb5ngFUSkc3ULIFZSswHXRNQ8gmO6UE1/fyZ /fuFIa0sqtGZ+aG4hcAADoerYOtre6PL4NAKeR6cTt7nvNpEdISF3Dc8f iDRsPoUM99xf1FRG8CdENkXYmWMDQVgAYgTjZ0ElbHlkDkvClMFnrr/3r Cl20FM5q0+DOt4NFDNfeseVQ9zOAW5dGOWLPtX1ISofkkEt6m7vLKCviq ejtfBFvYuF9UGjKkNnSHnMxuFnVyJpSPDb0MDuGfjOeKfSXYCmZOKm/6P g==; X-IronPort-AV: E=McAfee;i="6600,9927,10728"; a="335352638" X-IronPort-AV: E=Sophos;i="6.00,211,1681196400"; d="scan'208";a="335352638" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2023 18:37:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10728"; a="797403500" X-IronPort-AV: E=Sophos;i="6.00,211,1681196400"; d="scan'208";a="797403500" Received: from unknown (HELO zhichao-dpdk..) ([10.239.252.103]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Jun 2023 18:37:06 -0700 From: Zhichao Zeng To: dev@dpdk.org Cc: stable@dpdk.org, qi.z.zhang@intel.com, zhijun.tang@intel.com, Zhichao Zeng , Qiming Yang , Beilei Xing Subject: [PATCH] net/ice: fix outer UDP checksum offload Date: Fri, 2 Jun 2023 09:42:53 +0800 Message-Id: <20230602014253.2347419-1-zhichaox.zeng@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Currently, when dealing with UDP tunnel pkts checksum offloading, the outer-udp checksum will be offloaded by default. So the 'csum set outer-udp hw/sw' command does not work. This patch fixes judgment of the EIPT flag and enables the 'csum set outer-udp hw/sw' command by adding judgment for the outer-udp checksum offload flag. Fixes: bd70c451532c ("net/ice: support Tx checksum offload for tunnel") Cc: stable@dpdk.org Signed-off-by: Zhichao Zeng Acked-by: Qi Zhang --- drivers/net/ice/ice_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_rxtx.c b/drivers/net/ice/ice_rxtx.c index 7b6784b177..665ae32c13 100644 --- a/drivers/net/ice/ice_rxtx.c +++ b/drivers/net/ice/ice_rxtx.c @@ -2734,7 +2734,8 @@ ice_parse_tunneling_params(uint64_t ol_flags, * Shall be set only if L4TUNT = 01b and EIPT is not zero */ if (!(*cd_tunneling & ICE_TX_CTX_EIPT_NONE) && - (*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING)) + (*cd_tunneling & ICE_TXD_CTX_UDP_TUNNELING) && + (ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM)) *cd_tunneling |= ICE_TXD_CTX_QW0_L4T_CS_M; }