From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 7C99C1B6A5 for ; Fri, 13 Oct 2017 12:50:10 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Oct 2017 03:50:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,370,1503385200"; d="scan'208";a="162267765" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by fmsmga005.fm.intel.com with ESMTP; 13 Oct 2017 03:50:08 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.49]) by irsmsx110.ger.corp.intel.com ([163.33.3.25]) with mapi id 14.03.0319.002; Fri, 13 Oct 2017 11:50:07 +0100 From: "Singh, Jasvinder" To: "Wu, Jingjing" , "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: AQHTQ88pXfvKQoSrL02d5/1/0d2Kj6LhlsUw Date: Fri, 13 Oct 2017 10:50:07 +0000 Message-ID: <54CBAA185211B4429112C315DA58FF6D3326D83A@IRSMSX103.ger.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> <9BB6961774997848B5B42BEC655768F810E94752@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <9BB6961774997848B5B42BEC655768F810E94752@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjQ2ODE0YjYtZmQyYi00ZjNiLWE4ZTEtYzE5NjdlOTNlZDdjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IittU212UCtQMDN3QzlhWGwyc2FJeVFhSGZTXC8xalQ0SFFsbDZ6K2xHamtnPSJ9 x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] 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 10:50:11 -0000 > -----Original Message----- > From: Wu, Jingjing > Sent: Friday, October 13, 2017 3:59 AM > To: Singh, Jasvinder ; dev@dpdk.org > Cc: Dumitrescu, Cristian ; De Lara Guarch, > Pablo ; Pei, Yulong > > Subject: RE: [PATCH v7 3/3] app/test-pmd: add CLI for TM nodes and > hierarchy commit >=20 > > + /* 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; > > + >=20 > Does n_shared_shapers means number of shared_shapers? And now we > only support 1? Yes. It is number of shared shapers. The ixgbe and i40e doesn't support sha= red shapers, while softnic support single shared shaper.=20 > When refer to the definition of struct rte_tm_node_params, the > shared_shaper_id arry need to be allocated by user, but I didn't find the > allocation here or even in patch 2/3. >=20 > The same comments for below commands. Will fix this.=20 > [......] >=20 > > +/* *** 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)"= or > "clean_on_fail (yes|no)"? Will make this string. > And don't forget the doc update for all the new commands. Yes, will update the doc accordingly. Thanks. > Thanks > Jingjing