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 9E45BA0A02; Fri, 15 Jan 2021 05:42:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 82A63140E4B; Fri, 15 Jan 2021 05:42:10 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 3D5A0140E0D for ; Fri, 15 Jan 2021 05:42:09 +0100 (CET) IronPort-SDR: 9Ya+yOp50zAy0JOQUwnJqxMKkjyI0pKYQbBBSNW/2pJjgJxUM5YtYHE8va2QWRpfFqbFJd1q01 6NyeRSMF+HsQ== X-IronPort-AV: E=McAfee;i="6000,8403,9864"; a="263288176" X-IronPort-AV: E=Sophos;i="5.79,348,1602572400"; d="scan'208";a="263288176" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jan 2021 20:42:04 -0800 IronPort-SDR: KJ7XeQL8aqruw/HSYX//wzB/zfNFPbFB1ltiQXVs8HlQLn1FVpiqEDXrv5x5uxyFmM0sCaxOaq 3a1ELMPM4wsg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,348,1602572400"; d="scan'208";a="465461500" Received: from npg-dpdk-cvl-jeffguo-01.sh.intel.com ([10.67.111.128]) by fmsmga001.fm.intel.com with ESMTP; 14 Jan 2021 20:42:00 -0800 From: Jeff Guo To: qi.z.zhang@intel.com, thomas@monjalon.net, ferruh.yigit@intel.com, andrew.rybchenko@oktetlabs.ru, bernard.iremonger@intel.com, wenzhuo.lu@intel.com, beilei.xing@intel.com Cc: jingjing.wu@intel.com, qiming.yang@intel.com, haiyue.wang@intel.com, dev@dpdk.org, jia.guo@intel.com, simei.su@intel.com, orika@nvidia.com, getelson@nvidia.com, maxime.coquelin@redhat.com, jerinj@marvell.com, ajit.khaparde@broadcom.com, bingz@nvidia.com, ray.kinsella@intel.com, dodji@redhat.com, david.marchand@redhat.com Date: Fri, 15 Jan 2021 12:35:02 +0800 Message-Id: <20210115043502.98386-3-jia.guo@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210115043502.98386-1-jia.guo@intel.com> References: <20201216085854.7842-1-jia.guo@intel.com> <20210115043502.98386-1-jia.guo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [dpdk-dev v4 2/2] app/testpmd: add new UDP tunnel port for eCPRI 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 Sender: "dev" Add new UDP tunnel port params for eCPRI configuration, the command as below: testpmd> port config 0 udp_tunnel_port add ecpri 6789 testpmd> port config 0 udp_tunnel_port rm ecpri 6789 Signed-off-by: Jeff Guo --- app/test-pmd/cmdline.c | 9 ++++++--- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 2ccbaa039e..596dd239fe 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -845,7 +845,7 @@ static void cmd_help_long_parsed(void *parsed_result, "fdir_inset|fdir_flx_inset clear all" " Clear RSS|FDIR|FDIR_FLX input set completely for some pctype\n\n" - "port config (port_id) udp_tunnel_port add|rm vxlan|geneve (udp_port)\n\n" + "port config (port_id) udp_tunnel_port add|rm vxlan|geneve|ecpri (udp_port)\n\n" " Add/remove UDP tunnel port for tunneling offload\n\n" "port config rx_offload vlan_strip|" @@ -9175,6 +9175,8 @@ cmd_cfg_tunnel_udp_port_parsed(void *parsed_result, tunnel_udp.prot_type = RTE_TUNNEL_TYPE_GENEVE; } else if (!strcmp(res->tunnel_type, "vxlan-gpe")) { tunnel_udp.prot_type = RTE_TUNNEL_TYPE_VXLAN_GPE; + } else if (!strcmp(res->tunnel_type, "ecpri")) { + tunnel_udp.prot_type = RTE_TUNNEL_TYPE_ECPRI; } else { printf("Invalid tunnel type\n"); return; @@ -9209,7 +9211,7 @@ cmdline_parse_token_string_t cmd_config_tunnel_udp_port_action = "add#rm"); cmdline_parse_token_string_t cmd_config_tunnel_udp_port_tunnel_type = TOKEN_STRING_INITIALIZER(struct cmd_config_tunnel_udp_port, tunnel_type, - "vxlan#geneve#vxlan-gpe"); + "vxlan#geneve#vxlan-gpe#ecpri"); cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value = TOKEN_NUM_INITIALIZER(struct cmd_config_tunnel_udp_port, udp_port, RTE_UINT16); @@ -9217,7 +9219,8 @@ cmdline_parse_token_num_t cmd_config_tunnel_udp_port_value = cmdline_parse_inst_t cmd_cfg_tunnel_udp_port = { .f = cmd_cfg_tunnel_udp_port_parsed, .data = NULL, - .help_str = "port config udp_tunnel_port add|rm vxlan|geneve|vxlan-gpe ", + .help_str = "port config udp_tunnel_port add|rm vxlan|" + "geneve|vxlan-gpe|ecpri ", .tokens = { (void *)&cmd_config_tunnel_udp_port_port, (void *)&cmd_config_tunnel_udp_port_config, diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 9be450066e..842ac42ce6 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -2375,7 +2375,7 @@ port config udp_tunnel_port Add/remove UDP tunnel port for VXLAN/GENEVE tunneling protocols:: - testpmd> port config (port_id) udp_tunnel_port add|rm vxlan|geneve|vxlan-gpe (udp_port) + testpmd> port config (port_id) udp_tunnel_port add|rm vxlan|geneve|vxlan-gpe|ecpri (udp_port) port config tx_metadata ~~~~~~~~~~~~~~~~~~~~~~~ -- 2.20.1