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 10C8EA0542; Thu, 4 Aug 2022 09:41:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BB2164069C; Thu, 4 Aug 2022 09:41:57 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 8B8244068E; Thu, 4 Aug 2022 09:41:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659598916; x=1691134916; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=UJfCjwQbTRdpEnlmfJ3ziYGWKTpr52OZydotIqUpdXc=; b=LQP8lM5oUN/XinKZWELOd8BuXTG6KRClqKfUkPOA+6lqDkmmip07pyTr 19hzp1w+5MfvJ3Tbpbytxs5a4ALlONPuBQaFNe8VxQZdGZND2XaVJ0cMe KegsvInb1aAV87LDxlofEXHMw/DrgOCQEEaX3+uk9uCk8fAOcslW4SKrN tPhE0x5pw2myTdmMUf5PEtu8IFaKoOqHqdO6ojcu97mtBpRD1q5SnF85j 3Y2Nm5LTzUznNz0zgdIp9qs8Z/FI/WfAZJ+UJb6xbuguA/CVLrQxICSuP XYEZpL391fTUUcHX3oE4jicFxQ95mEaQj1iaTp7V3RPJR96TN+h/G4t5U A==; X-IronPort-AV: E=McAfee;i="6400,9594,10428"; a="269638815" X-IronPort-AV: E=Sophos;i="5.93,215,1654585200"; d="scan'208";a="269638815" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2022 00:41:54 -0700 X-IronPort-AV: E=Sophos;i="5.93,215,1654585200"; d="scan'208";a="662422561" Received: from unknown (HELO localhost.localdomain) ([10.239.252.104]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Aug 2022 00:41:52 -0700 From: Ke Zhang To: xiaoyun.li@intel.com, jingjing.wu@intel.com, beilei.xing@intel.com, dev@dpdk.org Cc: Ke Zhang , stable@dpdk.org Subject: [PATCH] net/iavf: fix Tx path Date: Thu, 4 Aug 2022 15:33:00 +0800 Message-Id: <20220804073300.402973-1-ke1x.zhang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Fix the Tx path and Tx descriptor usage in order to make the Tx offload flags and Tx data descriptor consistent. Fixes: 1e728b01120c ("net/iavf: rework Tx path") Cc: stable@dpdk.org Signed-off-by: Ke Zhang --- 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