From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id BF46B4CE4 for ; Mon, 23 Jan 2017 08:46:54 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP; 22 Jan 2017 23:46:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,273,1477983600"; d="scan'208";a="51486154" Received: from yliu-dev.sh.intel.com ([10.239.67.162]) by orsmga004.jf.intel.com with ESMTP; 22 Jan 2017 23:46:53 -0800 From: Yuanhan Liu To: Fan Zhang Cc: Yuanhan Liu , Fiona Trahe , dpdk stable Date: Mon, 23 Jan 2017 15:47:44 +0800 Message-Id: <1485157675-32114-69-git-send-email-yuanhan.liu@linux.intel.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1485157675-32114-1-git-send-email-yuanhan.liu@linux.intel.com> References: <1485157675-32114-1-git-send-email-yuanhan.liu@linux.intel.com> Subject: [dpdk-stable] patch 'cryptodev: fix loop in device query' has been queued to stable release 16.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2017 07:46:55 -0000 Hi, FYI, your patch has been queued to stable release 16.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 01/28/17. So please shout if anyone has objections. --- Note 16.11 is a LTS release. v16.11.1 is planned to be released shortly (about 2-3 weeks) after v17.02. --- Thanks. --yliu --- >>From f7e2edaeb4a760ba46614784efbf6151e37aad64 Mon Sep 17 00:00:00 2001 From: Fan Zhang Date: Wed, 11 Jan 2017 14:09:47 +0000 Subject: [PATCH] cryptodev: fix loop in device query [ upstream commit c5b70818adf02f97f049c2b2b3206e89d6f6c64b ] This patch fixes the dev value update problem in rte_cryptodev_pmd_get_named_dev, orginally, dev won't be updated after the initial step in the loop. Fixes: d11b0f30df88 ("cryptodev: introduce API and framework for crypto devices") Signed-off-by: Fan Zhang Acked-by: Fiona Trahe --- lib/librte_cryptodev/rte_cryptodev_pmd.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/librte_cryptodev/rte_cryptodev_pmd.h b/lib/librte_cryptodev/rte_cryptodev_pmd.h index abfe2dc..c6a5794 100644 --- a/lib/librte_cryptodev/rte_cryptodev_pmd.h +++ b/lib/librte_cryptodev/rte_cryptodev_pmd.h @@ -183,8 +183,9 @@ rte_cryptodev_pmd_get_named_dev(const char *name) if (name == NULL) return NULL; - for (i = 0, dev = &rte_cryptodev_globals->devs[i]; - i < rte_cryptodev_globals->max_devs; i++) { + for (i = 0; i < rte_cryptodev_globals->max_devs; i++) { + dev = &rte_cryptodev_globals->devs[i]; + if ((dev->attached == RTE_CRYPTODEV_ATTACHED) && (strcmp(dev->data->name, name) == 0)) return dev; -- 1.9.0