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 0EEE0F919 for ; Fri, 13 Jan 2017 10:40:29 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 13 Jan 2017 01:40:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,221,1477983600"; d="scan'208";a="922078752" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga003.jf.intel.com with ESMTP; 13 Jan 2017 01:40:28 -0800 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 13 Jan 2017 01:40:28 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 13 Jan 2017 01:40:28 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.177]) by SHSMSX103.ccr.corp.intel.com ([10.239.4.69]) with mapi id 14.03.0248.002; Fri, 13 Jan 2017 17:40:26 +0800 From: "Yang, Qiming" To: "De Lara Guarch, Pablo" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v5] app/testpmd: supported offload capabilities query Thread-Index: AQHSbXkYala3FvGgG0OAeZ42OlH6YqE2JoqA Date: Fri, 13 Jan 2017 09:40:25 +0000 Message-ID: References: <1482485513-7087-1-git-send-email-qiming.yang@intel.com> <1484191582-17293-1-git-send-email-qiming.yang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzE5Yjc1OWYtNWM1My00NzlmLWEwYjctODY3OTg3OTYyYzEwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImNRTnRFUTZBa2hReGN5SUxVYVV2ZDBMZnRiYm5YcTNFU1VKaWRmTXVVMU09In0= x-ctpclassification: CTP_IC 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 v5] app/testpmd: supported offload capabilities query 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 Jan 2017 09:40:30 -0000 Hi, Pablo -----Original Message----- From: De Lara Guarch, Pablo=20 Sent: Friday, January 13, 2017 4:43 PM To: Yang, Qiming ; dev@dpdk.org Cc: Yang, Qiming Subject: RE: [dpdk-dev] [PATCH v5] app/testpmd: supported offload capabilit= ies query Hi Qiming, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qiming Yang > Sent: Thursday, January 12, 2017 3:26 AM > To: dev@dpdk.org > Cc: Yang, Qiming > Subject: [dpdk-dev] [PATCH v5] app/testpmd: supported offload=20 > capabilities query >=20 > Add two new commands "show port cap " and "show port cap all"to=20 > diaplay what offload capabilities supported in ports. It will not only=20 > display all the capabilities of the port, but also the enabling=20 > condition for each capability in the running time. >=20 > Signed-off-by: Qiming Yang > Acked-by: Jingjing Wu > Acked-by: Beilei Xing > --- > v2 changes: > * fixed the output style as Ferruh's patch show and add some > description in docs for new functions. > v3 changes: > * add new command in cmd_help_long_parsed. > v4 changes: > * use 'cap' instead of 'capa'. > v5 changes: > * rebased, fixed the inappropriate expression and adjusted the > output order. > --- > --- > app/test-pmd/cmdline.c | 17 ++- > app/test-pmd/config.c | 175 > ++++++++++++++++++++++++++++ > app/test-pmd/testpmd.h | 1 + > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 12 +- > 4 files changed, 195 insertions(+), 10 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index=20 > 4e8b0d8..6fa1783 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c ... > cmdline_parse_token_string_t cmd_showportall_show =3D @@ -5821,13=20 > +5824,14 @@ cmdline_parse_token_string_t cmd_showportall_port =3D > TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, port,=20 > "port"); cmdline_parse_token_string_t cmd_showportall_what =3D > TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, what, > - > "info#stats#xstats#fdir#stat_qmap#dcb_tc"); > + > "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap"); > cmdline_parse_token_string_t cmd_showportall_all =3D > TOKEN_STRING_INITIALIZER(struct cmd_showportall_result, all, "all"); =20 > cmdline_parse_inst_t cmd_showportall =3D { > .f =3D cmd_showportall_parsed, > .data =3D NULL, > - .help_str =3D "show|clear port > info|stats|xstats|fdir|stat_qmap|dcb_tc all", > + .help_str =3D "show|clear port" Missing space after "port" > + "info|stats|xstats|fdir|stat_qmap|dcb_tc|cap all", > .tokens =3D { > (void *)&cmd_showportall_show, > (void *)&cmd_showportall_port, > @@ -5867,6 +5871,8 @@ static void cmd_showport_parsed(void=20 > *parsed_result, > nic_stats_mapping_display(res->portnum); > else if (!strcmp(res->what, "dcb_tc")) > port_dcb_info_display(res->portnum); > + else if (!strcmp(res->what, "cap")) > + port_offload_cap_display(res->portnum); > } >=20 > cmdline_parse_token_string_t cmd_showport_show =3D @@ -5876,14 +5882,15= =20 > @@ cmdline_parse_token_string_t cmd_showport_port =3D > TOKEN_STRING_INITIALIZER(struct cmd_showport_result, port, "port"); =20 > cmdline_parse_token_string_t cmd_showport_what =3D > TOKEN_STRING_INITIALIZER(struct cmd_showport_result, what, > - > "info#stats#xstats#fdir#stat_qmap#dcb_tc"); > + > "info#stats#xstats#fdir#stat_qmap#dcb_tc#cap"); > cmdline_parse_token_num_t cmd_showport_portnum =3D > TOKEN_NUM_INITIALIZER(struct cmd_showport_result, portnum, UINT8); >=20 > cmdline_parse_inst_t cmd_showport =3D { > .f =3D cmd_showport_parsed, > .data =3D NULL, > - .help_str =3D "show|clear port > info|stats|xstats|fdir|stat_qmap|dcb_tc " > + .help_str =3D "show|clear port" Missing space after "port". Also, add a tab in the following line to be consistent with the help_str of= the next command. > + "info|stats|xstats|fdir|stat_qmap|dcb_tc|cap " > "", > .tokens =3D { > (void *)&cmd_showport_show, > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index=20 > 617e6d4..8a2ef56 100644 > --- a/app/test-pmd/config.c > +++ b/app/test-pmd/config.c ... > + > + if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_CKSUM) { > + printf("RX TCP checksum: "); > + if (dev->data->dev_conf.rxmode.hw_ip_checksum) > + printf("on\n"); > + else > + printf("off\n"); > + } > + > + if (dev_info.rx_offload_capa & > DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM) > + printf("RX Outer IPv4 checksum: "); Missing on/off? Qiming: I didn't find any switch for this feature in DPDK now. I'll fix the= format problem. Thank you. > + > + if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_LRO) { > + printf("Large receive offload: "); > + if (dev->data->dev_conf.rxmode.enable_lro) > + printf("on\n"); > + else > + printf("off\n"); > + } Thanks for this nice patch. Pablo