From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 210468EA0 for ; Fri, 22 Jan 2016 16:27:52 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id u188so23034586wmu.1 for ; Fri, 22 Jan 2016 07:27:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=QaJBzBlv7ms6gI/gosGYV+rfycmLaXeIJy2VDL4HHvI=; b=XbJvb6nRrIw2+VzE/vsxU/zH9DbJi971RCbW/TCnOwLLOcO6/MwCdYDqi5bcjYfMX5 VJGlSimnlU3RaN4DFkTJfa5T1TdMu4I5hrxjQWnglJzbtg+2vYbAqTEs2MiQrrHMkKa8 GTnTI6+/wN2IaJVQOh77D/Skjc9LH7RFiElFYg/vXGoIO7Tq9eu6Zpay9uOE6ybbhauP ZZ61n72c7/6Qfgr8nA9/WbQWUFD3y438M3VzBFO9DNZxv5qkfCrP6dwImpyWOZB+iRCO 2jhfInqUQYrNlm6r57i4EzoEkmjUCpXl52HvBGgQLmjB4WtUwc3ZH5Q1zAv5Nqs3OhHA 4/rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=QaJBzBlv7ms6gI/gosGYV+rfycmLaXeIJy2VDL4HHvI=; b=I6Y96ZMgvyD2d2Z/HcR1AAUMAvgS77gn6UoSIzZ0n/gsRdVL/gJbZR1XRdZmIA/0VG 9IWd9rtuC7JE1XpvHJ4cJtARi0qSlMI6ABSVIGh3ufeqO9ravDDUMD0AWUKfDePq7ALd SqWoBNv1QUWa8gUO84xjt8yAQLIFf0Fohr7eVcjNnr1ukBBHKOOkdkAlh+E+BzjLQsxK 3KpF3QJ8GBGeNZNtIP8lYb9+3kwYUQeUkc4omk0wupNHmSxdmI9PtFD0maM9izTFygmr JOYfR4BBd2oPNcdY7t8ypUvp3YGyCXrcj3OhEY87GYgXI8guXwzpI1RwRvPezYqZ1j0J ZUqQ== X-Gm-Message-State: AG10YOQpu039g8evA9BO+sZnQ7u65CgbyFuFP9m9b5g6oDc8LHt9MYNmONFaiUDG3fkr7xt4 X-Received: by 10.28.11.73 with SMTP id 70mr4126751wml.40.1453476471837; Fri, 22 Jan 2016 07:27:51 -0800 (PST) Received: from gloops.dev.6wind.com (144.77.126.78.rev.sfr.net. [78.126.77.144]) by smtp.gmail.com with ESMTPSA id w73sm3359464wmw.21.2016.01.22.07.27.50 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Jan 2016 07:27:51 -0800 (PST) From: David Marchand To: dev@dpdk.org Date: Fri, 22 Jan 2016 16:27:35 +0100 Message-Id: <1453476464-31767-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.9.1 Cc: viktorin@rehivetech.com Subject: [dpdk-dev] [PATCH 0/9] pci cleanup and blacklist rework X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2016 15:27:52 -0000 Before 2.2.0 release, while preparing for more changes in eal (and fixing a problem reported by Roger M. [1]), I came up with this patchset that tries to make the pci code more compact and easier to read. I did limited testing, but this has been in my tree for quite some time now, so sending this to get feedback for 2.3 / 16.04. The 4th patch introduces a change in linux eal. Before, if a pci device was bound to no kernel driver, eal would set kdrv to "unknown". With this change, kdrv is set to "none". This might make it possible to avoid the old issue of virtio devices being used by dpdk while still bound to kernel driver reported by Franck B. [2]. I'll let virtio guys look at this. At the very least, it makes more sense to me. The 5th and 6th patches could be squashed. I just find it easier to review this way. In the 8th patch, I noticed that a driver lookup is done when detaching a pci device while this makes no sense and looks buggy to me. The last patch moves pci blacklist evaluation to rte_eal_pci_probe(). With this, it is now possible to attach a pci device blacklisted initially. I am not entirely happy with this last patch, I will try to send a different solution next week (hooks in pci layer). [1] http://dpdk.org/ml/archives/dev/2015-November/028140.html [2] http://dpdk.org/ml/archives/dev/2015-September/023389.html -- David Marchand David Marchand (9): pci: no need for dynamic tailq init pci: add internal device list helpers pci: minor cleanup pci: rework sysfs parsing for driver pci: factorize probe/detach code pci: cosmetic change pci: factorize driver search pci: remove driver lookup from detach pci: blacklist only in global probe function lib/librte_eal/bsdapp/eal/eal_pci.c | 37 +--- lib/librte_eal/common/eal_common_pci.c | 320 +++++++++++++++----------------- lib/librte_eal/common/include/rte_pci.h | 24 +++ lib/librte_eal/linuxapp/eal/eal_pci.c | 94 ++++------ 4 files changed, 218 insertions(+), 257 deletions(-) -- 1.9.1