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 431541B376 for ; Mon, 29 Jan 2018 16:11:16 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from xuemingl@mellanox.com) with ESMTPS (AES256-SHA encrypted); 29 Jan 2018 17:11: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 w0TFB840001308; Mon, 29 Jan 2018 17:11:10 +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 w0TF9WP3071636; Mon, 29 Jan 2018 23:09:32 +0800 Received: (from xuemingl@localhost) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id w0TF9WSo071635; Mon, 29 Jan 2018 23:09:32 +0800 From: Xueming Li To: Olivier MATZ Cc: Xueming Li , dev@dpdk.org, Jingjing Wu , Shahaf Shuler , Yongseok Koh , Thomas Monjalon , Ferruh Yigit Date: Mon, 29 Jan 2018 23:08:56 +0800 Message-Id: <20180129150859.71573-2-xuemingl@mellanox.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20180129150859.71573-1-xuemingl@mellanox.com> References: <20180129150859.71573-1-xuemingl@mellanox.com> In-Reply-To: <20180109141110.146250-2-xuemingl@mellanox.com> References: <20180109141110.146250-2-xuemingl@mellanox.com> Subject: [dpdk-dev] [PATCH v2 2/5] app/testpmd: testpmd support Tx generic 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: Mon, 29 Jan 2018 15:11:16 -0000 "show port cap" and "csum parse tunnel" command support TX generic tunnel offloads Signed-off-by: Xueming Li --- app/test-pmd/cmdline.c | 9 +++++++-- app/test-pmd/config.c | 9 +++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 9f12c0fd2..b43ce5b2f 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -3990,6 +3990,9 @@ check_tunnel_tso_nic_support(portid_t port_id) if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GENEVE_TNL_TSO)) printf("Warning: GENEVE TUNNEL TSO not supported therefore " "not enabled for port %d\n", port_id); + if (!(dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO)) + printf("Warning: Generic TUNNEL TSO not supported therefore " + "not enabled for port %d\n", port_id); return dev_info; } @@ -4017,13 +4020,15 @@ cmd_tunnel_tso_set_parsed(void *parsed_result, ~(DEV_TX_OFFLOAD_VXLAN_TNL_TSO | DEV_TX_OFFLOAD_GRE_TNL_TSO | DEV_TX_OFFLOAD_IPIP_TNL_TSO | - DEV_TX_OFFLOAD_GENEVE_TNL_TSO); + DEV_TX_OFFLOAD_GENEVE_TNL_TSO | + DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO); printf("TSO for tunneled packets is disabled\n"); } else { uint64_t tso_offloads = (DEV_TX_OFFLOAD_VXLAN_TNL_TSO | DEV_TX_OFFLOAD_GRE_TNL_TSO | DEV_TX_OFFLOAD_IPIP_TNL_TSO | - DEV_TX_OFFLOAD_GENEVE_TNL_TSO); + DEV_TX_OFFLOAD_GENEVE_TNL_TSO | + DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO); ports[res->port_id].dev_conf.txmode.offloads |= (tso_offloads & dev_info.tx_offload_capa); diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index 957b82098..3bf20ee11 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -751,6 +751,15 @@ port_offload_cap_display(portid_t port_id) printf("off\n"); } + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO) { + printf("TX Generic tunnel TSO and checksum: "); + if (ports[port_id].dev_conf.txmode.offloads & + DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM_TSO) + printf("on\n"); + else + printf("off\n"); + } + } int -- 2.13.3