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 3E5262B91 for ; Tue, 27 Dec 2016 09:18:04 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 27 Dec 2016 00:18:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,415,1477983600"; d="scan'208";a="1086990134" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 27 Dec 2016 00:18:03 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 27 Dec 2016 00:18:02 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 27 Dec 2016 00:18:02 -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; Tue, 27 Dec 2016 16:18:01 +0800 From: "Xing, Beilei" To: "Yang, Qiming" , "dev@dpdk.org" CC: "Wu, Jingjing" , "Yang, Qiming" Thread-Topic: [dpdk-dev] [PATCH v4] app/testpmd: supported offload capabilities query Thread-Index: AQHSXQAqugB5/pUIa0iw3YmS8ihz86EbeLxA Date: Tue, 27 Dec 2016 08:18:00 +0000 Message-ID: <94479800C636CB44BD422CB454846E013158B9AE@SHSMSX101.ccr.corp.intel.com> References: <1482286826-72737-1-git-send-email-qiming.yang@intel.com> <1482485513-7087-1-git-send-email-qiming.yang@intel.com> In-Reply-To: <1482485513-7087-1-git-send-email-qiming.yang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNjExNjY0NzYtZDBlNy00NzYyLTkyNTItYTFmOGFmNTU2MGFkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6ImlJKzBBK09iUmc3N294WXhLaWQ3T0x6RTBmOVdaeFZ0K05CZ0RXbHJjOU09In0= 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 v4] 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: Tue, 27 Dec 2016 08:18:05 -0000 Hi Qiming, > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Qiming Yang > Sent: Friday, December 23, 2016 5:32 PM > To: dev@dpdk.org > Cc: Wu, Jingjing ; Yang, Qiming > > Subject: [dpdk-dev] [PATCH v4] app/testpmd: supported offload capabilitie= s > query >=20 > Add two new commands "show port cap " and "show port cap all"to > diaplay what offload capabilities supported in ports. It will not only di= splay all > the capabilities of the port, but also the enabling condition for each ca= pability in > the running time. >=20 > Signed-off-by: Qiming Yang > --- > 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'. > --- > --- > app/test-pmd/cmdline.c | 17 ++- > app/test-pmd/config.c | 172 > ++++++++++++++++++++++++++++ > app/test-pmd/testpmd.h | 1 + > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 12 +- > 4 files changed, 192 insertions(+), 10 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index > 63b55dc..bbfafab 100644 > --- a/app/test-pmd/cmdline.c > +++ b/app/test-pmd/cmdline.c > + > + if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_TCP_CKSUM) { > + printf("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_TCP_LRO) { > + printf("Large receive offload: "); > + if (dev->data->dev_conf.rxmode.enable_lro) > + printf("on\n"); > + else > + printf("off\n"); > + } > + > + if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_QINQ_STRIP) { > + printf("Double VLANs stripped: "); > + if (dev->data->dev_conf.rxmode.hw_vlan_extend) > + printf("on\n"); > + else > + printf("off\n"); > + } > + > + if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM) > + printf("Outer IPv4 checksum: "); Seems there's no 'on' or 'off' printed here, do I miss anything? > + > + if (dev_info.tx_offload_capa & DEV_TX_OFFLOAD_VLAN_INSERT) { > + printf("VLAN insert: "); > + if (ports[port_id].tx_ol_flags & > TESTPMD_TX_OFFLOAD_INSERT_VLAN) > + printf("on\n"); > + else > + printf("off\n"); > + } > +