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 1D465A84F for ; Mon, 5 Mar 2018 15:52:17 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from xuemingl@mellanox.com) with ESMTPS (AES256-SHA encrypted); 5 Mar 2018 16:52:38 +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 w25EqAXc023041; Mon, 5 Mar 2018 16:52: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 w25EqA5w071934; Mon, 5 Mar 2018 22:52:10 +0800 Received: (from xuemingl@localhost) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id w25EqART071933; Mon, 5 Mar 2018 22:52:10 +0800 From: Xueming Li To: Wenzhuo Lu , Jingjing Wu , Thomas Monjalon , Yongseok Koh , Olivier MATZ , Shahaf Shuler Cc: Xueming Li , Ferruh Yigit , dev@dpdk.org Date: Mon, 5 Mar 2018 22:51:16 +0800 Message-Id: <20180305145121.71866-3-xuemingl@mellanox.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20180305145121.71866-1-xuemingl@mellanox.com> References: <20180305145121.71866-1-xuemingl@mellanox.com> In-Reply-To: <20180109141110.146250-2-xuemingl@mellanox.com> References: <20180109141110.146250-2-xuemingl@mellanox.com> Subject: [dpdk-dev] [PATCH v3 2/7] 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, 05 Mar 2018 14:52:17 -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 | 18 ++++++++++++++++++ app/test-pmd/csumonly.c | 3 ++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index d1dc1de6c..4f2b31357 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -4013,6 +4013,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_TSO)) + printf("Warning: Generic TUNNEL TSO not supported therefore " + "not enabled for port %d\n", port_id); return dev_info; } @@ -4040,13 +4043,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_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_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 4bb255c62..0e5d1b5f5 100644 --- a/app/test-pmd/config.c +++ b/app/test-pmd/config.c @@ -668,6 +668,15 @@ port_offload_cap_display(portid_t port_id) printf("off\n"); } + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM) { + printf("Generic tunnel checksum: "); + if (ports[port_id].dev_conf.txmode.offloads & + DEV_TX_OFFLOAD_GENERIC_TNL_CKSUM) + printf("on\n"); + else + printf("off\n"); + } + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_TCP_TSO) { printf("TX TCP segmentation: "); if (ports[port_id].dev_conf.txmode.offloads & @@ -722,6 +731,15 @@ port_offload_cap_display(portid_t port_id) printf("off\n"); } + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_GENERIC_TNL_TSO) { + printf("Generic tunnel TSO: "); + if (ports[port_id].dev_conf.txmode.offloads & + DEV_TX_OFFLOAD_GENERIC_TNL_TSO) + printf("on\n"); + else + printf("off\n"); + } + } int diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c index 5f5ab64aa..7b2309372 100644 --- a/app/test-pmd/csumonly.c +++ b/app/test-pmd/csumonly.c @@ -693,7 +693,8 @@ pkt_burst_checksum_forward(struct fwd_stream *fs) info.l3_len); parse_vxlan(udp_hdr, &info, m->packet_type); if (info.is_tunnel) - tx_ol_flags |= PKT_TX_TUNNEL_VXLAN; + tx_ol_flags |= (PKT_TX_TUNNEL_VXLAN | + PKT_TX_OUTER_UDP); } else if (info.l4_proto == IPPROTO_GRE) { struct simple_gre_hdr *gre_hdr; -- 2.13.3