From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 7CA9241CA9;
	Thu, 16 Feb 2023 02:29:34 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 8C4D442D67;
	Thu, 16 Feb 2023 02:28:14 +0100 (CET)
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
 by mails.dpdk.org (Postfix) with ESMTP id ED92342D50
 for <dev@dpdk.org>; Thu, 16 Feb 2023 02:28:08 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
 d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
 t=1676510889; x=1708046889;
 h=from:to:cc:subject:date:message-id:in-reply-to:
 references:mime-version:content-transfer-encoding;
 bh=E6W7yIm54edHEnSBZZt+uBFnTGrrfIjeJ8XoXYegTqE=;
 b=eSBWSS+uEnArMOayJKU3olyFM9bSTbP2SCQELYPITi6usKa7QQUQhCUt
 2J9fJt5QR04hTDZ1NYb4FjE7CMx6BtgLiYSLsARt8gTuYA4DROOHbbvYH
 j6qBazDHDuJR5q/mR7yemXzRNj7WCt54F6wfbBQcf8FH1YTYp1UW+LCaK
 Arqs/EIjmi1zEvdVbX3LlTQgL/WkzQKo4+ROKd6p/f+eBD1/vL/Vgm6LL
 w2pfwlRQ+u951didncEw00ygjOHnl1aZiKdbsNgRf1CnZZaKVx2c/9Wyl
 SGxR7oK30KTFlgBAeYFie5abEjBD4uF5+V0O3C/wiw/3kKV0jAdhtR2/A g==;
X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="329315441"
X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="329315441"
Received: from fmsmga002.fm.intel.com ([10.253.24.26])
 by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 15 Feb 2023 17:28:08 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=McAfee;i="6500,9779,10622"; a="779166288"
X-IronPort-AV: E=Sophos;i="5.97,301,1669104000"; d="scan'208";a="779166288"
Received: from dpdk-mingxial-01.sh.intel.com ([10.67.119.167])
 by fmsmga002.fm.intel.com with ESMTP; 15 Feb 2023 17:28:07 -0800
From: Mingxia Liu <mingxia.liu@intel.com>
To: dev@dpdk.org,
	beilei.xing@intel.com,
	yuying.zhang@intel.com
Cc: Mingxia Liu <mingxia.liu@intel.com>
Subject: [PATCH v7 14/21] net/cpfl: support Tx offloading
Date: Thu, 16 Feb 2023 00:30:03 +0000
Message-Id: <20230216003010.3439881-15-mingxia.liu@intel.com>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20230216003010.3439881-1-mingxia.liu@intel.com>
References: <20230213021956.2953088-1-mingxia.liu@intel.com>
 <20230216003010.3439881-1-mingxia.liu@intel.com>
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 <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

Add Tx offloading support:
 - support TSO for single queue model and split queue model.

Signed-off-by: Mingxia Liu <mingxia.liu@intel.com>
---
 doc/guides/nics/features/cpfl.ini | 1 +
 drivers/net/cpfl/cpfl_ethdev.c    | 8 +++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/doc/guides/nics/features/cpfl.ini b/doc/guides/nics/features/cpfl.ini
index ee5948f444..f4e45c7c68 100644
--- a/doc/guides/nics/features/cpfl.ini
+++ b/doc/guides/nics/features/cpfl.ini
@@ -8,6 +8,7 @@
 ;
 [Features]
 MTU update           = Y
+TSO                  = P
 L3 checksum offload  = P
 L4 checksum offload  = P
 Linux                = Y
diff --git a/drivers/net/cpfl/cpfl_ethdev.c b/drivers/net/cpfl/cpfl_ethdev.c
index d0f90b7d2c..fda945d34b 100644
--- a/drivers/net/cpfl/cpfl_ethdev.c
+++ b/drivers/net/cpfl/cpfl_ethdev.c
@@ -105,7 +105,13 @@ cpfl_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		RTE_ETH_RX_OFFLOAD_TCP_CKSUM            |
 		RTE_ETH_RX_OFFLOAD_OUTER_IPV4_CKSUM;
 
-	dev_info->tx_offload_capa = RTE_ETH_TX_OFFLOAD_MULTI_SEGS;
+	dev_info->tx_offload_capa =
+		RTE_ETH_TX_OFFLOAD_IPV4_CKSUM		|
+		RTE_ETH_TX_OFFLOAD_UDP_CKSUM		|
+		RTE_ETH_TX_OFFLOAD_TCP_CKSUM		|
+		RTE_ETH_TX_OFFLOAD_SCTP_CKSUM		|
+		RTE_ETH_TX_OFFLOAD_TCP_TSO		|
+		RTE_ETH_TX_OFFLOAD_MULTI_SEGS;
 
 	dev_info->default_txconf = (struct rte_eth_txconf) {
 		.tx_free_thresh = CPFL_DEFAULT_TX_FREE_THRESH,
-- 
2.25.1