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 33D8DA0542 for ; Wed, 10 Aug 2022 12:05:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 28518415D7; Wed, 10 Aug 2022 12:05:30 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 637534067C; Wed, 10 Aug 2022 12:05:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1660125927; x=1691661927; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Ab0YmIIwSw1JaK3fvOhjxUTLv7Vk+2VN6JUTGMMl3U4=; b=bCCYOPNaGZRFgFwIZ7IjPpI3dI8Vut9nR6gcPuJMR5Ovl4salvtkjXvM 711EluEqiSixB4Ts2Z3wBkYeyqbnKQtz53lD2JZNnQvKAF0hI0amoeDCl fcENr0nthNb1Q/aS2clOj3XVB6V+4xPYKEV1Z43+3nRtkvE65qqIw3RyT JBNht9SIxQ9+oaIMkmPPiq+AzO00KY/12Us/bulyNzW3nwtwLDE4tsKVn QSFy8qmYEh9mRQDgljkbOmBwvdQ4c0RNlXBNWaXAHaIeI1UBDSXgwbcAC eBb6285w1SiZAo1pgWS+pUnMEBev1oOnoMbxUU/Awpd1qmHFW/r487IK+ A==; X-IronPort-AV: E=McAfee;i="6400,9594,10434"; a="271431257" X-IronPort-AV: E=Sophos;i="5.93,227,1654585200"; d="scan'208";a="271431257" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 03:05:26 -0700 X-IronPort-AV: E=Sophos;i="5.93,227,1654585200"; d="scan'208";a="664831603" Received: from unknown (HELO localhost.localdomain) ([10.239.252.104]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Aug 2022 03:05:25 -0700 From: Ke Zhang To: jingjing.wu@intel.com, beilei.xing@intel.com, dev@dpdk.org Cc: Ke Zhang , stable@dpdk.org Subject: [PATCH v2] net/iavf: fix Tx L3 checksum offload flag Date: Wed, 10 Aug 2022 17:57:07 +0800 Message-Id: <20220810095707.20865-1-ke1x.zhang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220804073300.402973-1-ke1x.zhang@intel.com> References: <20220804073300.402973-1-ke1x.zhang@intel.com> 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 When ol_flag is only RTE_MBUF_F_TX_IPV4, the Tx L3 checksum offload is still configured to IIPT in the command field of Tx data descriptor. This patch is to fix the issue to make the Tx L3 checksum offload flags and Tx data descriptor consistent. Fixes: 1e728b01120c ("net/iavf: rework Tx path") Cc: stable@dpdk.org Signed-off-by: Ke Zhang --- v2: Update the commit log --- --- drivers/net/iavf/iavf_rxtx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 109ba756f8..dfd021889e 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2538,9 +2538,11 @@ iavf_build_data_desc_cmd_offset_fields(volatile uint64_t *qw1, offset |= (m->l2_len >> 1) << IAVF_TX_DESC_LENGTH_MACLEN_SHIFT; /* Enable L3 checksum offloading inner */ - if (m->ol_flags & (RTE_MBUF_F_TX_IP_CKSUM | RTE_MBUF_F_TX_IPV4)) { - command |= IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM; - offset |= (m->l3_len >> 2) << IAVF_TX_DESC_LENGTH_IPLEN_SHIFT; + if (m->ol_flags & RTE_MBUF_F_TX_IP_CKSUM) { + if (m->ol_flags & RTE_MBUF_F_TX_IPV4) { + command |= IAVF_TX_DESC_CMD_IIPT_IPV4_CSUM; + offset |= (m->l3_len >> 2) << IAVF_TX_DESC_LENGTH_IPLEN_SHIFT; + } } else if (m->ol_flags & RTE_MBUF_F_TX_IPV4) { command |= IAVF_TX_DESC_CMD_IIPT_IPV4; offset |= (m->l3_len >> 2) << IAVF_TX_DESC_LENGTH_IPLEN_SHIFT; -- 2.25.1