From patchwork Mon Apr 9 17:57:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fan Zhang X-Patchwork-Id: 37691 X-Patchwork-Delegate: maxime.coquelin@redhat.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 6D6751BA0D; Mon, 9 Apr 2018 20:05:23 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id DDCF81B825 for ; Mon, 9 Apr 2018 20:05:21 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Apr 2018 11:05:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,427,1517904000"; d="scan'208";a="44757780" Received: from silpixa00398673.ir.intel.com (HELO silpixa00398673.ger.corp.intel.com) ([10.237.223.54]) by fmsmga004.fm.intel.com with ESMTP; 09 Apr 2018 11:05:19 -0700 From: Fan Zhang To: dev@dpdk.org Cc: roy.fan.zhang@intel.com, maxime.coquelin@redhat.com, ferruh.yigit@intel.com Date: Mon, 9 Apr 2018 18:57:40 +0100 Message-Id: <20180409175740.86858-1-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180409163832.85611-1-roy.fan.zhang@intel.com> References: <20180409163832.85611-1-roy.fan.zhang@intel.com> Subject: [dpdk-dev] [PATCH] examples/vhost_crypto: fix parsing 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" Fixes: 2ce5bd8c442d ("examples/vhost_crypto: add vhost crypto sample application") This patch fixes the parsing of cryptodev id in the cmdline. Signed-off-by: Fan Zhang Acked-by: Maxime Coquelin --- examples/vhost_crypto/main.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/examples/vhost_crypto/main.c b/examples/vhost_crypto/main.c index bc867240d..860200e29 100644 --- a/examples/vhost_crypto/main.c +++ b/examples/vhost_crypto/main.c @@ -95,11 +95,6 @@ parse_cryptodev_id(const char *q_arg) /* parse decimal string */ pm = strtoul(q_arg, &end, 10); - if ((pm == '\0') || (end == NULL) || (*end != '\0')) { - RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg); - return -1; - } - if (pm > rte_cryptodev_count()) { RTE_LOG(ERR, USER1, "Invalid Cryptodev ID %s\n", q_arg); return -1;