diff options
author | Steven <sluong@cisco.com> | 2018-11-06 12:32:58 -0800 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2018-11-06 22:21:31 +0000 |
commit | dd04bb9538292140a4068a34aa7dccbcf5026355 (patch) | |
tree | 2d440ecee3efb2a18922f339adffec1d199e580d /src/plugins/dpdk/device | |
parent | 4d5b917b1a74461abaa30182d4bf5c7761572323 (diff) |
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 <sluong@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device')
-rw-r--r-- | src/plugins/dpdk/device/init.c | 15 |
1 files changed, 14 insertions, 1 deletions
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) ; |