DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Luca Boccassi <bluca@debian.org>
Subject: [dpdk-dev] [PATCH v4 05/11] drivers: replace references to blacklist
Date: Mon, 13 Jul 2020 22:39:13 -0700	[thread overview]
Message-ID: <20200714053919.5609-6-stephen@networkplumber.org> (raw)
In-Reply-To: <20200714053919.5609-1-stephen@networkplumber.org>

Use the new terminology blocked to describe when devices
are excluded from being used.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Luca Boccassi <bluca@debian.org>
---
 drivers/bus/dpaa/dpaa_bus.c        |  7 +++----
 drivers/bus/fslmc/fslmc_bus.c      |  9 ++++-----
 drivers/bus/fslmc/fslmc_vfio.c     |  8 ++++----
 drivers/bus/pci/pci_common.c       | 24 ++++++++++--------------
 drivers/bus/vmbus/vmbus_common.c   |  4 ++--
 drivers/crypto/virtio/virtio_pci.c |  2 +-
 drivers/net/fm10k/fm10k_ethdev.c   |  2 +-
 drivers/net/virtio/virtio_pci.c    |  2 +-
 8 files changed, 26 insertions(+), 32 deletions(-)

diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index 32e872da5209..f08c3a6149da 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -568,7 +568,7 @@ rte_dpaa_bus_probe(void)
 	struct rte_dpaa_driver *drv;
 	FILE *svr_file = NULL;
 	unsigned int svr_ver;
-	int probe_all = rte_dpaa_bus.bus.conf.scan_mode != RTE_BUS_SCAN_WHITELIST;
+	int probe_all = rte_dpaa_bus.bus.conf.scan_mode != RTE_BUS_SCAN_ALLOWLIST;
 	static int process_once;
 
 	/* If DPAA bus is not present nothing needs to be done */
