Fixed QAT device binding and device unbinding when vpp package is removed 98/5498/3
authorRadu Nicolau <radu.nicolau@intel.com>
Thu, 23 Feb 2017 14:28:49 +0000 (14:28 +0000)
committerDave Barach <openvpp@barachs.net>
Fri, 24 Feb 2017 12:16:38 +0000 (12:16 +0000)
Change-Id: I35ad6a42093cad0945df1df09a39c63c4560dce6
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
build-root/deb/debian/vpp.postrm
build-root/rpm/vpp.spec
src/vnet/devices/dpdk/init.c

index ac16a45..24b4842 100644 (file)
@@ -7,7 +7,7 @@ pci_dirs=`find /sys/bus/pci/drivers -type d -name igb_uio -o -name uio_pci_gener
 for d in $pci_dirs; do
     for f in ${d}/*; do
         [ -e "${f}/config" ] || continue
-        echo 1 > ${f}/remove
+        echo ${f##*/} > ${d}/unbind
         basename `dirname ${f}` | xargs echo -n "Removing driver"; echo " for PCI ID" `basename ${f}`
         removed=y
     done
index 95196e9..7bc18ca 100644 (file)
@@ -244,7 +244,7 @@ pci_dirs=`find /sys/bus/pci/drivers -type d -name igb_uio -o -name uio_pci_gener
 for d in $pci_dirs; do
     for f in ${d}/*; do
         [ -e "${f}/config" ] || continue
-        echo 1 > ${f}/remove
+        echo ${f##*/} > ${d}/unbind
         basename `dirname ${f}` | xargs echo -n "Removing driver"; echo " for PCI ID" `basename ${f}`
         removed=y
     done
index 7249cc5..c50c065 100755 (executable)
@@ -858,7 +858,7 @@ dpdk_bind_devices_to_uio (dpdk_config_main_t * conf)
     vec_reset_length (pci_addr);
     pci_addr = format (pci_addr, "%U%c", format_vlib_pci_addr, &d->bus_address, 0);
 
-    if (d->device_class != PCI_CLASS_NETWORK_ETHERNET)
+    if (d->device_class != PCI_CLASS_NETWORK_ETHERNET && d->device_class != PCI_CLASS_PROCESSOR_CO)
       continue;
 
     if (num_whitelisted)