From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id CFE221B1BD for ; Wed, 24 Jan 2018 16:36:29 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 83277221FE; Wed, 24 Jan 2018 10:36:29 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:36:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=TTfq1dSmOJ+mJT1Eb zS34V3k5EiqLd3CsgtmQDTwK68=; b=B/IPCTa9gOT8t3/Y8yftuUQnwUrbjKOUT KvH2xJp9Cis5V5ljfqPN0N/WB8ijZYo23o2HqSt8967FoXGYYNeF5yJOFNEwTXfm kBwh14S4z0H/0vlrFw43rVpzCfO/2aXellTq3cjLODTztaFEjOYwGLIZIVZ4Dvna iSp1nOyGGdgWkTCBPnhiYOt5Lmm2VvfiYUdZ1tIBqWaDcZ1zbhfVnkAwAmtkYxU8 Epex0VDhJP/FfYUZuIZca4C/nGvw3Z3v9pvxs/lCIye4cgTLlSRavU2ofn+caHT1 5qdiZn8j1a6iovPHe2+Qa+bN3ME/HRumJwJ5RL9SNdy/H4RhfnmDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=TTfq1dSmOJ+mJT1EbzS34V3k5EiqLd3CsgtmQDTwK68=; b=faHltYEX 1uess7v1E/C713QuuwhVOFjLpyI2j74gsX0zw0kwY0p6r4u7hs1skYp1qZHzAE9G 7lL6me0/lVbkWK1dYOaW9PNCNZ2x7ezMU/6ypZQTCxf4Fx4iqaZWtpjqK+ZnWf2P 1cBU9F8G5UEEtJqcv/SzBt8AKcfj87mCUwvdeq3I3XSVcTqAhAeNK1D+hKlJcv8l a/k6cPI/eo/0Rh71rK/HT1f1KFW8+hmpoZZZ4Rl/eV19ICwCjt5EIvZVpWW7wZUn TwoJEPb3YjNsMQDYPPyPYlBzyTI3pc2r2WpQ3zp86Wx9Hiybu0Cu6lJLhYrvnyOR P2g0wDR6h4H7ag== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id BC78B7E1A2; Wed, 24 Jan 2018 10:36:27 -0500 (EST) From: Yuanhan Liu To: Anatoly Burakov Cc: dpdk stable Date: Wed, 24 Jan 2018 23:31:23 +0800 Message-Id: <1516808026-25523-15-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'vfio: fix enabled check on error' has been queued to LTS release 17.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: Wed, 24 Jan 2018 15:36:30 -0000 Hi, FYI, your patch has been queued to LTS release 17.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/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From c9a6a409f0fd31d795f3c7fb08ddcce04961ceac Mon Sep 17 00:00:00 2001 From: Anatoly Burakov Date: Fri, 22 Dec 2017 10:30:36 +0000 Subject: [PATCH] vfio: fix enabled check on error [ upstream commit 7b74a6e0b638ce69b9d03367ce85258e0da19807 ] rte_eal_check_module() might return -1, which would have been a "not false" condition for mod_available. Fix that to only report vfio being enabled if rte_eal_check_module() returns 1. Fixes: 221f7c220d6b ("vfio: move global config out of PCI files") Signed-off-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal_vfio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/linuxapp/eal/eal_vfio.c b/lib/librte_eal/linuxapp/eal/eal_vfio.c index 58f0123..fb1a622 100644 --- a/lib/librte_eal/linuxapp/eal/eal_vfio.c +++ b/lib/librte_eal/linuxapp/eal/eal_vfio.c @@ -525,7 +525,7 @@ rte_vfio_enable(const char *modname) int rte_vfio_is_enabled(const char *modname) { - const int mod_available = rte_eal_check_module(modname); + const int mod_available = rte_eal_check_module(modname) > 0; return vfio_cfg.vfio_enabled && mod_available; } -- 2.7.4