summaryrefslogtreecommitdiffstats
path: root/build/patches/dpdk-16.04-virtio-devargs.patch
diff options
context:
space:
mode:
authorThomas F Herbert <therbert@redhat.com>2016-06-23 04:01:17 -0400
committerThomas F Herbert <therbert@redhat.com>2016-06-30 11:39:30 -0400
commit6f971f00a354bd68af0ca6b55ab00c5d1c1dfa0f (patch)
tree5560f802eaf423cd82c9ce54d4fc808f65859fa7 /build/patches/dpdk-16.04-virtio-devargs.patch
parent1fe93bf666765927d9ed15ead14db85caf51098c (diff)
RPM: Apex: Backport patch to dpdk to fix PCI walk to fix segfault to
ovs-vswitch. Rebased to latest. Change-Id: Ic7788c4a479378866eda95473bd0c0d398dc33fd Signed-off-by: Thomas F Herbert <therbert@redhat.com>
Diffstat (limited to 'build/patches/dpdk-16.04-virtio-devargs.patch')
-rw-r--r--build/patches/dpdk-16.04-virtio-devargs.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/build/patches/dpdk-16.04-virtio-devargs.patch b/build/patches/dpdk-16.04-virtio-devargs.patch
new file mode 100644
index 0000000..f5a3bc4
--- /dev/null
+++ b/build/patches/dpdk-16.04-virtio-devargs.patch
@@ -0,0 +1,22 @@
+diff --git a/drivers/net/virtio/virtio_pci.c b/drivers/net/virtio/virtio_pci.c
+index c007959..3a25f82 100644
+--- a/drivers/net/virtio/virtio_pci.c
++++ b/drivers/net/virtio/virtio_pci.c
+@@ -626,6 +626,7 @@ next:
+ * 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.
+ * Return 1 if kernel driver is managing the device.
+ * Return 0 on success.
+ */
+@@ -650,7 +651,8 @@ vtpci_init(struct rte_pci_device *dev, struct virtio_hw *hw)
+ PMD_INIT_LOG(INFO, "trying with legacy virtio pci.");
+ if (legacy_virtio_resource_init(dev, hw) < 0) {
+ if (dev->kdrv == RTE_KDRV_UNKNOWN &&
+- dev->devargs->type != RTE_DEVTYPE_WHITELISTED_PCI) {
++ (!dev->devargs ||
++ dev->devargs->type != RTE_DEVTYPE_WHITELISTED_PCI)) {
+ PMD_INIT_LOG(INFO,
+ "skip kernel managed virtio device.");
+ return 1;