From patchwork Wed Nov 7 06:14:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao1, Wei" X-Patchwork-Id: 47913 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BD7051BE0; Wed, 7 Nov 2018 07:38:50 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id E403E1D7; Wed, 7 Nov 2018 07:38:48 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Nov 2018 22:38:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,474,1534834800"; d="scan'208";a="102201822" Received: from dpdk6.bj.intel.com ([172.16.182.192]) by fmsmga002.fm.intel.com with ESMTP; 06 Nov 2018 22:38:44 -0800 From: Wei Zhao To: dev@dpdk.org Cc: stable@dpdk.org, yuan.peng@intel.com, wenzhuo.lu@intel.com, Wei Zhao Date: Wed, 7 Nov 2018 14:14:29 +0800 Message-Id: <1541571269-6133-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.7.5 Subject: [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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" There is an error in function in function search_rx_offload(), it will break when get unexpected return value from function rte_eth_dev_rx_offload_name(), but rte_eth_dev_rx_offload_name() will return some unexpected value indead. Fixes: c73a9071877a ("app/testpmd: add commands to test new offload API") Signed-off-by: Wei Zhao Tested-by: Peng, Yuan Signed-off-by: Wei Zhao 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 = 1; break; - } else if (!strcasecmp(single_name, "UNKNOWN")) - break; - else if (single_name == NULL) - break; + } single_offload <<= 1; }