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 0C9FEA0521; Thu, 5 Nov 2020 23:36:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 910662BE1; Thu, 5 Nov 2020 23:36:17 +0100 (CET) Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by dpdk.org (Postfix) with ESMTP id EB5A428EE for ; Thu, 5 Nov 2020 23:36:15 +0100 (CET) Received: by mail-pg1-f194.google.com with SMTP id r10so2357867pgb.10 for ; Thu, 05 Nov 2020 14:36:15 -0800 (PST) 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=6zvhW4iYuAuST18wPXtuSUGAjTgl52SbDfnG8ZapurE=; b=JEwikMEkPBVlFk2pz5i8bjAoZKEe3+aqL9brm86pae9vWjOyN3QQyR82XRGdELos92 lpTOuzSsmZ0Z73I4LYwSNZqCG3eGhj/xXolEJaUxKQTsAYLB6Il5Xw0b4NVV5GG81eVc 1POByqB6GCJhqTx3vkI3khkcQuGXL+dplLns4+fu8l79bgMUTT+UnKoVdyVzyFM561Gj nwVNziEtNh4gFL3eth2Qof1XbC932AIkCFj/RkvSTkQZwOnqTnVPQvVeVyjcbCeBhsiw LYbKn5ycejhWHlOU/GTgW9JoSJNuTOwm8GVQBY4l1+PdfKI2Lajiw28/FmAyn1G6UxcY w8Gg== 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=6zvhW4iYuAuST18wPXtuSUGAjTgl52SbDfnG8ZapurE=; b=nEj8KCyZkQRAMchAwF1UqRGqsd8IoD3+NCB/hL1wPFO5iDdOxVN5k60ohwJavIcNGW 4Rqz0xd9cMhTYHPE3e43klxREtJH9yVSCCbDdxXwS5tDqNmJ2lM1CVrmfzj9BO0vxcbH AhUufvLf5Cs2bYiVtskot0+dxMkJ1TaxBRZkjzOQTv65WytJ/3rDtbui+cKEZkU1g+mV cQ9TGf6QRDo66hkLUJgJJdsKWcmEeu2fLn369tCj+K2CxLVJcSHSwuSg8Vb3kRrl28PW bD7xpHRNdXHv372Gt8V80JV16Hv+N5tC6TsRoWfytNiVZzfR2eOito7T2KCVLzr/UV2j mbgg== X-Gm-Message-State: AOAM531wPv3Nwb7t6PhBEfFjuf3D2GljJF3YA+jRVm8omeXWQCNgPK0r zMdQQTkJCiUib2kRUz1AXJlVdJhyG+P1R/JT X-Google-Smtp-Source: ABdhPJzyyNlV+kwHuugKf4sAkFl2Zqf+1pQaPsloLbT9SjLyCmBh1SMAGyRKxuG/qZ6ad/9aGwst+Q== X-Received: by 2002:a17:90a:e20f:: with SMTP id a15mr4483432pjz.12.1604615773625; Thu, 05 Nov 2020 14:36:13 -0800 (PST) Received: from hermes.corp.microsoft.com (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id u5sm1026756pgj.28.2020.11.05.14.36.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 14:36:12 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Luca Boccassi , Hemant Agrawal Date: Thu, 5 Nov 2020 14:35:58 -0800 Message-Id: <20201105223602.5965-3-stephen@networkplumber.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201105223602.5965-1-stephen@networkplumber.org> References: <20200922143202.8755-1-stephen@networkplumber.org> <20201105223602.5965-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v9 2/6] 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 terminology blocked to describe when devices are excluded from being used. Signed-off-by: Stephen Hemminger Acked-by: Luca Boccassi Acked-by: Hemant Agrawal --- drivers/bus/dpaa/dpaa_bus.c | 7 +++---- drivers/bus/fslmc/fslmc_bus.c | 9 ++++----- drivers/bus/fslmc/fslmc_vfio.c | 12 ++++++------ drivers/bus/pci/pci_common.c | 24 ++++++++++-------------- drivers/bus/vmbus/vmbus_common.c | 4 ++-- drivers/crypto/virtio/virtio_pci.c | 2 +- drivers/net/virtio/virtio_pci.c | 2 +- 7 files changed, 27 insertions(+), 33 deletions(-) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index ece6a4c4243a..3098e230933c 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -584,7 +584,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 */ @@ -646,13 +646,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 db936696282e..58435589b21d 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -420,7 +420,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 @@ -451,16 +451,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 Blocked, 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 aba55b46d8da..b52f36c33e4f 100644 --- a/drivers/bus/fslmc/fslmc_vfio.c +++ b/drivers/bus/fslmc/fslmc_vfio.c @@ -812,13 +812,13 @@ fslmc_vfio_process_group(void) if (dev->dev_type == DPAA2_MPORTAL) { dpmcp_count++; if (dev->device.devargs && - dev->device.devargs->policy == RTE_DEV_BLACKLISTED) + dev->device.devargs->policy == RTE_DEV_BLOCKED) is_dpmcp_in_blocklist = true; } if (dev->dev_type == DPAA2_IO) { dpio_count++; if (dev->device.devargs && - dev->device.devargs->policy == RTE_DEV_BLACKLISTED) + dev->device.devargs->policy == RTE_DEV_BLOCKED) is_dpio_in_blocklist = true; } } @@ -829,8 +829,8 @@ fslmc_vfio_process_group(void) if (dev->dev_type == DPAA2_MPORTAL) { current_device++; 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 Blocked, skipping", dev->device.name); TAILQ_REMOVE(&rte_fslmc_bus.device_list, dev, next); @@ -876,8 +876,8 @@ fslmc_vfio_process_group(void) if (dev->dev_type == DPAA2_IO) current_device++; 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 Blocked, 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 39eea464b4c0..b24c0697130e 100644 --- a/drivers/bus/pci/pci_common.c +++ b/drivers/bus/pci/pci_common.c @@ -67,9 +67,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. @@ -172,7 +171,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; @@ -181,12 +180,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; } @@ -629,14 +626,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/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c index 9915eabf68b0..d6b950ee6925 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.27.0