From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id B3038239; Wed, 7 Nov 2018 08:58:33 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2018 23:58:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,474,1534834800"; d="scan'208";a="83958687" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga007.fm.intel.com with ESMTP; 06 Nov 2018 23:58:32 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 6 Nov 2018 23:58:32 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.161]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.199]) with mapi id 14.03.0415.000; Wed, 7 Nov 2018 15:58:30 +0800 From: "Peng, Yuan" To: "Zhao1, Wei" , "dev@dpdk.org" CC: "stable@dpdk.org" , "Lu, Wenzhuo" Thread-Topic: [PATCH] app/testpmd: fix Rx offload search error Thread-Index: AQHUdmSR1OUk9aKjL0ahtiLxwADBMKVD7eXg Date: Wed, 7 Nov 2018 07:58:29 +0000 Message-ID: <67D543A150B29E4CAAE53918F64EDAEA376471EF@SHSMSX103.ccr.corp.intel.com> References: <1541571269-6133-1-git-send-email-wei.zhao1@intel.com> In-Reply-To: <1541571269-6133-1-git-send-email-wei.zhao1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action 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] app/testpmd: fix Rx offload search error 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: Wed, 07 Nov 2018 07:58:34 -0000 Tested-by: Peng, Yuan - Tested Branch: master - Tested Commit: c59b06294fb4531792a4c74ca63fa79a4cb53457 - OS: 4.5.5-300.fc24.x86_64 - GCC: gcc (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2) - CPU: Intel(R) Xeon(R) CPU E5-2699 v4 @ 2.20GHz - NIC: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [80= 86:10fb] (rev 01) Intel Corporation Ethernet Controller X710 for 10GbE SFP+ [8086:1572] = (rev 01) - Default x86_64-native-linuxapp-gcc configuration - Prerequisites: - Total 1 cases, 1 passed, 0 failed - Case: ./usertools/dpdk-devbind.py -b igb_uio 07:00.0 07:00.1 ./x86_64-native-linuxapp-gcc/app/testpmd -c f -n 4 - -i --rxq=3D4 --txq=3D4 testpmd> show port 0 rx_offload capabilities Rx Offloading Capabilities of port 0 : Per Queue : VLAN_STRIP Per Port : IPV4_CKSUM UDP_CKSUM TCP_CKSUM TCP_LRO MACSEC_STRIP VLAN_FILTER = VLAN_EXTEND JUMBO_FRAME SCATTER SECURITY KEEP_CRC testpmd> show port 0 rx_offload configuration Rx Offloading Configuration of port 0 : Port : Queue[ 0] : Queue[ 1] : Queue[ 2] : Queue[ 3] : testpmd> port stop 0 testpmd> port config 0 rx_offload security on testpmd> port config 0 rx_offload scatter on testpmd> port config 0 rx_offload keep_crc on testpmd> port config 0 rx_offload jumbo_frame on testpmd> port config 0 rx_offload vlan_extend on testpmd> port config 0 rx_offload vlan_filter on testpmd> port config 0 rx_offload macsec_strip on testpmd> port config 0 rx_offload tcp_lro on testpmd> port config 0 rx_offload tcp_cksum on testpmd> port config 0 rx_offload udp_cksum on testpmd> port config 0 rx_offload ipv4_cksum on testpmd> testpmd> show port 0 rx_offload configuration Rx Offloading Configuration of port 0 : Port : IPV4_CKSUM UDP_CKSUM TCP_CKSUM TCP_LRO MACSEC_STRIP VLAN_FILTER VL= AN_EXTEND JUMBO_FRAME SCATTER SECURITY KEEP_CRC Queue[ 0] : IPV4_CKSUM UDP_CKSUM TCP_CKSUM TCP_LRO MACSEC_STRIP VLAN_FILT= ER VLAN_EXTEND JUMBO_FRAME SCATTER SECURITY KEEP_CRC Queue[ 1] : IPV4_CKSUM UDP_CKSUM TCP_CKSUM TCP_LRO MACSEC_STRIP VLAN_FILT= ER VLAN_EXTEND JUMBO_FRAME SCATTER SECURITY KEEP_CRC Queue[ 2] : IPV4_CKSUM UDP_CKSUM TCP_CKSUM TCP_LRO MACSEC_STRIP VLAN_FILT= ER VLAN_EXTEND JUMBO_FRAME SCATTER SECURITY KEEP_CRC Queue[ 3] : IPV4_CKSUM UDP_CKSUM TCP_CKSUM TCP_LRO MACSEC_STRIP VLAN_FILT= ER VLAN_EXTEND JUMBO_FRAME SCATTER SECURITY KEEP_CRC testpmd> port config 0 rx_offload ipv4_cksum off testpmd> port config 0 rx_offload udp_cksum off testpmd> port config 0 rx_offload tcp_cksum off testpmd> port config 0 rx_offload tcp_lro off testpmd> port config 0 rx_offload macsec_strip off testpmd> port config 0 rx_offload vlan_filter off testpmd> port config 0 rx_offload vlan_extend off testpmd> port config 0 rx_offload jumbo_frame off testpmd> port config 0 rx_offload keep_crc off testpmd> port config 0 rx_offload scatter off testpmd> port config 0 rx_offload security off testpmd> show port 0 rx_offload configuration Rx Offloading Configuration of port 0 : Port : Queue[ 0] : Queue[ 1] : Queue[ 2] : Queue[ 3] : All the capabilities can be configured successfully. The case can pass with i40e and ixgbe card. -----Original Message----- From: Zhao1, Wei=20 Sent: Wednesday, November 7, 2018 2:14 PM To: dev@dpdk.org Cc: stable@dpdk.org; Peng, Yuan ; Lu, Wenzhuo ; Zhao1, Wei Subject: [PATCH] app/testpmd: fix Rx offload search error There is an error in function in function search_rx_offload(), it will brea= k when get unexpected return value from function rte_eth_dev_rx_offload_nam= e(), but rte_eth_dev_rx_offload_name() will return some unexpected value in= dead. Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API") Signed-off-by: Wei Zhao --- app/test-pmd/cmdline.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 5e08a1b.= .1275074 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -17805,10 +17805,7 @@ search_rx_offload(const char *name) if (!strcasecmp(single_name, name)) { found =3D 1; break; - } else if (!strcasecmp(single_name, "UNKNOWN")) - break; - else if (single_name =3D=3D NULL) - break; + } single_offload <<=3D 1; } =20 -- 2.7.5