From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id F3EEB1B648 for ; Fri, 13 Oct 2017 04:58:35 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Oct 2017 19:58:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,369,1503385200"; d="scan'208";a="159984822" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga005.jf.intel.com with ESMTP; 12 Oct 2017 19:58:34 -0700 Received: from fmsmsx112.amr.corp.intel.com (10.18.116.6) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 12 Oct 2017 19:58:34 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX112.amr.corp.intel.com (10.18.116.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 12 Oct 2017 19:58:33 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by shsmsx102.ccr.corp.intel.com ([169.254.2.175]) with mapi id 14.03.0319.002; Fri, 13 Oct 2017 10:58:32 +0800 From: "Wu, Jingjing" To: "Singh, Jasvinder" , "dev@dpdk.org" CC: "Dumitrescu, Cristian" , "De Lara Guarch, Pablo" , "Pei, Yulong" Thread-Topic: [PATCH v7 3/3] app/test-pmd: add CLI for TM nodes and hierarchy commit Thread-Index: AQHTQnFSf7ghvlRe/UehHzvRJoSfvqLhE0zw Date: Fri, 13 Oct 2017 02:58:32 +0000 Message-ID: <9BB6961774997848B5B42BEC655768F810E94752@SHSMSX103.ccr.corp.intel.com> References: <20171009190750.6697-1-jasvinder.singh@intel.com> <20171011092612.13369-1-jasvinder.singh@intel.com> <20171011092612.13369-3-jasvinder.singh@intel.com> In-Reply-To: <20171011092612.13369-3-jasvinder.singh@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v7 3/3] app/test-pmd: add CLI for TM nodes and hierarchy commit 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: Fri, 13 Oct 2017 02:58:36 -0000 > + /* Port status */ > + if (port_is_started(port_id)) { > + printf(" Port %u not stopped (error)\n", port_id); > + return; > + } > + > + /* Node parameters */ > + if (res->parent_node_id < 0) > + parent_node_id =3D UINT32_MAX; > + else > + parent_node_id =3D res->parent_node_id; > + > + memset(&np, 0, sizeof(struct rte_tm_node_params)); > + np.shaper_profile_id =3D res->shaper_profile_id; > + np.n_shared_shapers =3D res->n_shared_shapers; > + > + if (np.n_shared_shapers =3D=3D 1) > + np.shared_shaper_id[0] =3D res->shared_shaper_id; > + else > + np.shared_shaper_id =3D NULL; > + Does n_shared_shapers means number of shared_shapers? And now we only suppo= rt 1? When refer to the definition of struct rte_tm_node_params, the shared_shape= r_id arry need to be allocated by user, but I didn't find the allocation here or even in patc= h 2/3. The same comments for below commands. [......] > +/* *** Port TM Hierarchy Commit *** */ > +struct cmd_port_tm_hierarchy_commit_result { > + cmdline_fixed_string_t port; > + cmdline_fixed_string_t tm; > + cmdline_fixed_string_t hierarchy; > + cmdline_fixed_string_t commit; > + uint16_t port_id; > + uint32_t clean_on_fail; > +}; > + > +cmdline_parse_token_string_t cmd_port_tm_hierarchy_commit_port =3D > + TOKEN_STRING_INITIALIZER( > + struct cmd_port_tm_hierarchy_commit_result, port, "port"); > +cmdline_parse_token_string_t cmd_port_tm_hierarchy_commit_tm =3D > + TOKEN_STRING_INITIALIZER( > + struct cmd_port_tm_hierarchy_commit_result, tm, "tm"); > +cmdline_parse_token_string_t cmd_port_tm_hierarchy_commit_hierarchy =3D > + TOKEN_STRING_INITIALIZER( > + struct cmd_port_tm_hierarchy_commit_result, > + hierarchy, "hierarchy"); > +cmdline_parse_token_string_t cmd_port_tm_hierarchy_commit_commit =3D > + TOKEN_STRING_INITIALIZER( > + struct cmd_port_tm_hierarchy_commit_result, commit, > "commit"); > +cmdline_parse_token_num_t cmd_port_tm_hierarchy_commit_port_id =3D > + TOKEN_NUM_INITIALIZER( > + struct cmd_port_tm_hierarchy_commit_result, > + port_id, UINT16); > +cmdline_parse_token_num_t cmd_port_tm_hierarchy_commit_clean_on_fail > =3D > + TOKEN_NUM_INITIALIZER(struct > cmd_port_tm_hierarchy_commit_result, > + clean_on_fail, UINT32); How about the define clean_on_fail to be a string like "(clean|no_clean)" o= r "clean_on_fail (yes|no)"? And don't forget the doc update for all the new commands. Thanks Jingjing