From patchwork Fri Nov 18 07:03:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhichao Zeng X-Patchwork-Id: 119949 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 88FFBA0542; Fri, 18 Nov 2022 08:00:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5E5154067B; Fri, 18 Nov 2022 08:00:41 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id DAC0A4021F for ; Fri, 18 Nov 2022 08:00:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668754840; x=1700290840; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=vCDNwJtG9W9zQJyAExMTOhBGK9EPQ6koOLk1XO2rVQU=; b=GJnCPle6R1Qao3Az/1RhETGkF+akATia8VZC67Zztu7ToXIjphCff1fr gg8XaQwCB7PDBAqm0SfRk5xMYPFPhNhuF8q6LbU+qUFPubjdNmjgpOY0W 8z5UPsIIyd59UtjKHv5JOeupUj9r2tqtwMdAyp/Z1HEomg2CnJO+1yiTd P1xfxRq8mobtYX3+OdVpCMLfv95HbTajLB+O3x9ptCYwcxhc2geyMMqXY 4fMeXyGwDrcycOX7jmRmHS0A1gj/pFeDnKZSID9+MUdZjMP+keUWkEwhl kuNQZzqHJNaSfKzm6yH4254yG9j38+LtYpBG1781G1rHeYX98P438Nhzh A==; X-IronPort-AV: E=McAfee;i="6500,9779,10534"; a="399358780" X-IronPort-AV: E=Sophos;i="5.96,173,1665471600"; d="scan'208";a="399358780" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2022 23:00:39 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10534"; a="703635995" X-IronPort-AV: E=Sophos;i="5.96,173,1665471600"; d="scan'208";a="703635995" Received: from unknown (HELO localhost.localdomain) ([10.239.252.103]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2022 23:00:36 -0800 From: Zhichao Zeng To: dev@dpdk.org Cc: qi.z.zhang@intel.com, yidingx.zhou@intel.com, Zhichao Zeng , Jingjing Wu , Beilei Xing , Peng Zhang Subject: [PATCH] net/iavf: fix outer udp checksum offload Date: Fri, 18 Nov 2022 15:03:15 +0800 Message-Id: <20221118070316.198683-1-zhichaox.zeng@intel.com> X-Mailer: git-send-email 2.25.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 enables the 'csum set outer-udp hw/sw' command by adding judgment on the outer-udp chekcusm offload flag. Fixes: f7c8c36fdeb7 ("net/iavf: enable inner and outer Tx checksum offload") Signed-off-by: Zhichao Zeng Tested-by: Ke Xu --- drivers/net/iavf/iavf_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index cf87a6beda..c12fb96cfd 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2454,7 +2454,8 @@ iavf_fill_ctx_desc_tunnelling_field(volatile uint64_t *qw0, * Shall be set only if L4TUNT = 01b and EIPT is not zero */ if (!(eip_typ & IAVF_TX_CTX_EXT_IP_NONE) && - (eip_typ & IAVF_TXD_CTX_UDP_TUNNELING)) + (eip_typ & IAVF_TXD_CTX_UDP_TUNNELING) && + (m->ol_flags & RTE_MBUF_F_TX_OUTER_UDP_CKSUM)) eip_typ |= IAVF_TXD_CTX_QW0_L4T_CS_MASK; }