From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id CB5031B1B1 for ; Tue, 9 Jan 2018 16:00:17 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from xuemingl@mellanox.com) with ESMTPS (AES256-SHA encrypted); 9 Jan 2018 17:00:11 +0200 Received: from dev-r630-06.mtbc.labs.mlnx (dev-r630-06.mtbc.labs.mlnx [10.12.205.180]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w09F07Pj017506; Tue, 9 Jan 2018 17:00:11 +0200 Received: from dev-r630-06.mtbc.labs.mlnx (localhost [127.0.0.1]) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7) with ESMTP id w09EBfKN146314; Tue, 9 Jan 2018 22:11:41 +0800 Received: (from xuemingl@localhost) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id w09EBfAk146313; Tue, 9 Jan 2018 22:11:41 +0800 From: Xueming Li To: Olivier MATZ , Thomas Monjalon , Jingjing Wu , Yongseok Koh Cc: Xueming Li , Shahaf Shuler , dev@dpdk.org Date: Tue, 9 Jan 2018 22:11:09 +0800 Message-Id: <20180109141110.146250-6-xuemingl@mellanox.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20180109141110.146250-1-xuemingl@mellanox.com> References: <20180109141110.146250-1-xuemingl@mellanox.com> Subject: [dpdk-dev] [PATCH 5/6] net/mlx5: support TX common tunnel offloads X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jan 2018 15:00:18 -0000 Support new TX common offloads DEV_TX_OFFLOAD_COMMON_TNL including common tunnel chksum and common tunnel tso. Signed-off-by: Xueming Li --- drivers/net/mlx5/mlx5_ethdev.c | 3 ++- drivers/net/mlx5/mlx5_txq.c | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index adaa34fff..80d984312 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -1400,7 +1400,8 @@ priv_select_tx_function(struct priv *priv, struct rte_eth_dev *dev) uint64_t tx_offloads = dev->data->dev_conf.txmode.offloads; int tso = !!(tx_offloads & (DEV_TX_OFFLOAD_TCP_TSO | DEV_TX_OFFLOAD_VXLAN_TNL_TSO | - DEV_TX_OFFLOAD_GRE_TNL_TSO)); + DEV_TX_OFFLOAD_GRE_TNL_TSO | + DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO)); int vlan_insert = !!(tx_offloads & DEV_TX_OFFLOAD_VLAN_INSERT); assert(priv != NULL); diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index 0e8498161..f4a75b41c 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -143,6 +143,8 @@ mlx5_priv_get_tx_port_offloads(struct priv *priv) if (config->tso) offloads |= (DEV_TX_OFFLOAD_VXLAN_TNL_TSO | DEV_TX_OFFLOAD_GRE_TNL_TSO); + if (config->swp) + offloads |= DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO; } return offloads; } @@ -729,7 +731,8 @@ txq_set_params(struct mlx5_txq_ctrl *txq_ctrl) txq_ctrl->txq.tso_en = 1; } txq_ctrl->txq.tunnel_en = config->tunnel_en; - txq_ctrl->txq.swp_en = config->swp; + txq_ctrl->txq.swp_en = (DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO & + txq_ctrl->txq.offloads) && config->swp; } /** -- 2.13.3