@@ -630,13 +630,12 @@ rte_dpaa_bus_probe(void)
 
 			if (!drv->probe ||
 			    (dev->device.devargs &&
-			    dev->device.devargs->policy == RTE_DEV_BLACKLISTED))
+			     dev->device.devargs->policy == RTE_DEV_BLOCKED))
 				continue;
 
 			if (probe_all ||
 			    (dev->device.devargs &&
-			    dev->device.devargs->policy ==
-			    RTE_DEV_WHITELISTED)) {
+			     dev->device.devargs->policy == RTE_DEV_ALLOWED)) {
 				ret = drv->probe(drv, dev);
 				if (ret) {
 					DPAA_BUS_ERR("unable to probe:%s",
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index beb3dd008fbc..be4ab4ff3f64 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -403,7 +403,7 @@ rte_fslmc_probe(void)
 		return 0;
 	}
 
-	probe_all = rte_fslmc_bus.bus.conf.scan_mode != RTE_BUS_SCAN_WHITELIST;
+	probe_all = rte_fslmc_bus.bus.conf.scan_mode != RTE_BUS_SCAN_ALLOWLIST;
 
 	/* In case of PA, the FD addresses returned by qbman APIs are physical
 	 * addresses, which need conversion into equivalent VA address for
@@ -434,16 +434,15 @@ rte_fslmc_probe(void)
 				continue;
 
 			if (dev->device.devargs &&
-			  dev->device.devargs->policy == RTE_DEV_BLACKLISTED) {
-				DPAA2_BUS_LOG(DEBUG, "%s Blacklisted, skipping",
+			    dev->device.devargs->policy == RTE_DEV_BLOCKED) {
+				DPAA2_BUS_LOG(DEBUG, "%s Blocklisted, skipping",
 					      dev->device.name);
 				continue;
 			}
 
 			if (probe_all ||
 			   (dev->device.devargs &&
-			   dev->device.devargs->policy ==
-			   RTE_DEV_WHITELISTED)) {
+			    dev->device.devargs->policy == RTE_DEV_ALLOWED)) {
 				ret = drv->probe(drv, dev);
 				if (ret) {
 					DPAA2_BUS_ERR("Unable to probe");
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index efe2c43d372a..3634db3f65a2 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -819,8 +819,8 @@ fslmc_vfio_process_group(void)
 	TAILQ_FOREACH_SAFE(dev, &rte_fslmc_bus.device_list, next, dev_temp) {
 		if (dev->dev_type == DPAA2_MPORTAL) {
 			if (dev->device.devargs &&
-			    dev->device.devargs->policy == RTE_DEV_BLACKLISTED) {
-				DPAA2_BUS_LOG(DEBUG, "%s Blacklisted, skipping",
+			    dev->device.devargs->policy == RTE_DEV_BLOCKED) {
+				DPAA2_BUS_LOG(DEBUG, "%s Blocklisted, skipping",
 					      dev->device.name);
 				TAILQ_REMOVE(&rte_fslmc_bus.device_list,
 						dev, next);
@@ -852,8 +852,8 @@ fslmc_vfio_process_group(void)
 
 	TAILQ_FOREACH_SAFE(dev, &rte_fslmc_bus.device_list, next, dev_temp) {
 		if (dev->device.devargs &&
-		    dev->device.devargs->policy == RTE_DEV_BLACKLISTED) {
-			DPAA2_BUS_LOG(DEBUG, "%s Blacklisted, skipping",
+		    dev->device.devargs->policy == RTE_DEV_BLOCKED) {
+			DPAA2_BUS_LOG(DEBUG, "%s Blocklisted, skipping",
 				      dev->device.name);
 			TAILQ_REMOVE(&rte_fslmc_bus.device_list, dev, next);
 			continue;
diff --git a/drivers/bus/pci/pci_common.c b/drivers/bus/pci/pci_common.c
index a8e5fd52c1d0..fe3a02e8049f 100644
--- a/drivers/bus/pci/pci_common.c
+++ b/drivers/bus/pci/pci_common.c
@@ -66,9 +66,8 @@ pci_name_set(struct rte_pci_device *dev)
 			dev->name, sizeof(dev->name));
 	devargs = pci_devargs_lookup(&dev->addr);
 	dev->device.devargs = devargs;
-	/* In blacklist mode, if the device is not blacklisted, no
-	 * rte_devargs exists for it.
-	 */
+
+	/* If the device is blocked, no rte_devargs exists for it. */
 	if (devargs != NULL)
 		/* If an rte_devargs exists, the generic rte_device uses the
 		 * given name as its name.
@@ -132,7 +131,7 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,
 
 	loc = &dev->addr;
 
-	/* The device is not blacklisted; Check if driver supports it */
+	/* The device is not blocked; Check if driver supports it */
 	if (!rte_pci_match(dr, dev))
 		/* Match of device and driver failed */
 		return 1;
@@ -141,12 +140,10 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr,
 			loc->domain, loc->bus, loc->devid, loc->function,
 			dev->device.numa_node);
 
-	/* no initialization when blacklisted, return without error */
+	/* no initialization when marked as blocked, return without error */
 	if (dev->device.devargs != NULL &&
-		dev->device.devargs->policy ==
-			RTE_DEV_BLACKLISTED) {
-		RTE_LOG(INFO, EAL, "  Device is blacklisted, not"
-			" initializing\n");
+		dev->device.devargs->policy == RTE_DEV_BLOCKED) {
+		RTE_LOG(INFO, EAL, "  Device is blocked, not initializing\n");
 		return 1;
 	}
 
@@ -589,14 +586,13 @@ rte_pci_ignore_device(const struct rte_pci_addr *pci_addr)
 	struct rte_devargs *devargs = pci_devargs_lookup(pci_addr);
 
 	switch (rte_pci_bus.bus.conf.scan_mode) {
-	case RTE_BUS_SCAN_WHITELIST:
-		if (devargs && devargs->policy == RTE_DEV_WHITELISTED)
+	case RTE_BUS_SCAN_ALLOWLIST:
+		if (devargs && devargs->policy == RTE_DEV_ALLOWED)
 			return false;
 		break;
 	case RTE_BUS_SCAN_UNDEFINED:
-	case RTE_BUS_SCAN_BLACKLIST:
-		if (devargs == NULL ||
-		    devargs->policy != RTE_DEV_BLACKLISTED)
+	case RTE_BUS_SCAN_BLOCKLIST:
+		if (devargs == NULL || devargs->policy != RTE_DEV_BLOCKED)
 			return false;
 		break;
 	}
diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
index 4c9ac33ac6e4..b31678ad0564 100644
--- a/drivers/bus/vmbus/vmbus_common.c
+++ b/drivers/bus/vmbus/vmbus_common.c
@@ -101,7 +101,7 @@ vmbus_probe_one_driver(struct rte_vmbus_driver *dr,
 	VMBUS_LOG(INFO, "VMBUS device %s on NUMA socket %i",
 		  guid, dev->device.numa_node);
 
-	/* TODO add blacklisted */
+	/* TODO add block/allow logic */
 
 	/* map resources for device */
 	ret = rte_vmbus_map_device(dev);
@@ -177,7 +177,7 @@ rte_vmbus_probe(void)
 
 		rte_uuid_unparse(dev->device_id, ubuf, sizeof(ubuf));
 
-		/* TODO: add whitelist/blacklist */
+		/* TODO: add allowlist/blocklist */
 
 		if (vmbus_probe_all_drivers(dev) < 0) {
 			VMBUS_LOG(NOTICE,
diff --git a/drivers/crypto/virtio/virtio_pci.c b/drivers/crypto/virtio/virtio_pci.c
index f490f6e28960..ae069794a683 100644
--- a/drivers/crypto/virtio/virtio_pci.c
+++ b/drivers/crypto/virtio/virtio_pci.c
@@ -438,7 +438,7 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_crypto_hw *hw)
  * Return -1:
  *   if there is error mapping with VFIO/UIO.
  *   if port map error when driver type is KDRV_NONE.
- *   if whitelisted but driver type is KDRV_UNKNOWN.
+ *   if marked as allowed but driver type is KDRV_UNKNOWN.
  * Return 1 if kernel driver is managing the device.
  * Return 0 on success.
  */
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index b574693bca48..389ad5995040 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -3083,7 +3083,7 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 	hw->hw_addr = (void *)pdev->mem_resource[0].addr;
 	if (hw->hw_addr == NULL) {
 		PMD_INIT_LOG(ERR, "Bad mem resource."
-			" Try to blacklist unused devices.");
+			" Try to blocklist unused devices.");
 		return -EIO;
 	}
 
diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
index 29a354bf76df..5bec1fb6aa27 100644
--- a/drivers/net/virtio/virtio_pci.c
+++ b/drivers/net/virtio/virtio_pci.c
@@ -682,7 +682,7 @@ virtio_read_caps(struct rte_pci_device *dev, struct virtio_hw *hw)
  * Return -1:
  *   if there is error mapping with VFIO/UIO.
  *   if port map error when driver type is KDRV_NONE.
- *   if whitelisted but driver type is KDRV_UNKNOWN.
+ *   if marked as allowed but driver type is KDRV_UNKNOWN.
  * Return 1 if kernel driver is managing the device.
  * Return 0 on success.
  */
-- 
2.26.2


  parent reply	other threads:[~2020-07-14  5:40 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-13  0:00 [dpdk-dev] [PATCH v3 00/10] rename blacklist/whitelist to block/allow Stephen Hemminger
2020-06-13  0:00 ` [dpdk-dev] [PATCH v3 01/10] rte_ethdev: change comment to rte_dev_eth_mac_addr_add Stephen Hemminger
2020-06-13  0:00 ` [dpdk-dev] [PATCH v3 02/10] mk: replace reference to blacklist/whitelist Stephen Hemminger
2020-06-13  0:00 ` [dpdk-dev] [PATCH v3 03/10] check_maintainers: change variable names Stephen Hemminger
2020-07-10 17:01   ` Thomas Monjalon
2020-06-13  0:00 ` [dpdk-dev] [PATCH v3 04/10] eal: replace usage of blacklist/whitelist in enum Stephen Hemminger
2020-06-13  0:00 ` [dpdk-dev] [PATCH v3 05/10] drivers: replace references to blacklist Stephen Hemminger
2020-06-15  6:32   ` Hemant Agrawal
2020-06-13  0:00 ` [dpdk-dev] [PATCH v3 06/10] eal: replace pci-whitelist/pci-blacklist options Stephen Hemminger
2020-06-13  0:00 ` [dpdk-dev] [PATCH v3 07/10] doc: replace references to blacklist/whitelist Stephen Hemminger
2020-06-13  0:00 ` [dpdk-dev] [PATCH v3 08/10] app/test: use new allowlist and blocklist Stephen Hemminger
2020-06-13  0:00 ` [dpdk-dev] [PATCH v3 09/10] doc: add note about blacklist/whitelist changes Stephen Hemminger
2020-06-13  0:00 ` [dpdk-dev] [PATCH v3 10/10] eal: mark old macros for blacklist/whitelist as deprecated Stephen Hemminger
2020-06-17 12:05 ` [dpdk-dev] [PATCH v3 00/10] rename blacklist/whitelist to block/allow Mcnamara, John
2020-07-10 15:06 ` David Marchand
2020-07-14  4:43   ` Stephen Hemminger
2020-07-14  5:33   ` Stephen Hemminger
2020-07-15 10:01     ` [dpdk-dev] [dpdk-techboard] " Thomas Monjalon
2020-09-22 14:28       ` Stephen Hemminger
2020-09-22 16:16         ` Thomas Monjalon
2020-09-22 16:18           ` Thomas Monjalon
2020-09-22 17:12           ` Stephen Hemminger
2020-07-14  5:39 ` [dpdk-dev] [PATCH v4 00/11] rename blacklist/whitelist to exclude/include Stephen Hemminger
2020-07-14  5:39   ` [dpdk-dev] [PATCH v4 01/11] rte_ethdev: change comment to rte_dev_eth_mac_addr_add Stephen Hemminger
2020-07-14  5:39   ` [dpdk-dev] [PATCH v4 02/11] mk: replace reference to blacklist/whitelist Stephen Hemminger
2020-07-14  5:39   ` [dpdk-dev] [PATCH v4 03/11] check_maintainers: change variable names Stephen Hemminger
2020-07-14  5:39   ` [dpdk-dev] [PATCH v4 04/11] eal: replace usage of blacklist/whitelist in enum Stephen Hemminger
2020-07-14  5:39   ` Stephen Hemminger [this message]
2020-07-14  5:39   ` [dpdk-dev] [PATCH v4 06/11] eal: replace pci-whitelist/pci-blacklist options Stephen Hemminger
2020-07-14  5:39   ` [dpdk-dev] [PATCH v4 07/11] doc: replace references to blacklist/whitelist Stephen Hemminger
2020-07-14  5:39   ` [dpdk-dev] [PATCH v4 08/11] app/test: use new allowlist and blocklist Stephen Hemminger
2020-07-14  5:39   ` [dpdk-dev] [PATCH v4 09/11] doc: add note about blacklist/whitelist changes Stephen Hemminger
2020-07-14  5:39   ` [dpdk-dev] [PATCH v4 10/11] eal: mark old macros for blacklist/whitelist as deprecated Stephen Hemminger
2020-07-14  5:39   ` [dpdk-dev] [PATCH v4 11/11] doc: update examples to new config options Stephen Hemminger
2020-07-14  6:05   ` [dpdk-dev] [PATCH v4 00/11] rename blacklist/whitelist to exclude/include Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200714053919.5609-6-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=bluca@debian.org \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).