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 6B453A0C4B; Mon, 22 Nov 2021 16:47:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 428894014E; Mon, 22 Nov 2021 16:47:49 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 7FFD04003C for ; Mon, 22 Nov 2021 16:47:48 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10175"; a="214837676" X-IronPort-AV: E=Sophos;i="5.87,255,1631602800"; d="scan'208";a="214837676" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Nov 2021 07:47:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,255,1631602800"; d="scan'208";a="496908183" Received: from silpixa00400884.ir.intel.com ([10.243.22.82]) by orsmga007.jf.intel.com with ESMTP; 22 Nov 2021 07:47:44 -0800 From: Radu Nicolau To: Jingjing Wu , Beilei Xing Cc: dev@dpdk.org, qi.z.zhang@intel.com, Radu Nicolau Subject: [PATCH] net/iavf: fix segmentation offload condition Date: Mon, 22 Nov 2021 15:30:00 +0000 Message-Id: <20211122153001.332492-1-radu.nicolau@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 Apply segmentation offload when requested for non tunneled packets e.g. IPsec transport mode. Fixes: 1e728b01120c ("net/iavf: rework Tx path") Signed-off-by: Radu Nicolau --- drivers/net/iavf/iavf_rxtx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 154472c50f..98448db799 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2428,10 +2428,9 @@ iavf_fill_data_desc(volatile struct iavf_tx_desc *desc, desc->buffer_addr = rte_mbuf_data_iova(m); /* calculate data buffer size less set header lengths */ - if ((m->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) && - (m->ol_flags & (RTE_MBUF_F_TX_TCP_SEG | - RTE_MBUF_F_TX_UDP_SEG))) { - hdrlen += m->outer_l3_len; + if (m->ol_flags & (RTE_MBUF_F_TX_TCP_SEG | RTE_MBUF_F_TX_UDP_SEG)) { + if (m->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) + hdrlen += m->outer_l3_len; if (m->ol_flags & RTE_MBUF_F_TX_L4_MASK) hdrlen += m->l3_len + m->l4_len; else -- 2.25.1