From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7039AA04F2; Mon, 8 Jun 2020 21:26:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0DE951B75C; Mon, 8 Jun 2020 21:26:09 +0200 (CEST) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id BF5FF4CBD for ; Mon, 8 Jun 2020 21:26:05 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id r18so2918481pgk.11 for ; Mon, 08 Jun 2020 12:26:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bo8O40zYwgIvjLOovb26J3x3H6VA9UzM6C2LRK9HcWw=; b=ga7c6edSt+6OyL9PehubckCqlCrAyYkLZL39qq8LcE3fITtXb7/+yji30bxytMF0qJ 9/Ym7oaMCxzWSiVNEw96BYweWvlaDxPlEliDmwKFkl3I/ReJcD+fXdldEsJQ38Qx+nzA LHoQmwfoJJmcom5Nm8lTGD8M9bpWFWnhoe0fRey3L1O1Xnb+t1VL4y9ElzHMDKkQJLK1 /0pabhUIulaYvInQFj/BgqxSNCvjMnX8yeTEfjW59w8v7IUgB3iWW0MiJ9ztGbpBc5DG XS0jm9SWSfChG+PlwQ4N54hnXYDEp+YoVzfB4J6TCDsQb0qp7IYelF6fT7iGiUcyrMwR oy7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bo8O40zYwgIvjLOovb26J3x3H6VA9UzM6C2LRK9HcWw=; b=Jp1++x6LncRVHIFS0i41B9Q25IsltfNej1K7HICS/Zcd91wsC0GShtDC2Vt63Rftkr ODKCYLkIRfQ4sfqCwhC68QHg/3q4ypIz97tsFx1WkHGDBhlihR6OI2BmZOE34s5RmGgs 0K6j6Uv0yM968JBCp9BahaahMUUc7qKYD5JMVGhsqRinbG8GTmldfyZl0M6nV04Rv/pT 5L2UVmooLzgLd0fdaC/GRIOOB3qwzAUaE6VqeNNmYyOkZbPlHg6LUvzUzp9vXl4Fkv77 dYYmxt3cEsxmwJH8fEKDaRtWY5a39bZOw8y0a8NRRF1xNBXMC388jkEMOimN1aSr0H6W xWBQ== X-Gm-Message-State: AOAM531BiCmcIAaUtz9d7WYaVtfnazelUNbD2trNEhC/uPVSV5duxAhq nLtkICWkjMNGkmVlodhCmRSosRKBSn4= X-Google-Smtp-Source: ABdhPJwz1mIXdMaBYOPbtTtxB4lsiIG6yvH3hLdE8xzvtCp2+f7vWliCrTGIeWTeQyyNj3DMWRdkEg== X-Received: by 2002:aa7:96ec:: with SMTP id i12mr21960891pfq.71.1591644364283; Mon, 08 Jun 2020 12:26:04 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id z140sm8114529pfc.135.2020.06.08.12.26.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jun 2020 12:26:03 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 8 Jun 2020 12:25:41 -0700 Message-Id: <20200608192546.7160-6-stephen@networkplumber.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200608192546.7160-1-stephen@networkplumber.org> References: <20200607170127.15694-1-stephen@networkplumber.org> <20200608192546.7160-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 05/10] drivers: replace references to blacklist 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" Use the new terminolgy BLOCKED to describe when devices are excluded from being used. Signed-off-by: Stephen Hemminger --- 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 | 21 +++++++++------------ 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, 25 insertions(+), 30 deletions(-) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index d53fe6083a79..ac326d96f00d 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -556,7 +556,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 */ @@ -610,13 +610,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 afbd82e8dbfb..49125729202e 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -407,7 +407,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 @@ -438,16 +438,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 245d94f59c6e..1fa247b8fa08 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -66,7 +66,7 @@ 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 + /* In blocklist mode, if the device is not blocklisted, no * rte_devargs exists for it. */ if (devargs != NULL) @@ -132,7 +132,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 blocklisted; Check if driver supports it */ if (!rte_pci_match(dr, dev)) /* Match of device and driver failed */ return 1; @@ -141,12 +141,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 blocklisted, 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 +587,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 3adef01c95de..ceada945e7e2 100644 --- a/drivers/bus/vmbus/vmbus_common.c +++ b/drivers/bus/vmbus/vmbus_common.c @@ -102,7 +102,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 blocklisted */ /* map resources for device */ ret = rte_vmbus_map_device(dev); @@ -178,7 +178,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..c79d210cc74d 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 allowlisted 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 f537ab286289..dae20aafe61d 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -3115,7 +3115,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..8ef1e1d35a75 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 allowlisted but driver type is KDRV_UNKNOWN. * Return 1 if kernel driver is managing the device. * Return 0 on success. */ -- 2.26.2