From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Yang, Qiming" Subject: Re: [PATCH v4] app/testpmd: supported offload capabilities query Date: Tue, 27 Dec 2016 09:40:36 +0000 Message-ID: References: <1482286826-72737-1-git-send-email-qiming.yang@intel.com> <1482485513-7087-1-git-send-email-qiming.yang@intel.com> <94479800C636CB44BD422CB454846E013158B9AE@SHSMSX101.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "Wu, Jingjing" To: "Xing, Beilei" , "dev@dpdk.org" Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 04EBA2B91 for ; Tue, 27 Dec 2016 10:40:41 +0100 (CET) In-Reply-To: <94479800C636CB44BD422CB454846E013158B9AE@SHSMSX101.ccr.corp.intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi, Beilei Nothing is missing. This capability have no switch in DPDK now. So it don't= have 'on' or 'off'. -----Original Message----- From: Xing, Beilei=20 Sent: Tuesday, December 27, 2016 4:18 PM To: Yang, Qiming ; dev@dpdk.org Cc: Wu, Jingjing ; Yang, Qiming Subject: RE: [dpdk-dev] [PATCH v4] app/testpmd: supported offload capabilit= ies query 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=20 > > Subject: [dpdk-dev] [PATCH v4] 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 > --- > 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=20 > 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"); > + } > +