From patchwork Sat Apr 1 07:57:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Xing, Beilei" X-Patchwork-Id: 23121 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 7E09C2BE9; Sat, 1 Apr 2017 09:58:21 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 9D0992B92 for ; Sat, 1 Apr 2017 09:58:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491033498; x=1522569498; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=/5ZB8yfxd222+WVeJSOsePajvHnKZuolmuPadbI8CFI=; b=CzNji6r1/Kh4D/YwewoFtyIq4lzotC02hynFDl2zptuAm3HwoILECddl Pa35phkY8cIfSV0FK1ulxeEMekzytg==; Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2017 00:58:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,256,1486454400"; d="scan'208";a="83407471" Received: from unknown (HELO dpdk9.sh.intel.com) ([10.239.129.31]) by fmsmga006.fm.intel.com with ESMTP; 01 Apr 2017 00:58:16 -0700 From: Beilei Xing To: jingjing.wu@intel.com Cc: dev@dpdk.org Date: Sat, 1 Apr 2017 15:57:07 +0800 Message-Id: <1491033428-68635-2-git-send-email-beilei.xing@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1491033428-68635-1-git-send-email-beilei.xing@intel.com> References: <1491029789-41143-1-git-send-email-beilei.xing@intel.com> <1491033428-68635-1-git-send-email-beilei.xing@intel.com> Subject: [dpdk-dev] [PATCH v2 1/2] app/testpmd: change command line of loading profile 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch changes CLI of loading profile from "add ddp (port_id) (profile_path)" to "ddp add (port_id) (profile_path)" which is more consistent with other CLIs. Signed-off-by: Beilei Xing Acked-by: Wenzhuo Lu --- app/test-pmd/cmdline.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index aac4efb..3a448b3 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -593,7 +593,7 @@ static void cmd_help_long_parsed(void *parsed_result, "E-tag set filter del e-tag-id (value) port (port_id)\n" " Delete an E-tag forwarding filter on a port\n\n" - "add ddp (port_id) (profile_path)\n" + "ddp add (port_id) (profile_path)\n" " Load a profile package on a port\n\n" , list_pkt_forwarding_modes() @@ -12746,29 +12746,29 @@ cmdline_parse_inst_t cmd_strict_link_prio = { }; /* Load dynamic device personalization*/ -struct cmd_add_ddp_result { - cmdline_fixed_string_t add; +struct cmd_ddp_add_result { cmdline_fixed_string_t ddp; + cmdline_fixed_string_t add; uint8_t port_id; char filepath[]; }; -cmdline_parse_token_string_t cmd_add_ddp_add = - TOKEN_STRING_INITIALIZER(struct cmd_add_ddp_result, add, "add"); -cmdline_parse_token_string_t cmd_add_ddp_ddp = - TOKEN_STRING_INITIALIZER(struct cmd_add_ddp_result, ddp, "ddp"); -cmdline_parse_token_num_t cmd_add_ddp_port_id = - TOKEN_NUM_INITIALIZER(struct cmd_add_ddp_result, port_id, UINT8); -cmdline_parse_token_string_t cmd_add_ddp_filepath = - TOKEN_STRING_INITIALIZER(struct cmd_add_ddp_result, filepath, NULL); +cmdline_parse_token_string_t cmd_ddp_add_ddp = + TOKEN_STRING_INITIALIZER(struct cmd_ddp_add_result, ddp, "ddp"); +cmdline_parse_token_string_t cmd_ddp_add_add = + TOKEN_STRING_INITIALIZER(struct cmd_ddp_add_result, add, "add"); +cmdline_parse_token_num_t cmd_ddp_add_port_id = + TOKEN_NUM_INITIALIZER(struct cmd_ddp_add_result, port_id, UINT8); +cmdline_parse_token_string_t cmd_ddp_add_filepath = + TOKEN_STRING_INITIALIZER(struct cmd_ddp_add_result, filepath, NULL); static void -cmd_add_ddp_parsed( +cmd_ddp_add_parsed( void *parsed_result, __attribute__((unused)) struct cmdline *cl, __attribute__((unused)) void *data) { - struct cmd_add_ddp_result *res = parsed_result; + struct cmd_ddp_add_result *res = parsed_result; uint8_t *buff; uint32_t size; int ret = -ENOTSUP; @@ -12802,15 +12802,15 @@ cmd_add_ddp_parsed( close_ddp_package_file(buff); } -cmdline_parse_inst_t cmd_add_ddp = { - .f = cmd_add_ddp_parsed, +cmdline_parse_inst_t cmd_ddp_add = { + .f = cmd_ddp_add_parsed, .data = NULL, - .help_str = "add/remove ddp ", + .help_str = "ddp add ", .tokens = { - (void *)&cmd_add_ddp_add, - (void *)&cmd_add_ddp_ddp, - (void *)&cmd_add_ddp_port_id, - (void *)&cmd_add_ddp_filepath, + (void *)&cmd_ddp_add_ddp, + (void *)&cmd_ddp_add_add, + (void *)&cmd_ddp_add_port_id, + (void *)&cmd_ddp_add_filepath, NULL, }, }; @@ -13081,7 +13081,7 @@ cmdline_parse_ctx_t main_ctx[] = { (cmdline_parse_inst_t *)&cmd_vf_tc_min_bw, (cmdline_parse_inst_t *)&cmd_vf_tc_max_bw, (cmdline_parse_inst_t *)&cmd_strict_link_prio, - (cmdline_parse_inst_t *)&cmd_add_ddp, + (cmdline_parse_inst_t *)&cmd_ddp_add, (cmdline_parse_inst_t *)&cmd_get_ddp_list, NULL, };