From dd04bb9538292140a4068a34aa7dccbcf5026355 Mon Sep 17 00:00:00 2001 From: Steven Date: Tue, 6 Nov 2018 12:32:58 -0800 Subject: dpdk: don't automatically whitelist vmxnet3 PCI interfaces If no PCI address is specified in dpdk config, the default to automatically put all PCIs in the whitelist. For vmxnet3 PCIs, we want to change its default to exclude the vmxnet3 PCIs. That is to put them in the blacklist instead of whitelist. Change-Id: I2b7061d6437910eb0e1b16df19a770cab968c602 Signed-off-by: Steven --- src/plugins/dpdk/device/init.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c index 9c54641cb57..c130dbce5df 100644 --- a/src/plugins/dpdk/device/init.c +++ b/src/plugins/dpdk/device/init.c @@ -888,7 +888,20 @@ dpdk_bind_devices_to_uio (dpdk_config_main_t * conf) ; /* vmxnet3 */ else if (d->vendor_id == 0x15ad && d->device_id == 0x07b0) - ; + { + /* + * For vmxnet3 PCI, unless it is explicitly specified in the whitelist, + * the default is to put it in the blacklist. + */ + if (devconf == 0) + { + pool_get (conf->dev_confs, devconf); + hash_set (conf->device_config_index_by_pci_addr, addr->as_u32, + devconf - conf->dev_confs); + devconf->pci_addr.as_u32 = addr->as_u32; + devconf->is_blacklisted = 1; + } + } /* all Intel network devices */ else if (d->vendor_id == 0x8086 && d->device_class == PCI_CLASS_NETWORK_ETHERNET) ; -- cgit 1.2.3-korg